import sys
import win32com.client
PDF = win32com.client.Dispatch("PDFCreatorPilot.PDFDocument4")
PDF.SetLicenseData("demo", "demo")
PDF.Compression = 1
## you may open an existing PDF, provide password if needed
PDF.Open("first.pdf", "")
## you may change document properties
oldTitle = PDF.UnicodeTitle
print "Old title is '" + oldTitle + "'"
PDF.UnicodeTitle = u"-=[ my new title ]=-"
## you may add a new page
PDF.NewPage()
fnt = PDF.AddBuiltInFont(1, 0, 0)
PDF.UseFont(fnt, 14)
PDF.ShowTextAt(30, 30, "This page came from Python.")
## you may append an existing PDF, provide password if needed
PDF.Append("second.pdf", "")
## save and open it in default PDF viewer
PDF.SaveToFile("test.pdf", 1)