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 fails |
Post Reply
|
| Author | |
Betanin
Beginner
Joined: 08 Nov 11 Status: Offline Points: 4 |
Post Options
Thanks(0)
Quote Reply
Topic: LoadFromFile failsPosted: 08 Nov 11 at 12:46PM |
|
I'm using Quick PDF to render pdf files, it was working correctly up to last week, when the function LoadFromFile stopped to work without an apparent reason. The result code is 0, when I evoke the method LastErrorCode the code is 401. I thought it was lincense, but i bought it yesterday. Someone can help me? Thanks
|
|
![]() |
|
Dan
Team Player
Joined: 21 Oct 11 Location: US Status: Offline Points: 23 |
Post Options
Thanks(0)
Quote Reply
Posted: 08 Nov 11 at 2:39PM |
|
Which language are you programming in?
To troubleshoot this I'd start with checking the return value from the UnlockKey method. If the unlock method fails code execution will continue but none of the functions will be available. I'm using the dll version of QPL in VB. Here is the code I use: Dim DLLPath As String = "D:/Bin/QuickPDFDLL.dll" Dim key As String = "your key here" Dim pdf As PDFLibrary = New PDFLibrary(DLLPath) If Not pdf.LibraryLoaded() Then Throw New Exception("QuickPDF Library Not Loaded") End If If pdf.UnlockKey(key) = 0 Then Throw New Exception("Did not unlock QuickPDF") End If Dan |
|
![]() |
|
machalla
Beginner
Joined: 07 Nov 11 Status: Offline Points: 2 |
Post Options
Thanks(0)
Quote Reply
Posted: 08 Nov 11 at 3:00PM |
|
A wild guess but perhaps you have upgraded from an older version of quickpdf to the latest V8.
LoadFromFile has changed its syntax in Version 8. You need to specify a password field for the file even if its blank. Its possible this might be the cause of the code not working if you have updated to the latest Version 8 qpdf from previous versions. http://www.quickpdflibrary.com/help/quickpdf/LoadFromFile.php |
|
![]() |
|
Betanin
Beginner
Joined: 08 Nov 11 Status: Offline Points: 4 |
Post Options
Thanks(0)
Quote Reply
Posted: 08 Nov 11 at 3:33PM |
|
Hy Dan,
I'm programming in Delphi 2009, and i'm not using DLL, but the DCU's package. The return value of UnlockKey method is 1, it works correctly, my key is valid. Have you another tip? Thanks
|
|
![]() |
|
Betanin
Beginner
Joined: 08 Nov 11 Status: Offline Points: 4 |
Post Options
Thanks(0)
Quote Reply
Posted: 08 Nov 11 at 3:37PM |
|
Hi machalla,
Unfortunatelly it can't be the problem, because I was in version 8.11 and now in 8.12. Thanks
|
|
![]() |
|
Dan
Team Player
Joined: 21 Oct 11 Location: US Status: Offline Points: 23 |
Post Options
Thanks(0)
Quote Reply
Posted: 08 Nov 11 at 4:28PM |
|
The last error code indicates it could not open the file..
Perhaps there's something corrupted or 'special' about the pdf you are trying to load? I assume you're attempting to load the same file as you were when it was working? If so, it could be something that's no longer supported in 8.12 or a bug. Good luck, Dan Edited by Dan - 08 Nov 11 at 4:28PM |
|
![]() |
|
Betanin
Beginner
Joined: 08 Nov 11 Status: Offline Points: 4 |
Post Options
Thanks(0)
Quote Reply
Posted: 08 Nov 11 at 4:42PM |
|
Hi Dan, I had checked the error code and all of your suppositions. The trouble started in version 8.11, where I made the component works correctly and another day with the same code, the same pdf file, the same component version and key stopped works. I thought it was my license wich was trial, but now that I bought the licence, the problem persist. Thanks
|
|
![]() |
|
AndrewC
Moderator Group
Joined: 08 Dec 10 Location: Geelong, Aust Status: Offline Points: 841 |
Post Options
Thanks(0)
Quote Reply
Posted: 09 Nov 11 at 1:13PM |
|
As mentioned in the official support case, this PDF is malformed and Acrobat fixes the file when it loads it. The fixed file now loads and renders correctly in QPL 8.11.
Andrew
|
|
![]() |
|
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