Optional content (PDF 1.5) refers to sub-clauses of content in a PDF document that can be selectively viewed or hidden by document authors or consumers. This capability is useful in items such as CAD drawings, layered artwork, maps, and multi-language documents. Optional content groups often also are called "layers".
Questions tagged [ocg]
17 questions
0
votes
0 answers
How to add an annotations and markups to an existing layer(optional content group) in a pdf?
I am able to add a layer(optional content group) to a pdf using LayerUtility class in pdfbox library. But, I am not able to find any way to add annotations to an existing layer. I tried to convert the PDOptionalContentGroup to PDPage by first…

V K
- 1,645
- 3
- 26
- 57
0
votes
0 answers
How to hide layers when merging multiple pdf documents
I'm using iText 5 to fill existing pdf forms with content and then merge them into a single pdf. I also want to turn on/off layers, but after merging all layers are visible.
This code shows the problem without using existing pdf forms. I would like…

Jonas Mellberg
- 1
- 1