Imports System Imports System.IO Imports System.Drawing.Printing Imports System.Drawing Imports System.Configuration Imports System.Threading Imports Acrobat Dim AcroApp As CAcroApp Dim AVDoc As CAcroAVDoc Dim PDDoc As CAcroPDDoc Dim IsSuccess As Boolean Dim FileName As String Dim Path As String AcroApp = CreateObject("AcroExch.App") AVDoc = CreateObject("AcroExch.AVDoc") FileName = "C:\Test.TIF" Path = "C:/PdfConvert" Call AVDoc.Open(FileName, "") AVDoc = AcroApp.GetActiveDoc If AVDoc.IsValid Then PDDoc = AVDoc.GetPDDoc ' Fill in pdf properties. PDDoc.SetInfo("Title", "My Title") PDDoc.SetInfo("Author", "The Author") PDDoc.SetInfo("Subject", "The Subject") PDDoc.SetInfo("Keywords", "Keywords") If PDDoc.Save(1 Or 4 Or 32, _ Path & "\pdf\convertedfile.pdf") <> True Then MsgBox("Failed to save " & FileName) End If PDDoc.Close() End If 'Close the PDF AVDoc.Close(True) AcroApp.Exit() 'Cleanup PDDoc = Nothing AVDoc = Nothing AcroApp = Nothing
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)