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 return 0 |
Post Reply ![]() |
Author | |
gcaramia ![]() Beginner ![]() Joined: 04 Oct 10 Location: Italy Status: Offline Points: 5 |
![]() ![]() ![]() ![]() ![]() Posted: 07 Oct 10 at 2:14PM |
Please,
i have no idea why LoadFromFile, sometimes returns 0. These .pdf files are generated by a Brother Scanner (may be this is the matter). They are well opened by Acrobat Reader and other readers. Here my sample code: procedure TForm1.Button1Click(Sender: TObject); var PDFLibrary: TQuickPDF0721; UnlockResult: Integer; risultato : integer; begin WebBrowser1.Navigate('c:\I300.pdf'); <<<<< I300.pdf is shown >>>>>>>>>>> PDFLibrary := TQuickPDF0721.Create; try UnlockResult := PDFLibrary.UnlockKey('mykey'); if UnlockResult = 1 then begin risultato := PDFLibrary.LoadFromFile('c:\I300.pdf'); showmessage(inttostr(risultato)); <<<<<<<<< "0" is shown >>>>>>>>>>>>>>>> PDFLibrary.SaveToFile('C:\test.pdf');<<<<<<<<< empty document >>>>>>>>>>> end else begin ShowMessage('Invalid license key'); end; finally PDFLibrary.Free; end; end; Here the I300.pdf: www.winsvetta.com/QP/I300.zip I can't figure out how can solve. Please, HELP. Thx Giovanni |
|
![]() |
|
Rowan ![]() Moderator Group ![]() ![]() Joined: 10 Jan 09 Status: Offline Points: 398 |
![]() ![]() ![]() ![]() ![]() |
Hi Giovanni,
The I300.pdf file is a malformed PDF. I opened the PDF in Acrobat and ran a "Preflight > Report PDF syntax issues" report. The report confirmed that the document is malformed with this message: "The PDF document is damaged. While Acrobat always tries to repair the document when it is opened, there is no guarantee that the document can be processed reliably." Adobe Reader, Acrobat and some other PDF viewers try to open and display PDF files even if they are malformed, but they make no guarantees that you'll actually be able to do anything else with a malformed PDF. Quick PDF Library does not attempt to repair malformed PDF files and so it cannot open this particular document. If all of the PDF files that are generated by your Brother Scanner then I would highly recommend letting them know so that they can fix this issue at the source. Cheers, - Rowan.
|
|
![]() |
|
gcaramia ![]() Beginner ![]() Joined: 04 Oct 10 Location: Italy Status: Offline Points: 5 |
![]() ![]() ![]() ![]() ![]() |
Thx Rowan
I was almost sure about Brother responsability. You confirm my hypothesis but, more, your declaration helps me to prove to customer that the malfunction is not the fault of my software. thx again Giovanni |
|
![]() |
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