/** * Use this method to set a collection of optional content groups * whose states are intended to follow a "radio button" paradigm. * That is, the state of at most one optional content group * in the array should be ON at a time: if one group is turned * ON, all others must be turned OFF. * @param document the <CODE>PdfDocument</CODE> * @param group the radio group */ public static void addOCGRadioGroup(PdfDocument document, List<PdfLayer> group) { document.getCatalog().getOCProperties(true).addOCGRadioGroup(group); }
private PdfOCProperties fetchOCProperties() { return getDocument().getCatalog().getOCProperties(true); } }
/** * Creates a new layer by its name and document. * @param name the layer name * @param document the PdfDocument which the layer belongs to */ public PdfLayer(String name, PdfDocument document) { this(document); setName(name); document.getCatalog().getOCProperties(true).registerLayer(this); }
/** * Creates a title layer. A title layer is not really a layer but a collection of layers * under the same title heading. * @param title the title text * @param document the <CODE>PdfDocument</CODE> * @return the title layer */ public static PdfLayer createTitle(String title, PdfDocument document) { PdfLayer layer = createTitleSilent(title, document); document.getCatalog().getOCProperties(true).registerLayer(layer); return layer; }
tryFlushTagStructure(true); if (catalog.isOCPropertiesMayHaveChanged() && catalog.getOCProperties(false).getPdfObject().isModified()) { catalog.getOCProperties(false).flush(); catalog.getPdfObject().put(PdfName.OCProperties, catalog.getOCProperties(false).getPdfObject()); catalog.getOCProperties(false).flush();