2

Here i want to merge two Individual A4 PDFs to A3 PDFs.The A4 PDF pages should be fit into A3 2-ups that is side by side view.

I didn't tried any code still now but before i want to know is this possible?

Note : A4 PDFs can have "N" number of pages not single page PDF.

HERE is graphical image example:

enter image description here

htshame
  • 6,599
  • 5
  • 36
  • 56
k.vinod
  • 23
  • 4

2 Answers2

1

It's well explained in these official iText examples how to achieve it:

iText7 https://github.com/itext/i7js-examples/blob/develop/src/test/java/com/itextpdf/samples/sandbox/merge/MakeBookletA3.java

iText5 https://github.com/itext/i5js-sandbox/blob/master/src/main/java/sandbox/merge/MakeBookletA3.java

The code is in Java, but there should be no problem to port the samples to C#, because the API is quite the same.

Uladzimir Asipchuk
  • 2,368
  • 1
  • 9
  • 19
1

You may concatenate two PDF documents into a single PDF document containing all A4 size pages. Then you can use MakeNUp method which is exposed by PdfFileEditor class, in order to get 1 row and 2 columns on A3 size output document. Below code snippet is basic implementation of suggested approach:

// Open first document
Document pdfDocument1 = new Document(dataDir + "PDF1.pdf");
// Open second document
Document pdfDocument2 = new Document(dataDir + "PDF2.pdf");
// Add pages of second document to the first OR vice versa
pdfDocument1.Pages.Add(pdfDocument2.Pages);
// Save concatenated output file
pdfDocument1.Save(dataDir + "Concatenate.pdf");

//Final step of organizing pages as per your requirements
PdfFileEditor editor = new PdfFileEditor();
editor.MakeNUp(dataDir + "Concatenate.pdf", dataDir + "output.pdf", 2, 1 , PageSize.A3);

For further details and information, you may visit below links:

PS: I work with Aspose as Developer Evangelist.

Farhan Raza
  • 392
  • 1
  • 8
  • Thank you Sir for a quick response... thanks so much to make post us in details and really it meets my requirement. Since i am new to this blog, i can't upvote otherwise i can upvote. – k.vinod Feb 01 '19 at 09:56
  • Aspose is license version, can you please suggest any free open source dll. – k.vinod Feb 01 '19 at 11:32
  • Thank you for your kind feedback. We are glad to know that things are working as per your requirements. However, Aspose offers a free 30 days temporary license to test the API in its full capacity. Once satisfied, you would need to purchase a license to use the API without any limitations. – Farhan Raza Feb 01 '19 at 21:00