Hi All, Am using "itext-5.5.8", trying to insert two pages of portrait pdf into a main pdf document, code works perfect but after inserting portrait pages automatically changes to landscape pages, don't know why?
***************************************************************** try { PdfReader firstPdf = new PdfReader(mainFileWithPath); //main doc PdfReader secondPdf =new PdfReader(addFileNameWithPath); // inserting pages PdfStamper stamp = new PdfStamper(firstPdf, new FileOutputStream(outputPDFFile)); int totalNumOfPagesToInsert = secondPdf.getNumberOfPages(); int i =1; while (i<=totalNumOfPagesToInsert) { // Get a page(s) from secondPdf with the given pageNo PdfImportedPage page = stamp.getImportedPage(secondPdf,i); // insert new page in to the newly created pdf at specified page number. stamp.insertPage(INSERT_AT_PAGE_NO + (i-1), secondPdf.getPageSize(i)); // copy the content of the page copied from secondPdf. stamp.getUnderContent(INSERT_AT_PAGE_NO + (i-1)).addTemplate(page, 0, 0); i++; } //close the new created pdf. stamp.close(); **************************************************************** Please give me directions to fix this! Thanks -- View this message in context: http://itext.2136553.n4.nabble.com/why-does-portrait-page-changes-to-landscape-page-automatically-after-inserting-pdf-using-iText-tp4661023.html Sent from the iText mailing list archive at Nabble.com. ------------------------------------------------------------------------------ Find and fix application performance issues faster with Applications Manager Applications Manager provides deep performance insights into multiple tiers of your business applications. It resolves application problems quickly and reduces your MTTR. Get your free trial! http://pubads.g.doubleclick.net/ gampad/clk?id=1444514301&iu=/ca-pub-7940484522588532 _______________________________________________ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions iText(R) is a registered trademark of 1T3XT BVBA. Many questions posted to this list can (and will) be answered with a reference to the iText book: http://www.itextpdf.com/book/ Please check the keywords list before you ask for examples: http://itextpdf.com/themes/keywords.php