Some tools produce one large PDF containing multiple documents appended to each other. In case the documents have a different ammount of pages it becomes sometimes quite a task to seperate/split the document in multiple documents. Here the function SplitPDF of the Aloaha COM Object aloahapdf.edit comes in.
SplitPDF takes a PDF, searches for the specified page seperator (for example “Kind Regards”) and then splits of the pages to save them as new document. Optional the function can be instructed to render a letterhead/watermark behind the first page of the new document.
For example:
Dim PDFObject
Dim InputPDF
Dim OutPutFolder
Dim PageSeperator
Dim Letterhead
InputPDF=”c:\Invoices.pdf”
OutPutFolder=”c:\splittedDocuments\”
PageSeperator=”Kind Regards”
Letterhead=”C:\letterhead\companyLetterhead.pdf”
set PDFObject=createobject(“aloahapdf.edit”)
call PDFObject.SplitPDF(cstr(InputPDF),cstr(OutPutFolder),cstr(PageSeperator),cstr(Letterhead))
set PDFObject=nothing
Please do not hesitate to contact us at info@aloaha.com in case you have further questions.
To email or print the resulting PDFs please have a look at http://blog.aloaha.com/2012/08/29/automatically-mail-and-print-pdf-documents/
Please also have a look at http://www.aloaha.com/software-development/freeware-apis.php
1 Trackback or Pingback for this entry
August 29th, 2012 on 1:23 pm
[...] the Aloaha COM APIs this is no problem at all since you just need to use the functions SplitPDF and AutoMailPrint of the Aloaha PDF SDK/PDF Suite [...]