BCL easyPDF SDK
easyPDF SDK Usermanual
PDF Creator Programming API  |  Download Free Trial  |  Contact Us to Purchase

GetDocumentInfo Method

Gets document information from a PDF file.

Sub GetDocumentInfo([Title],
                    [Author],
                    [Subject],
                    [Keywords],
                    [Creator],
                    [Producer])

void GetDocumentInfo(out string Title,
                     out string Author,
                     out string Subject,
                     out string Keywords,
                     out string Creator,
                     out string Producer)

DocumentInfo GetDocumentInfo() throws PDFProcessorException

Where DocumentInfo is a utility class:

public class DocumentInfo
{
   public String title;
   public String author;
   public String subject;
   public String keywords;
   public String creator;
   public String producer;
}

Parameters

Return Values

N/A.

Remarks

For those who are familiar with GetDocumentInfo from the PDFProcessor object, note that this version of GetDocumentInfo from the PDFProcessorHandle object does not take an optional password argument for working with encrypted PDF files. If and when PDFProcessorHandle is enhanced to support processing of encrypted PDF files, the password required will be taken by OpenFile or OpenMem at the time the PDFProcessorHandle is obtained.

Example Usage in VBScript

Set oProcessor = CreateObject("easyPDF.PDFProcessor.8")

Set oProcessorHandle = oProcessor.OpenFile("C:\test\input.pdf", "C:\test\input.pdf")

oProcessorHandle.GetDocumentInfo Title:=sTitle, _
                                 Author:=sAuthor, _
                                 Subject:=sSubject, _
                                 Keywords:=sKeywords, _
                                 Creator:=sCreator, _
                                 Producer:=sProducer
oProcessorHandle.Close
MsgBox "Title: " + sTitle + vbLf + _
       "Author: " + sAuthor + vbLf + _
       "Subject: " + sSubject + vbLf + _
       "Keywords: " + sKeywords + vbLf + _
       "Creator: " + sCreator + vbLf + _
       "Producer:" + sProducer

Example Usage in VB.NET

Dim Title, Author, Subject, Keywords, Creator, Producer As String
Dim oProcessor As PDFProcessor = New PDFProcessor
Dim oProcessorHandle As PDFProcessorHandle = oProcessor.OpenFile("C:\test\input.pdf", "C:\test\input.pdf")
   oProcessorHandle.GetDocumentInfo(Title, _
                                    Author, _
                                    Subject, _
                                    Keywords, _
                                    Creator, _
                                    Producer)
oProcessorHandle.Close()
MessageBox.Show("Title: " + Title + vbLf + _
                "Author: " + Author + vbLf + _
                "Subject :" + Subject + vbLf + _
                "Keywords: " + Keywords + vbLf + _
                "Creator: " + Creator + vbLf + _
                "Producer :" + Producer)

Example Usage in C#

object Title = new object();
object Author = new object();
object Subject = new object();
object Keywords = new object();
object Creator = new object();
object Producer = new object();
PDFProcessor oProcessor = new PDFProcessor();
PDFProcessorHandle oProcessorHandle = oProcessor.OpenFile(@"C:\test\input.pdf", @"C:\test\input.pdf", null);
   oProcessorHandle.GetDocumentInfo(ref Title, 
                                    ref Author, 
                                    ref Subject, 
                                    ref Keywords, 
                                    ref Creator, 
                                    ref Producer);
oProcessorHandle.Close();
MessageBox.Show("Title: " + Title + 
                "\nAuthor: " + Author + 
                "\nSubject :" + Subject + 
                "\nKeywords: " + Keywords + 
                "\nCreator: " + Creator + 
                "\nProducer :" + Producer);