Search in sources :

Example 1 with PDMetadata

use of com.tom_roush.pdfbox.pdmodel.common.PDMetadata in project PdfBox-Android by TomRoush.

the class PDPage method getMetadata.

/**
 * Get the metadata that is part of the document catalog. This will return null if there is
 * no meta data for this object.
 *
 * @return The metadata for this object.
 */
public PDMetadata getMetadata() {
    PDMetadata retval = null;
    COSBase base = page.getDictionaryObject(COSName.METADATA);
    if (base instanceof COSStream) {
        retval = new PDMetadata((COSStream) base);
    }
    return retval;
}
Also used : COSStream(com.tom_roush.pdfbox.cos.COSStream) COSBase(com.tom_roush.pdfbox.cos.COSBase) PDMetadata(com.tom_roush.pdfbox.pdmodel.common.PDMetadata)

Aggregations

COSBase (com.tom_roush.pdfbox.cos.COSBase)1 COSStream (com.tom_roush.pdfbox.cos.COSStream)1 PDMetadata (com.tom_roush.pdfbox.pdmodel.common.PDMetadata)1