Do you own a Debenu Quick PDF Library version 7, 8, 9, 10, 11, 12, 13 or iSEDQuickPDF license? Upgrade to Debenu Quick PDF Library 14 today!
![]() |
LoadFromFile Hanging |
Post Reply
|
| Author | |
mcourt
Beginner
Joined: 15 Aug 15 Status: Offline Points: 2 |
Post Options
Thanks(0)
Quote Reply
Topic: LoadFromFile HangingPosted: 15 Aug 15 at 11:34AM |
|
Delphi.
Basically, this code has been running fine, but our application hung when it came across a corrupt pdf, rather than get trapped and handled by the except block it just hangs. We know it is a bad PDF file because when we open it in Acrobat viewer we get this message: "There was an error opening this document. The file is damaged and could not be repaired." So Adobe acrobat can trap and handle it, why will the current code not trap it: //Note QP was created before and tmpfilepath has been set......as we mentioned it works fine for a good pdf file, so why do we not get the BADFile message try QP.LoadFromFile(tmpFilePath); //tmpFilepath is valid and points to the pdf showmessage('OK'); except showmessage('BAD File?'); end; This is a link to the bad pdf. It is vital to be able to handle bad pdf's to allow applications to handle gracefully and keep on processing....especially in batch systems. We also tried variations of loadfromfile like if QP.LoadFromFile(tmpFilePath) = 1 if QP.LoadFromFile(tmpFilePath) = 0 But still hangs. Kind Regards Mark |
|
![]() |
|
mLipok
Senior Member
Joined: 23 Apr 14 Location: Poland, Zabrze Status: Offline Points: 453 |
Post Options
Thanks(0)
Quote Reply
Posted: 16 Aug 15 at 9:22PM |
|
Hi.
I get: ! __QPDF_ErrorNotiffy: > $iResultError = 401 > $sLastErrorDescription = Could not open input file btw. You must set password, as it is a required parameter so you have to use:
|
|
|
Here you can find description how to test my examples:
http://www.quickpdf.org/forum/forum_posts.asp?TID=2932&PID=12600&title=drawcapturedpagematrix-matrix-howto#12600 |
|
![]() |
|
Post Reply
|
|
|
Tweet
|
| Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |
Copyright © 2017 Debenu. Debenu Quick PDF Library is a PDF SDK. All rights reserved. About — Contact — Blog — Support — Online Store