Hi,
I am trying to merge multiple DPLX files and PDF's into one single file using VB.net. I was wondering if you can give me an example of how I would go about doing this.
Thanks
Merging DPLX
Re: Merging DPLX
Support · Mar 21, 2007Hello,
You can merge multiple PDF documents and the dplx files into a single PDF document without any problem. You can use the overloaded Run method which takes the document object in order to make a single PDF using multiple dplx files.
Dim report As New DocumentLayout("C:\Temp\ReportA.dplx")
Dim report1 As New DocumentLayout("C:\Temp\ReportB.dplx")
Dim document As Document = report.Run()
report1.Run(document)
You can merge the existing PDF documents using the Append method of the MergeDocument object.
Dim mergeDoc as new MergeDocument()
mergeDoc.Append("C:\Temp\DocumentA.pdf")
In order to merge the dplx files to existing PDF documents you can use the MergeDocument object in stead of the document in the Run method.
report.Run( mergeDoc )
report1.Run( mergeDoc )
You can save this merge document to the disk.
mergeDoc.Draw("C:\Temp\FinalDocument.pdf")
Thanks,
ceTe Software Support Team.
Re: Merging DPLX
Forum member · Mar 21, 2007In addition to this, I would like to place certain PDFs and DPLX files in specific page locations. Can you give me an example of how to do that?
thanks,
Tony
Re: Merging DPLX
Support · Mar 21, 2007Hello Tony,
Yes, you can place pages of the existing PDF documents in a specific location on another page by using the ImportedPage class. You can use ImportedPageData, or ImportedPageArea also. You can refer to the Placing Imported Pages
topic on our help documentation.
Also you can use a PdfPage to import pages. When importing pages from the PDF generated from the dplx you will have to save the PDF as a stream using the Draw method and use this sream object to create a PdfDocument object. You can get a PdfPage from this PdfDocument and use this PdfPage to import the Pages. You can refer to the Importing Pages
topic on our help documentation.
Thank,
ceTe Software Support Team.