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!

Debenu Quick PDF Library - PDF SDK Community Forum Homepage
Forum Home Forum Home > For Users of the Library > I need help - I can help
  New Posts New Posts RSS Feed - LoadFromFile fails
  FAQ FAQ  Forum Search   Register Register  Login Login

LoadFromFile fails

 Post Reply Post Reply
Author
Message
Betanin View Drop Down
Beginner
Beginner


Joined: 08 Nov 11
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote Betanin Quote  Post ReplyReply Direct Link To This Post Topic: LoadFromFile fails
    Posted: 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
Back to Top
Dan View Drop Down
Team Player
Team Player
Avatar

Joined: 21 Oct 11
Location: US
Status: Offline
Points: 23
Post Options Post Options   Thanks (0) Thanks(0)   Quote Dan Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
machalla View Drop Down
Beginner
Beginner


Joined: 07 Nov 11
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote machalla Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
Betanin View Drop Down
Beginner
Beginner


Joined: 08 Nov 11
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote Betanin Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
Betanin View Drop Down
Beginner
Beginner


Joined: 08 Nov 11
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote Betanin Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
Dan View Drop Down
Team Player
Team Player
Avatar

Joined: 21 Oct 11
Location: US
Status: Offline
Points: 23
Post Options Post Options   Thanks (0) Thanks(0)   Quote Dan Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
Betanin View Drop Down
Beginner
Beginner


Joined: 08 Nov 11
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote Betanin Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
AndrewC View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 08 Dec 10
Location: Geelong, Aust
Status: Offline
Points: 841
Post Options Post Options   Thanks (0) Thanks(0)   Quote AndrewC Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 11.01
Copyright ©2001-2014 Web Wiz Ltd.

Copyright © 2017 Debenu. Debenu Quick PDF Library is a PDF SDK. All rights reserved. AboutContactBlogSupportOnline Store