Example usage for com.lowagie.text.pdf PdfName KIDS

List of usage examples for com.lowagie.text.pdf PdfName KIDS

Introduction

In this page you can find the example usage for com.lowagie.text.pdf PdfName KIDS.

Prototype

PdfName KIDS

To view the source code for com.lowagie.text.pdf PdfName KIDS.

Click Source Link

Document

A name

Usage

From source file:it.flavianopetrocchi.jpdfbookmarks.itextbookmarksconverter.iTextBookmarksConverter.java

License:Open Source License

private static int getNumber(PdfIndirectReference indirect) {
    PdfDictionary pdfObj = (PdfDictionary) PdfReader.getPdfObjectRelease(indirect);
    if (pdfObj.contains(PdfName.TYPE) && pdfObj.get(PdfName.TYPE).equals(PdfName.PAGES)
            && pdfObj.contains(PdfName.KIDS)) {
        PdfArray kids = (PdfArray) pdfObj.get(PdfName.KIDS);
        indirect = (PdfIndirectReference) kids.getPdfObject(0);
    }/*from  w w  w . j  ava 2 s.co m*/
    return indirect.getNumber();
}