InsertPage inserting blank pages

This Forum is for the use of Software Developers requiring help and assistance for Tracker Software's PDF-Tools SDK of Library DLL functions(only) - Please use the PDF-XChange Drivers API SDK Forum for assistance with all PDF Print Driver related topics or PDF-XChange Viewer SDK if appropriate.

Moderators: TrackerSupp-Daniel, Tracker Support, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Sean - Tracker, Tracker Supp-Stefan

Post Reply
isaware
User
Posts: 39
Joined: Fri Sep 25, 2009 6:21 pm

InsertPage inserting blank pages

Post by isaware »

Hi,

I have a window's service that concatenates PDF files using the PXCp_InsertPagesTo method.
This function works fine on my working environment however when I try the installed version (released version) of this service, it concatenates blank PDFs. The first page always displays correct but any following pages are always blanks.

iPagesRange(0).StartPage = 0
iPagesRange(0).EndPage = iPagesCount - 1
iPagesRange(0).InsertBefore = -1
XCPro40_Defs.PXCp_InsertPagesTo(iPDFToMerge, m_iPDF, iPagesRange, 1, 0)

There is no error (checks every single method for PDFTools) and I confirmed that the iPagesCount are 1 on those PDFs that get inserted as blank.
Katya - Tracker Supp
User
Posts: 39
Joined: Tue Apr 20, 2010 10:48 pm

Re: InsertPage inserting blank pages

Post by Katya - Tracker Supp »

Hi isaware,

We're sorry to hear you are having some troubles.
Please, provide us with a sample to help our developers to reproduce the problem - but please ensure there is no license info in your code and also please zip any files uploaded.

Thanks
isaware
User
Posts: 39
Joined: Fri Sep 25, 2009 6:21 pm

Re: InsertPage inserting blank pages

Post by isaware »

m_iPDF is the destination file and it is the only file that displays correct in the resulted PDF.

iRes = XCPro40_Defs.PXCp_Init(iPDFToMerge, XCPro40_Defs.g_RegKey, XCPro40_Defs.g_DevCode)
ResultChecks(iRes, sCurrentProcess)
iRes = XCPro40_Defs.PXCp_ReadDocumentW(iPDFToMerge, sFileName, 0)
ResultChecks(iRes, sCurrentProcess)

Dim iPagesRange() As XCPro40_Defs.PXCp_CopyPageRange
ReDim iPagesRange(1)
Dim iPagesCount As Integer
iRes = XCPro40_Defs.PXCp_GetPagesCount(iPDFToMerge, iPagesCount)
ResultChecks(iRes, sCurrentProcess)

iPagesRange(0).StartPage = 0
iPagesRange(0).EndPage = iPagesCount - 1
iPagesRange(0).InsertBefore = -1
XCPro40_Defs.PXCp_InsertPagesTo(iPDFToMerge, m_iPDF, iPagesRange, 1, 0)
ResultChecks(iRes, sCurrentProcess)

iRes = XCPro40_Defs.PXCp_WriteDocumentW(m_iPDF, m_sRootFileName, XCPro40_Defs.PXCp_CreationDisposition.PXCp_CreationDisposition_Overwrite, XCPro40_Defs.PXCp_WriteDocFlag.PXCp_Write_NoRelease)
ResultChecks(iRes, sCurrentProcess)

XCPro40_Defs.PXCp_Delete(iPDFToMerge)
User avatar
John - Tracker Supp
Site Admin
Posts: 5219
Joined: Tue Jun 29, 2004 10:34 am
Location: United Kingdom
Contact:

Re: InsertPage inserting blank pages

Post by John - Tracker Supp »

Hi,

Thanks for the extended snippet -however I regret in the case of such inconsistent behaviour we really do need a working example that demonstrates the behaviour at the client site - even if its a trimmed down version of your app or perhaps one of our examples ready to run ...

I would suggest you try and use something simple at the client site to see if its all app's provided that show the issue - or just your full app - if its all - if could be something simple like the user has older or mismatched DLL's (which Release/Build of our DLL's is the client using ?) or a specific image file or the Windows Version etc.

So we really do need a complete app that shows the problem at the client site, having first ensured first that the user has the latest build, there are no mismatched or duplicate/conflicting - DLL's/Versions installed and some sample PDF's to take a look at along with the users system info please.

Once we have these we can try and reproduce and advise further.

Many 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
isaware
User
Posts: 39
Joined: Fri Sep 25, 2009 6:21 pm

Re: InsertPage inserting blank pages

Post by isaware »

Hi, the program is a huge program and it is going to take some time to trim it down for the sample code.
In the meantime, can you check when your tool gets the error on the attached image?
It poped up when I tried to open the merged file from the code attached in the previous posts.
The source file contained an image and some texts but only texts were displaying on the merged file.

p.s. I modified the extension of the file to txt from jpg because it wouldn't let me attach the screenshot.

p.s. I can't upload any files.. The forum tells me that the extensions are not correct - I tried jpg, bmp, png, txt..
Here is the error message instead of the screenshot -
An error exists on this page. Acrobat may not display the page correctly. Please contact the person who created the PDF document to correct the problem.
User avatar
John - Tracker Supp
Site Admin
Posts: 5219
Joined: Tue Jun 29, 2004 10:34 am
Location: United Kingdom
Contact:

Re: InsertPage inserting blank pages

Post by John - Tracker Supp »

RE: Attachments

All attachments must be wrapped in a Zip, RAR or 7z archive - its always been that way and the text after my sig gives the clue ....

:)
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
User avatar
John - Tracker Supp
Site Admin
Posts: 5219
Joined: Tue Jun 29, 2004 10:34 am
Location: United Kingdom
Contact:

Re: InsertPage inserting blank pages

Post by John - Tracker Supp »

Hi,

other than telling us the file is badly formatted and probably not competley written when the process abrbbtly stops - the message takes us no further ahead I am afraid, this is pretty much what is expected.

For some reason - on your users system the process halts before completion ...

If its going to take a while to strip it down - how about the other questions asked ?

These may help if you could please answer :

1: I would suggest you try and use something simple at the client site to see if its all app's provided that show the issue - or just your full app?

If its all - if could be something simple like the user has older or mismatched DLL's (which Release/Build of our DLL's is the client using ?)

or a specific image file or the Windows Version etc.

2: How about some sample PDF's to take a look at along with the users system info please.

3: How about trying one of our examle app's at the client site, do they or dont they work ok ?
This may be easier than stripping your own - even if you have to modify slightly ?
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