Hi We have a requirement to convert an existing A4 size pdf to A3 Size PDF in java. Since i am new to itext api conversion pdfs, Can anyone guide me how to do in java using itext or any other api to do. If sample reference provided then appreciable.
UPDATe: Output PDF should be in A3 booklet format.
解决方案
Please take a look at the MakeA3Booklet example.
In this example, we take an existing PDF document with 299 A4 pages (primes.pdf) and we convert it to a 150-page A3 booklet (a3_booklet.pdf):
public void manipulatePdf(String src, String dest)
throws IOException, DocumentException {
// Creating a reader
PdfReader reader = new PdfReader(src);
// step 1
Document document = new Document(PageSize.A3.rotate());
// step 2
PdfWriter writer
= PdfWriter.getInstance(document, new Fil