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 - Output PDF file handle not getting released
  FAQ FAQ  Forum Search   Register Register  Login Login

Output PDF file handle not getting released

 Post Reply Post Reply
Author
Message
bob123 View Drop Down
Beginner
Beginner
Avatar

Joined: 07 Sep 07
Location: Liechtenstein
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote bob123 Quote  Post ReplyReply Direct Link To This Post Topic: Output PDF file handle not getting released
    Posted: 14 Sep 09 at 5:48PM
 
Am using the QuickPDF library to generate thumbnail in VB.NET/VS2008/.NET2.0. Code below.
 
After thumbnail is created when user tries to view the actual pdf file ... many a times am getting the message from Adobe PDF Reader "There was an error opening this document. This file is already open or in use by another application.". Sounds like the QuickPDF library is not releasing the file-handle.
 
Question: Is their anyway to dispose of the QuickPDF object guaranteed .. this way the adobe reader will get a clean read. Thanks@
 

' Create Image using QuickPDF
Dim QP As QuickPDFAX0715.PDFLibrary
Dim Result As Integer
Dim lngFileHandle As Long
Dim pageRef As Long
Dim imageConversionResult As Integer
QP = New QuickPDFAX0715.PDFLibrary
Result = QP.UnlockKey("license-key")
lngFileHandle = QP.DAOpenFile("C:\my.pdf", "")
pageRef = QP.DAFindPage(lngFileHandle, 1)
imageConversionResult = QP.DARenderPageToFile(lngFileHandle, pageRef, 5, 75, "C:\my.png")
QP = Nothing
 


Edited by bob123 - 14 Sep 09 at 5:58PM
Back to Top
Michel_K17 View Drop Down
Newbie
Newbie
Avatar
www.exp-systems.com

Joined: 25 Jan 03
Status: Offline
Points: 297
Post Options Post Options   Thanks (0) Thanks(0)   Quote Michel_K17 Quote  Post ReplyReply Direct Link To This Post Posted: 15 Sep 09 at 2:47AM
Hi,

   Not sure it will fix the problem, but this is the way I code my application:

   - DAOpenFile
   - Do stuff
   - DACloseFile

   Not surprisingly (from the instructions), DACLoseFile "Closes a file that was originally opened using the DAOpenFile function" and I suspect will release the filehandle (since I am not having the problem you are describing).

   Cheers!

Michel
Back to Top
bob123 View Drop Down
Beginner
Beginner
Avatar

Joined: 07 Sep 07
Location: Liechtenstein
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote bob123 Quote  Post ReplyReply Direct Link To This Post Posted: 15 Sep 09 at 2:15PM
 
That was it! ... QuickPDF library is good .. just wish they had more samples
Back to Top
deabrew View Drop Down
Newbie
Newbie
Avatar

Joined: 19 Jan 09
Status: Offline
Points: 43
Post Options Post Options   Thanks (0) Thanks(0)   Quote deabrew Quote  Post ReplyReply Direct Link To This Post Posted: 15 Sep 09 at 2:34PM
Thanks, agreed .... they're on their way. 
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