Printing multiple page calls in Internet Explorer

This Forum is for the use of Software Developers requiring help and assistance for Tracker Software's PDF-XChange Printer Drivers SDK (only) - Please use the PDF-Tools SDK Forum for Library DLL assistance.

Moderators: Tracker Support, TrackerSupp-Daniel, Chris - Tracker Supp, Vasyl-Tracker Dev Team, Sean - Tracker, Andrew - Tracker Support, Tracker - Clarion Support, John - Tracker Supp, Tracker Supp-Stefan, Ivan - Tracker Software, Support Staff, moderators

Post Reply
cmay
User
Posts: 6
Joined: Wed Sep 19, 2007 10:12 pm

Printing multiple page calls in Internet Explorer

Post by cmay » Thu Sep 20, 2007 6:52 pm

I am using PDF Exchange PRO 3, version 3.40.0071. The following is what I need to do. We are converting html forms displayed in Internet Explorer to pdf and want to be able to save them. There is no problem for single page forms. The problem involves multipage forms. I need to convert each page printed and save it with a unique file name, then merge these individual page files into a single pdf file.
When our program's Print button is clicked, our program calls IE for each html form page and prints that form page using the IE print driver. We load each form page html file into IE programmatically and each page carries the same file name (about:blank). This is fine for sending each page to the printer, but is a problem when using PDF Exchange. Only the last form page printed is saved by PDF Exchange. How do I intercept each individual printed page to save it?

I tried moving Call objPDFXC.SetParamStr(0, "Save.FullFileName", FilePath & FileName)
from
Private Sub objPDFXC_OnFileSaved
to
Private Sub objPDFXC_OnPageFinished
and changing the filename each time, but that didn’t work.

I would appreciate any help on this.

John - Tracker Supp
Site Admin
Posts: 8201
Joined: Tue Jun 29, 2004 10:34 am
Location: Vancouver Island - Canada
Contact:

Post by John - Tracker Supp » Thu Sep 20, 2007 7:38 pm

Hi,

As you no doubt can appreciate - this is the page name passed by IE - so you either need to specify the filname via a variable and apply that - or why not simply append each page to a single required file name if this is what you intend to do anyway - the driver allows this?

If you need specific code corrected - please provide a bigger 'chunk' of the area of code relevant.

Thanks
If posting files to this forum - you must archive the files to a ZIP, RAR or 7z file or they will not be uploaded - thank you.

Best regards
Tracker Support
http://www.tracker-software.com

cmay
User
Posts: 6
Joined: Wed Sep 19, 2007 10:12 pm

Post by cmay » Thu Sep 20, 2007 7:58 pm

append each page to a single required file name if this is what you intend to do anyway - the driver allows this?


This might be the better solution. Is there a sample code that illustrates appending?

Ivan - Tracker Software
Site Admin
Posts: 3587
Joined: Thu Jul 08, 2004 10:36 pm
Location: Vancouver Island - Canada
Contact:

Post by Ivan - Tracker Software » Fri Sep 21, 2007 9:34 am

Can you try appending feature of the driver? To turn on appending you need to call:

objPDFXC.SetParamStr(0, "Save.WhenExists", "Append")
Tracker Software (Project Director)

When attaching files to any message - please ensure they are archived and posted as a .ZIP, .RAR or .7z format - or they will not be posted - thanks.

cmay
User
Posts: 6
Joined: Wed Sep 19, 2007 10:12 pm

Post by cmay » Fri Sep 21, 2007 7:16 pm

The Append seems to work. The only problem is that it is now saving all the pages in Landscape mode rather than Portrait, as it should and did before when I was saving pages individually. Thus, every page saved becomes 2 pages. Any tips there that you can offer?

Also, in another post there was mentioned a sample file which I don't have. It is the image2pdf VB demo app. Is it possible to send me that, or even better all sample apps, at least in VB?

John - Tracker Supp
Site Admin
Posts: 8201
Joined: Tue Jun 29, 2004 10:34 am
Location: Vancouver Island - Canada
Contact:

Post by John - Tracker Supp » Mon Sep 24, 2007 4:37 pm

Hi,

The example mentioned was replaced sometime ago by this example :

PXC30_Demo_vb.exe - which can be located in the \bin folder of the install - and the project source code is located in your VB examples folder - but I have also zipped and attached both for ease here - though please note neither use the driver functionality - but the pxclib30.dll library functions (this is the most efficient way to convert images to PDF)
Attachments
VBExamples.zip
Examples
(91.46 KiB) Downloaded 208 times
If posting files to this forum - you must archive the files to a ZIP, RAR or 7z file or they will not be uploaded - thank you.

Best regards
Tracker Support
http://www.tracker-software.com

Post Reply