PXCp_GetPagesCount

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: Tracker Support, TrackerSupp-Daniel, Chris - Tracker Supp, Vasyl-Tracker Dev Team, Sean - Tracker, Tracker Supp-Stefan

Post Reply
jeffp
User
Posts: 851
Joined: Wed Sep 30, 2009 6:53 pm

PXCp_GetPagesCount

Post by jeffp » Sat Feb 18, 2012 1:37 am

I can open the attached file with PXCp_ReadDocumentW, but I get an exception when I try to check it's page count using PXCp_GetPagesCount. Is there something wrong with this file?

It opens and displays the pages fine in the ViewerAX.

Note: This file was create with an HP scanner using the default HP software that came with it.
Attachments
Test Scans for Unstacking.zip
(138.49 KiB) Downloaded 206 times

Lzcat - Tracker Supp
Site Admin
Posts: 711
Joined: Thu Jun 28, 2007 8:42 am

Re: PXCp_GetPagesCount

Post by Lzcat - Tracker Supp » Sat Feb 18, 2012 5:55 pm

Your file contains an incorrect xref table (actually there is one error with an incorrect first object number - it should be 0 instead of 1), and all object offsets are wrong (shifted).
xcpro cannot handle such files correctly and returns an error. When you say "get an exception" you mean that xcpro return error or it really crash? If it crash - which build are you using?
Victor
Tracker Software
Project manager

Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.

jeffp
User
Posts: 851
Joined: Wed Sep 30, 2009 6:53 pm

Re: PXCp_GetPagesCount

Post by jeffp » Sat Feb 18, 2012 6:16 pm

No crash. It just doesn't return 0 for success.

What does ViewerAX handle this just fine?

Is there nothing that can be done here or do the DLL controls just assume it's going to be right? Strange that this was created by HP software. You'd think they would get it right.

User avatar
Tracker Supp-Stefan
Site Admin
Posts: 13331
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: PXCp_GetPagesCount

Post by Tracker Supp-Stefan » Mon Feb 20, 2012 11:44 am

Hello jeffp,

The Viewer has a few more error correction features - and that's why it does handle the file fine, while the xcpro doesn't. I doubt anything can be done in v4 with v5 so close to release. So let's see if such error corrections will be present in ver5 of our SDKs, and if not - I will make the necessary ticket.

Best,
Stefan

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

Re: PXCp_GetPagesCount

Post by John - Tracker Supp » Tue Feb 21, 2012 5:18 am

When the Version 3 viewer and Version 5 libraries and drivers are released they will share the same common code set rather than being indepedant libraries and codes sets etc - so once done - all such features where appropriate will be present in all products as a matter of their 'DNA' - what works in one will work in the other etc...

Hope that helps
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

jeffp
User
Posts: 851
Joined: Wed Sep 30, 2009 6:53 pm

Re: PXCp_GetPagesCount

Post by jeffp » Tue May 22, 2012 7:19 pm

Can you download and test the follow:

http://www.lucion.com/files/PageCount.zip

Is it the same issue?

This file was created by an HP scanner.

Is it possible to fix the DLL to make this work. I'm starting to get more of these. Strange the HP won't create a good PDF file.

--Jeff

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

Re: PXCp_GetPagesCount

Post by John - Tracker Supp » Wed May 23, 2012 5:02 am

Hi Jeff,

Yes it does appear to be the same problem - we are not keen on modifying the existing libraries to encompass these changes - or any of a major nature as we are extremly committed to working on the overdue version releases as you know.

I will discuss with my colleagues how much work is required - if trivial we will try and do - but if as I suspect substantial changes are required then I must tell you in advance - this will not be possible and you will either need to use the Viewer SDK which can already re-save these files and correct such errors or await the new libraries.
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

jeffp
User
Posts: 851
Joined: Wed Sep 30, 2009 6:53 pm

Re: PXCp_GetPagesCount

Post by jeffp » Wed May 23, 2012 2:16 pm

If it's going to be fixed in the new major release of the DLLs coming up in a few months, then I can just wait. I just would like to know for sure that it will work in the future.

You mentioned that in the new major release there will still be a set of SDK DLLs as well as the ActiveX viewer. Will these be running off the same code base? That is, things in the DLL should behave like the viewer and vice versa?

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

Re: PXCp_GetPagesCount

Post by John - Tracker Supp » Wed May 23, 2012 3:16 pm

Hi Jeff,

Thanks for your understanding ... There is also one thing that may help you in the interim - if the HP scanner can create a 1.4 or 1.5 PDF version file - then this would most likely include all the required XREF info ...

With regards the V5 dll's and Viewer revisions - yes these all work off a common code base - its a single 'layered' set of libraries with the benefit that the XCPRO40 and PXCLIB40 dll's become a common library - so if a function is available when you modify a PDF - it will also be available for the most part when you create one - some functionality currently requires you save the file (with PXCLIB40) when creating and reopen after creation to allow manipulation with the XCPRO40 lib - this will no longer be required for the majority of such cases.

cheers
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

jeffp
User
Posts: 851
Joined: Wed Sep 30, 2009 6:53 pm

Re: PXCp_GetPagesCount

Post by jeffp » Wed May 23, 2012 3:49 pm

Looking forward to the new release. Is end of June still your target?

jeffp
User
Posts: 851
Joined: Wed Sep 30, 2009 6:53 pm

Re: PXCp_GetPagesCount

Post by jeffp » Wed May 23, 2012 3:54 pm

And don't forget the Delphi wrappers for the new DLLs :-)

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

Re: PXCp_GetPagesCount

Post by John - Tracker Supp » Wed May 23, 2012 4:53 pm

Absolutley :)
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

Dorwol
User
Posts: 274
Joined: Mon Aug 04, 2008 5:04 pm

Re: PXCp_GetPagesCount

Post by Dorwol » Sat Jul 04, 2015 1:23 pm

Hi,

Meanwhil 1 year later, I have the same problems.

PXCp_GetPagesCount still doesn't work properly! :(

Any solution meanwhile?

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

Re: PXCp_GetPagesCount

Post by Ivan - Tracker Software » Sat Jul 04, 2015 11:44 pm

With the same document?
xcpro library has a quite limited ability to recover damaged PDF files and for such files it might not work properly.
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.

Dorwol
User
Posts: 274
Joined: Mon Aug 04, 2008 5:04 pm

Re: PXCp_GetPagesCount

Post by Dorwol » Sun Jul 05, 2015 10:08 am

Ivan - Tracker Software wrote:With the same document?
xcpro library has a quite limited ability to recover damaged PDF files and for such files it might not work properly.
No, not with the same document. With some documents from our customers. If I use your AX-Viewer, the viewer will tell the correct PagesCount. But I need this information with PXCp_GetPagesCount and not with the viewer.

User avatar
Tracker Supp-Stefan
Site Admin
Posts: 13331
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: PXCp_GetPagesCount

Post by Tracker Supp-Stefan » Tue Jul 07, 2015 4:12 pm

Hi Dorwol,

Can you please provide the problematic sample file? If sensitive please send it to support@tracker-software with a link back to this topic.

Regards,
Stefan

prosozial_schmitt
User
Posts: 52
Joined: Tue Dec 28, 2004 9:49 am

Re: PXCp_GetPagesCount

Post by prosozial_schmitt » Tue Jul 28, 2015 2:10 pm

Hello Stefan and Dorwol,

we had the same problem with some pdf-documents which were generated by HP Scanner Software. The property "pagesCount" could not be read by PdfTools.

For us, the problem is fixed with version 4.0.313.1 of Pdf Pro Library (xcpro40.dll). We can read the property without problems now. Even the simple viewer (pxcview.dll) can process the documents.

Greetings
Hans-Peter

User avatar
Tracker Supp-Stefan
Site Admin
Posts: 13331
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: PXCp_GetPagesCount

Post by Tracker Supp-Stefan » Tue Jul 28, 2015 2:31 pm

Hello Hans-Peter,

Many thanks for your input!
I hope Dorwool can also sort his issue by updating to 313.1.

Regards,
Stefan

Dorwol
User
Posts: 274
Joined: Mon Aug 04, 2008 5:04 pm

Re: PXCp_GetPagesCount

Post by Dorwol » Tue Jul 28, 2015 4:27 pm

Thank you, will check it!

User avatar
Will - Tracker Supp
Site Admin
Posts: 6673
Joined: Mon Oct 15, 2012 9:21 pm
Location: London, UK
Contact:

Re: PXCp_GetPagesCount

Post by Will - Tracker Supp » Tue Jul 28, 2015 5:08 pm

:)
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

Will Travaglini
Tracker Support (Europe)
Tracker Software Products Ltd.
http://www.tracker-software.com

Post Reply