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 > General Discussion
  New Posts New Posts RSS Feed - Is RemoveDocument effectively same as Close?
  FAQ FAQ  Forum Search   Register Register  Login Login

Is RemoveDocument effectively same as Close?

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


Joined: 06 Oct 11
Location: England
Status: Offline
Points: 1
Post Options Post Options   Thanks (0) Thanks(0)   Quote LittleTyke Quote  Post ReplyReply Direct Link To This Post Topic: Is RemoveDocument effectively same as Close?
    Posted: 06 Oct 11 at 2:53PM
I've just downloaded the Quick PDF Lite package in order to get document properties from a number of PDF files. This is how I've coded it and the results look fine:

Private Sub Command1_Click()

    Dim PDFLibrary As QuickPDFLite0725.PDFLibrary
    Dim DocID As Long
   
    Set PDFLibrary = CreateObject("QuickPDFLite0725.PDFLibrary")
    Call PDFLibrary.LoadFromFile("F:\VBCD\MAXPRO.PDF")
    DocID = PDFLibrary.SelectedDocument()
   
    Debug.Print "PDF Version: " & PDFLibrary.GetInformation(0)
    Debug.Print "Author: " & PDFLibrary.GetInformation(1)
    Debug.Print "Title: " & PDFLibrary.GetInformation(2)
    Debug.Print "Subject: " & PDFLibrary.GetInformation(3)
    Debug.Print "Keywords: " & PDFLibrary.GetInformation(4)
    Debug.Print "Creator: " & PDFLibrary.GetInformation(5)
    Debug.Print "Producer: " & PDFLibrary.GetInformation(6)
    Debug.Print "Creation date: " & PDFLibrary.GetInformation(7)
    Debug.Print "Modification date: " & PDFLibrary.GetInformation(8)
   
    Call PDFLibrary.RemoveDocument(DocID)
   
    Set PDFLibrary = Nothing

End Sub

Does that look about right as one is supposed to work with Quick PDF? In Acrobat Reader I can explicitly File/Close a PDF file when finished with, but the Quick PDF object model doesn't include a Close method. Closest I can find is RemoveDocument, for which I need to have retrieved the DocumentID.

The above code will eventually be in a loop to recurse through a number of folders, picking up PDF files found and pumping the properties data to a text file or Access database. So the loop will do:  LoadFromFile, SelectedDocument, GetInformation, and RemoveDocument continuously, only setting PDFLibrary = Nothing when all the folders have been recursed and the loop is terminated.

Thanks!

Back to Top
Ingo View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 29 Oct 05
Status: Offline
Points: 3524
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ingo Quote  Post ReplyReply Direct Link To This Post Posted: 06 Oct 11 at 9:06PM
Hi Tyke!

CreateObject does what the name is telling ...
and after this you can work on pdf-files (load, manipulate, save, ...
and .Free will destroy the object at the end and relase the memory.
In a pdf-file you can have/create more than one document and
so it's possible to remove one, too.

Cheers, Ingo
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