/** * This will create a new PDMetadata object. * * @param document The document that the stream will be part of. */ public PDMetadata( PDDocument document ) { super( document ); getCOSObject().setName( COSName.TYPE, "Metadata" ); getCOSObject().setName( COSName.SUBTYPE, "XML" ); }
/** * Constructor. Reads all data from the input stream and embeds it into the * document, this will close the InputStream. * * @param doc The document that will hold the stream. * @param str The stream parameter. * @throws IOException If there is an error creating the stream in the document. */ public PDMetadata( PDDocument doc, InputStream str) throws IOException { super( doc, str ); getCOSObject().setName( COSName.TYPE, "Metadata" ); getCOSObject().setName( COSName.SUBTYPE, "XML" ); }
/** * This will create a new PDMetadata object. * * @param document The document that the stream will be part of. */ public PDMetadata( PDDocument document ) { super( document ); getCOSObject().setName( COSName.TYPE, "Metadata" ); getCOSObject().setName( COSName.SUBTYPE, "XML" ); }
/** * This will create a new PDMetadata object. * * @param document The document that the stream will be part of. */ public PDMetadata( PDDocument document ) { super( document ); getCOSObject().setName( COSName.TYPE, "Metadata" ); getCOSObject().setName( COSName.SUBTYPE, "XML" ); }
/** * Constructor. Reads all data from the input stream and embeds it into the * document, this will close the InputStream. * * @param doc The document that will hold the stream. * @param str The stream parameter. * @throws IOException If there is an error creating the stream in the document. */ public PDMetadata( PDDocument doc, InputStream str) throws IOException { super( doc, str ); getCOSObject().setName( COSName.TYPE, "Metadata" ); getCOSObject().setName( COSName.SUBTYPE, "XML" ); }
/** * Constructor. Reads all data from the input stream and embeds it into the * document, this will close the InputStream. * * @param doc The document that will hold the stream. * @param str The stream parameter. * @throws IOException If there is an error creating the stream in the document. */ public PDMetadata( PDDocument doc, InputStream str) throws IOException { super( doc, str ); getCOSObject().setName( COSName.TYPE, "Metadata" ); getCOSObject().setName( COSName.SUBTYPE, "XML" ); }
private List<PDMetadata> getMetadata() { if (this.catalog != null) { org.apache.pdfbox.pdmodel.common.PDMetadata meta = this.catalog.getMetadata(); if (meta != null && meta.getCOSObject() != null) { List<PDMetadata> metadata = new ArrayList<>(MAX_NUMBER_OF_ELEMENTS); metadata.add(new PBoxPDMetadata(meta, Boolean.TRUE, this.document, this.flavour)); return Collections.unmodifiableList(metadata); } } return Collections.emptyList(); }