How to get resource names for optional content group in a pdf?
问题 I am trying to implement functionality to allow user to add markups to existing layers in a pdf. Here is the code that I am using to draw lines on to a layer in a pdf: PDResources resources = page.findResources(); PDPropertyList props = resources.getProperties(); COSName resourceName = getLayerResourceName("Superimposed3", resources, props); PDPageContentStream cs1 = new PDPageContentStream(document, page, true, false); cs1.beginMarkedContentSequence(COSName.OC, resourceName); cs1