How do I generate a numbered PDF file programmatically?

This is a read only forum. It contains the most frequently asked questions about Amyuni products and licensing.
Post Reply
Dany
Amyuni Team
Posts: 113
Joined: Wed Sep 11 2002
Location: Montreal.
Contact:

How do I generate a numbered PDF file programmatically?

Post by Dany »

To generate a numbered PDF file using the PDF Converter here is what you can do:

- Install the PDF Printer (Developer version).

- Print your reports to the PDF Printer while appending them to get 1 pdf file. Samples about this are found in our technical notes freely downloadable at: http://www.amyuni.com/en/support/technotes.html

- You can use the PageCount() function of CDintf to get the number of pages in the resulting pdf file.
Dim doc As New CDIntf.Document
doc.Open "c:\temp\report.pdf"
MsgBox doc.PageCount
doc.Save "c:\temp\report.pdf"

- You can create a pdf file containing white pages with numbers at the bottom of the pages, this can be done using either the PDF Creator or by creating a Word document and printing it to the PDF Printer. You will get 'pages.pdf' by example

- The last step is to merge report.pdf to pages.pdf by using the merge function of CDintf (this is also outlined in the technical notes mentioned above).
Post Reply