Blank Pages after append pdf to a pdf

If you are a C/C++/C# developer and have any questions about using our products from your application here is the place to post them.
Post Reply
tdreher
Posts: 4
Joined: Tue Aug 03 2004

Blank Pages after append pdf to a pdf

Post by tdreher »

Hello,

i have a problem appending pdfs to another pdf. the main problem is , there is no split function to split a pdf exactly (example: split page 1-5 and page 5-10 etc.). so i use the pdfsplit.exe utility to make a 10 page pdf to 10 single pdfs and append them to my own needs. Everything with the PDF Creator ActiveX interface

The problem: in Debug (when i walk through) everything is fine. (i created my self concatenated PDFs.) In Release or without stepping through the programm the result after Save is a blank page. So i have to assume its a timing problem (functions are in a thread??) and added sleep(100) after every step an it works. No blank pages.

Is there another way ? finish messages ?

We use native C to access the activeX because of an exotic programming language:

...

// its only Open the PDF sTmpPath
InvokeHelp(lpDispatchPDF, 0x17, DISPATCH_METHOD, VT_I4, (void*)&nResult, parms2, sMainPath, "");
Sleep(100)

...

// Append another PDF sTmpPath to the opened pdf
InvokeHelp(lpDispatchPDF, 0x56, DISPATCH_METHOD, VT_EMPTY, NULL, parms3, sanotherPDF, "");
Sleep(100)

...

// Save
InvokeHelp(lpDispatchPDF, 0x16, DISPATCH_METHOD, VT_EMPTY, NULL, parms4, sNewPDF, 0);
Sleep(100)

...

// release everything and exit
lpDispatchPDF->Release();
...



Thomas
Joan
Amyuni Team
Posts: 2799
Joined: Wed Sep 11 2002
Contact:

Post by Joan »

Hello,

In general you won't need to add a time delay after the Append function, I am not sure what do you mean by: "function are in a thread", is your application multithreading?

You may try to get the return value of the Open and Append functions, if True is returned than you call the next function.

Hope this helps.
tdreher
Posts: 4
Joined: Tue Aug 03 2004

Post by tdreher »

Hello,

no, there is no multithreading in our application. i assume that perhaps your application (functions) works with threads and doesnt block the time it appends, merges ...

i have to look for the return values. i dont check all.
thanks.
Thomas
CurlBoy
Posts: 1
Joined: Sun Mar 26 2006
Contact:

Post by CurlBoy »

kewl topic guys :) :)
I like to like it!
Post Reply