Print Page | Close Window

Showstopper! Error 401 on LoadFromFile() upon diff

Printed From: Debenu Quick PDF Library - PDF SDK Community Forum
Category: For Users of the Library
Forum Name: I need help - I can help
Forum Description: Problems and solutions while programming with the Debenu Quick PDF Library and Debenu PDF Viewer SDK
URL: http://www.quickpdf.org/forum/forum_posts.asp?TID=3682
Printed Date: 01 May 24 at 1:42AM
Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com


Topic: Showstopper! Error 401 on LoadFromFile() upon diff
Posted By: Thomas
Subject: Showstopper! Error 401 on LoadFromFile() upon diff
Date Posted: 13 Mar 19 at 4:27PM
Hello,

Problem:
I use DebenuPDFLibraryDLL1612.dll (C++ import header for MFC) and get error 401 on calling method LoadFromFile() in C++ app.

Additional info:
if I open this problematic PDF e.g. in Foxit Reader v8.3.1.21155 and just re-save it -then I LoadFromFile() can open new PDF.

Info from support (Marek Pizur)    ONE month ago and since then noting more
Hello Thomas,

the problematic PDF file header is defined as PDF-1.5.3.3
PDF ISO standard defines the header versions as PDF-1.4, PDF-1.5, PDF-1.6 etc. with no subversion numbers
So the header in this PDF is not what QPL is expecting and that is causing the issue.
We can provide fix that will be able to read even these non standard headers.
The release of the next version of QPL with this fix is planned in second half of next month(March 2019)





Replies:
Posted By: Ingo
Date Posted: 13 Mar 19 at 5:13PM
Hi Thomas,

i'm dealing over 10 years with pdf-documents and the relevant developement.
Seems to me that this can only be a "hand made pdf" ;-)
This prob i've never noticed...
So i think one of the next versions will contain the described fix.
You can implement a fix for yourself as well:
If you're opening a pdf-file like any ascii-file (try notepad). The structure is always the same. Here the first three lines:
%PDF-1.4
%âãÏÓ
1 0 obj
In your case there will be...
%PDF-1.5.3.3
...in the first line.
Change this to...
%PDF-1.5
...save again and the load should work.

Cheers and welcome here,
Ingo




-------------
Cheers,
Ingo



Posted By: Thomas
Date Posted: 13 Mar 19 at 5:40PM
Hi Ingo,

thanks for your proposal BUT this can't be in real life.
Because many of such problematic pdfs are automatically processed by software from me via QPL and exactly these ALL generate 401-error

BTW:
ALL these problematic PDFs are generated by
TCPDF 4.5.018 (http://www.tcpdf.org)

Thomas


Posted By: Ingo
Date Posted: 13 Mar 19 at 9:02PM
so you should go on
http://www.tcpdf.org
telling there that these strange pdf-spec-numbering isn't valid regarding the pdf-specs ;-)
I've never heard from tcpdf before...
My proposal is for real life:
Programmatically read in the pdf into a string or stream...
Check the pdf-numbering...
Change the number if necessary...
Then with QuickPDF the LoadFromStream or LoadFromString.
I don't see the probs you're seeing doing it this way ;-)
The future fix from Debenu/Foxit will (have to be) very similar.



-------------
Cheers,
Ingo




Print Page | Close Window

Forum Software by Web Wiz Forums® version 11.01 - http://www.webwizforums.com
Copyright ©2001-2014 Web Wiz Ltd. - http://www.webwiz.co.uk