>The visibility of the layers is defined in the OC groups. This structure is present in the root >object of the PDF. >So you need at least copy that structure to the root of the new PDF. >(And maybe copy some more stuff, but that is a minimum requirement.)
How do you copy the structure of the PDF? Do you use the PdfReader object or the PdfImportedObject object? How do you know that the file being read has invisible layers? ------------------- Eli Segev -----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/ ------------------------------------------------------------------------------ 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/
