Just setting pdf document properties

If you are a VB developer and have questions about using our products from VB, here is the place to post them.
Post Reply
ixm7
Posts: 14
Joined: Tue Apr 29 2003

Just setting pdf document properties

Post by ixm7 »

I need to use VB to set the document properties (title, subject, keywords, author) of existing pdf documments.

I was led to believe that using just the Common Driver Interface (cdintf210.dll) I can achieve this.

Based on the tech documentation that comes with that dll, I can see these are all simple Read/Write properties of the Document object.

However, I don't see any code or function calls that let me declare and instantiate the Document object (based on a given file path & name).

Any hints?
Joan
Amyuni Team
Posts: 2799
Joined: Wed Sep 11 2002
Contact:

Post by Joan »

Hello,

Here is a sample VB code on setting the Tiltle, subject ect... using the Document interface of CDIntfEx.
Private Sub changedocinfo_Click()

Dim pdfdoc As New CDIntfEx.Document

pdfdoc.Open ("C:\Temp\Test.pdf")
pdfdoc.Title = "Some Title"
pdfdoc.Author = "Some Author"
pdfdoc.Creator = "Some Creator"
pdfdoc.Subject = "Some Subject"
pdfdoc.Keywords = "Some Keywords"
pdfdoc.Save ("C:\Temp\NewTest.pdf")

Set pdfdoc = Nothing

End Sub
Hope this helps !
ixm7
Posts: 14
Joined: Tue Apr 29 2003

Post by ixm7 »

Many Thanks!!!

- Ido
Post Reply