Page 1 of 1

Printing multiple page calls in Internet Explorer

Posted: Thu Sep 20, 2007 6:52 pm
by cmay
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)
Private Sub objPDFXC_OnFileSaved
Private Sub objPDFXC_OnPageFinished
and changing the filename each time, but that didn’t work.

I would appreciate any help on this.

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

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.


Posted: Thu Sep 20, 2007 7:58 pm
by cmay
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?

Posted: Fri Sep 21, 2007 9:34 am
by Ivan - Tracker Software
Can you try appending feature of the driver? To turn on appending you need to call:

objPDFXC.SetParamStr(0, "Save.WhenExists", "Append")

Posted: Fri Sep 21, 2007 7:16 pm
by cmay
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?

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

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)