This was just discussed earlier in this list. The importer does NOT respect Optional Content Groups (aka "layers"). You would need to write a bunch of code inside of iText to deal with them - either bringing them over or stripping them out.
Leonard -----Original Message----- From: Segev, Eli [mailto:[email protected]] Sent: Tuesday, July 13, 2010 4:38 PM To: Post all your questions about iText here Subject: [iText-questions] Showing Invisible Layrers I use the following code to add PDF images to a PDF page: import com.itextpdf.text.*; import com.itextpdf.text.pdf.*; String file = ... PdfReader reader = new PdfReader(file); PdfImportedPage page = writer.getImportedPage(reader, 1); Image img = Image.getInstance(page); When I use a particular multi-layer PDF file, the invisible layers become visible in the result image. Is there any trick to keep the invisible layers invisible? ------------------- Eli Segev ------------------------------------------------------------------------------ This SF.net email is sponsored by Sprint What will you do first with EVO, the first 4G phone? Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first _______________________________________________ iText-questions mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://www.itextpdf.com/book/ Check the site with examples before you ask questions: http://www.1t3xt.info/examples/ You can also search the keywords list: http://1t3xt.info/tutorials/keywords/ ------------------------------------------------------------------------------ This SF.net email is sponsored by Sprint What will you do first with EVO, the first 4G phone? Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first _______________________________________________ iText-questions mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://www.itextpdf.com/book/ Check the site with examples before you ask questions: http://www.1t3xt.info/examples/ You can also search the keywords list: http://1t3xt.info/tutorials/keywords/
