I am trying to merge 3 pdf files.On First and second pdf's am getting
reader.getPageRotation(i) == 90 and on the third pdf file am getting
reader.getPageRotation(i) == 0.
I am setting document pageSize based on
pdfDocument.setPageSize(reader.getPageSizeWithRotation(pageNo));
My problem is, while merging all the pdf into one pdf, am seeing the size
of first page of 3rd pdf on merged document to be in landscape mode where as
all the remaing pages in 3rd pdf are in potrait.
I am not sure why this is happening for the first page of 3rd pdf? I expect
to be potrait mode.
appox code below.
pdfDocument.setPageSize(reader.getPageSizeWithRotation(pageNo));
pdfDocument.newPage();
PdfImportedPage page = writer.getImportedPage(reader, i);
if (rotation == 90 || rotation == 270) {
Image image = Image.getInstance(page);
image.setRotation((float) Math.toRadians(360 - rotation));
pdfDocument.add(image);
}else {
Image image = Image.getInstance(page);
image.scalePercent(100);
image.setAbsolutePosition(0,0);
pdfDocument.add(image);
}
--
View this message in context:
http://www.nabble.com/problem-with-page-rotation-and-page-size-tf3836461.html#a10862295
Sent from the iText - General mailing list archive at Nabble.com.
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/