org.apache.pdfbox.pdmodel.common
public class PDMetadata extends PDStream
Constructor and Description |
---|
PDMetadata(COSStream str)
Constructor.
|
PDMetadata(PDDocument document)
This will create a new PDMetadata object.
|
PDMetadata(PDDocument doc,
java.io.InputStream str,
boolean filtered)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
org.apache.jempbox.xmp.XMPMetadata |
exportXMPMetadata()
Extract the XMP metadata and create and build an in memory object.
|
void |
importXMPMetadata(org.apache.jempbox.xmp.XMPMetadata xmp)
Import an XMP stream into the PDF document.
|
addCompression, createFromCOS, createInputStream, createOutputStream, getByteArray, getCOSObject, getDecodedStreamLength, getDecodeParms, getFile, getFileDecodeParams, getFileFilters, getFilters, getInputStreamAsString, getLength, getMetadata, getPartiallyFilteredStream, getStream, setDecodedStreamLength, setDecodeParms, setFile, setFileDecodeParams, setFileFilters, setFilters, setMetadata
public PDMetadata(PDDocument document)
document
- The document that the stream will be part of.public PDMetadata(PDDocument doc, java.io.InputStream str, boolean filtered) throws java.io.IOException
doc
- The document that will hold the stream.str
- The stream parameter.filtered
- True if the stream already has a filter applied.java.io.IOException
- If there is an error creating the stream in the document.public PDMetadata(COSStream str)
str
- The stream parameter.public org.apache.jempbox.xmp.XMPMetadata exportXMPMetadata() throws java.io.IOException
java.io.IOException
- If there is an error parsing the XMP data.public void importXMPMetadata(org.apache.jempbox.xmp.XMPMetadata xmp) throws java.io.IOException, javax.xml.transform.TransformerException
xmp
- The XMP data.java.io.IOException
- If there is an error generating the XML document.javax.xml.transform.TransformerException
- If there is an error generating the XML document.