Segev, Eli wrote: > I am adding a PDF image to a PDF cell. The PDF image is created with > this code: > > String file = … > > PDFWriter writer = …. > > PdfReader reader = new PdfReader(file); > > PdfImportedPage page = writer.getImportedPage(reader, 1); > > com.lowagie.text.Image img = > com.lowagie.text.Image.getInstance(page); > > PdfPCell iCell = new PdfPCell(img, false); > > The PDF file pointed by ‘file’ has some invisible layers that get shown > in the PDF cell. How can I prevent this? I want invisible layers to be > invisible.
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.) -- This answer is provided by 1T3XT BVBA http://www.1t3xt.com/ - http://www.1t3xt.info ------------------------------------------------------------------------------ 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/
