Merge/Embed two PDF pages into one PDF page

Hi,


Trying to concatenate two PDF pages horizontally on one PDF page but all that I can find is concatenating one page after another.

For example:

First file is 8.5x11 PDF with 1 page called “file1.pdf”.
Second file is 8.5x11 PDF with 1 page called “file2.pdf”.

The process is to create a new document with 1 page. The page size is 24x12. On this page, the left side would be page 1 from file1.pdf scaled to cover the first 12". On the right side of this page would be page 1 from file2.pdf scaled to 12" to cover the right side of the page.

Was able to achieve this using ConvertPDFToImage then placing the contents in the proper area of the page using ConcatenateMatrix but want the actual contents of the PDF and not an image representation.

Have used Active PDF in the past and they had a method called StitchPDF that achieved this.

Thanks in advance

Hi Jerry,

Thanks for your inquiry. You can easily achieve your requirements in two steps using Aspose.Pdf. Initially concatenate your source PDF files and later use MakeNUp() method to move pages horizontally. You can use different parameter values to define number of pages rows/columns and page size. Please check following documentation link for the purpose.

Please feel free to contact us for any further assistance.

Best Regards,

Thanks, that definitely helps with the horizontal merge and resolves my current issue.


For future reference, is there a way to overlay a page over another page using x/y positioning (not using imaging)? MakeNUp forces each page into its own region but could a page be positioned over another page such that the content overlaps?

Hi Jerry,


Thanks for your feedback. It is good to know that above shared information helped you to accomplish your initial requirements.

For your new requirement, you may add a PDF page as a stamp over another page. Please check following documentation link for the purpose. It will help.


Please feel free to contact us for any further assistance.

Best Regards,