PDFRender render not visible Optional Content Group

363 Views Asked by At

For my work, I need to translate pdf document into Image with PDFBox.

PDDocument document = PDDocument.load(new File(fileUrl));
PDFRenderer pdfRenderer=new PDFRenderer(document);
BufferedImage bim=pdfRenderer.renderImageWithDPI(page, dpi.floatValue());

My document have many optional content group that are not visible (with Acrobat Reader for example) but after rendering my image contains this ocg.

How render pdf document without render all ocg ?

0

There are 0 best solutions below