Page 1 of 1

PXCp_GetPagesCount

Posted: Sat Feb 18, 2012 1:37 am
by jeffp
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.

Re: PXCp_GetPagesCount

Posted: Sat Feb 18, 2012 5:55 pm
by Lzcat - Tracker Supp
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?

Re: PXCp_GetPagesCount

Posted: Sat Feb 18, 2012 6:16 pm
by jeffp
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.

Re: PXCp_GetPagesCount

Posted: Mon Feb 20, 2012 11:44 am
by Tracker Supp-Stefan
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

Re: PXCp_GetPagesCount

Posted: Tue Feb 21, 2012 5:18 am
by John - Tracker Supp
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

Re: PXCp_GetPagesCount

Posted: Tue May 22, 2012 7:19 pm
by jeffp
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

Re: PXCp_GetPagesCount

Posted: Wed May 23, 2012 5:02 am
by John - Tracker Supp
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.

Re: PXCp_GetPagesCount

Posted: Wed May 23, 2012 2:16 pm
by jeffp
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?

Re: PXCp_GetPagesCount

Posted: Wed May 23, 2012 3:16 pm
by John - Tracker Supp
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

Re: PXCp_GetPagesCount

Posted: Wed May 23, 2012 3:49 pm
by jeffp
Looking forward to the new release. Is end of June still your target?

Re: PXCp_GetPagesCount

Posted: Wed May 23, 2012 3:54 pm
by jeffp
And don't forget the Delphi wrappers for the new DLLs :-)

Re: PXCp_GetPagesCount

Posted: Wed May 23, 2012 4:53 pm
by John - Tracker Supp
Absolutley :)

Re: PXCp_GetPagesCount

Posted: Sat Jul 04, 2015 1:23 pm
by Dorwol
Hi,

Meanwhil 1 year later, I have the same problems.

PXCp_GetPagesCount still doesn't work properly! :(

Any solution meanwhile?

Re: PXCp_GetPagesCount

Posted: Sat Jul 04, 2015 11:44 pm
by Ivan - Tracker Software
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.

Re: PXCp_GetPagesCount

Posted: Sun Jul 05, 2015 10:08 am
by Dorwol
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.

Re: PXCp_GetPagesCount

Posted: Tue Jul 07, 2015 4:12 pm
by Tracker Supp-Stefan
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

Re: PXCp_GetPagesCount

Posted: Tue Jul 28, 2015 2:10 pm
by prosozial_schmitt
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

Re: PXCp_GetPagesCount

Posted: Tue Jul 28, 2015 2:31 pm
by Tracker Supp-Stefan
Hello Hans-Peter,

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

Regards,
Stefan

Re: PXCp_GetPagesCount

Posted: Tue Jul 28, 2015 4:27 pm
by Dorwol
Thank you, will check it!

Re: PXCp_GetPagesCount

Posted: Tue Jul 28, 2015 5:08 pm
by Will - Tracker Supp
:)