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!
Is RemoveDocument effectively same as Close? |
Post Reply |
Author | |
LittleTyke
Beginner Joined: 06 Oct 11 Location: England Status: Offline Points: 1 |
Post Options
Thanks(0)
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! |
|
Ingo
Moderator Group Joined: 29 Oct 05 Status: Offline Points: 3524 |
Post Options
Thanks(0)
|
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 |
|
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