Previous | Next | (P-PDF) Developers
Topic: Re: Merging and sorting two pdf files
Conf: (P-PDF) Developers, Msg: 32758
From: mletterman
Date: 1/14/2002 08:39 AM
Hi,
If you are searching the way to merge 2 pdf files into 1 pdf file with visual basic, I can help you if you are looking for that.
It looks a bit like this:(I copied the most important piece of the source, im not that good programmer yet, so I guess it can be programmed better, but it works at least:-)
Dim AcroPDDoc As CAcroPDDoc
Dim PDDoc As CAcroPDDoc
Set AcroPDDoc = CreateObject("AcroExch.PDDoc")
b = AcroPDDoc.Open(strDestinationDir & "\" & strCheckfilenaam)
Dim intAantal1 As Integer
intAantal1 = AcroPDDoc.GetNumPages
Set PDDoc = CreateObject("AcroExch.PDDoc")
b = PDDoc.Open(strPDFOutputDir & "\" & File2.List(0))
Dim intAantal2 As Integer
intAantal2 = PDDoc.GetNumPages
b = AcroPDDoc.InsertPages(intAantal1 - 1, PDDoc, 0, intAantal2, False)
b = AcroPDDoc.Save(1, strDestinationDir & "\" & strfilenaam)
Cya
Marco