Example usage for org.apache.pdfbox.cos COSName STRUCT_PARENT

List of usage examples for org.apache.pdfbox.cos COSName STRUCT_PARENT

Introduction

In this page you can find the example usage for org.apache.pdfbox.cos COSName STRUCT_PARENT.

Prototype

COSName STRUCT_PARENT

To view the source code for org.apache.pdfbox.cos COSName STRUCT_PARENT.

Click Source Link

Usage

From source file:org.apache.fop.render.pdf.pdfbox.StructureTreeMerger.java

License:Apache License

private void updateStructParentAndAddToPageParentTree(PDFReference obj, PDFStructElem elem) {
    int nextParentTreeKey = logicalStructHandler.getNextParentTreeKey();
    if (obj != null) {
        PDFObject referenceObj = obj.getObject();
        assert referenceObj instanceof PDFDictionary;
        PDFDictionary objDict = (PDFDictionary) referenceObj;
        objDict.put((COSName.STRUCT_PARENT).getName(), nextParentTreeKey);
    }//from w w  w. ja va2  s  .  c  o m

    logicalStructHandler.getParentTree().addToNums(nextParentTreeKey, elem);
}