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
Blank Pages after append pdf to a pdf
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.
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.