Home » pdfbox-1.1.0-src » org.apache.pdfbox.pdmodel.common » [javadoc | source]
org.apache.pdfbox.pdmodel.common
public class: PDMetadata [javadoc | source]
java.lang.Object
   org.apache.pdfbox.pdmodel.common.PDStream
      org.apache.pdfbox.pdmodel.common.PDMetadata

All Implemented Interfaces:
    COSObjectable

This class represents metadata for various objects in a PDF document.
Constructor:
 public PDMetadata(PDDocument document) 
    This will create a new PDMetadata object.
    Parameters:
    document - The document that the stream will be part of.
 public PDMetadata(COSStream str) 
    Constructor.
    Parameters:
    str - The stream parameter.
 public PDMetadata(PDDocument doc,
    InputStream str,
    boolean filtered) throws IOException 
    Constructor. Reads all data from the input stream and embeds it into the document, this will close the InputStream.
    Parameters:
    doc - The document that will hold the stream.
    str - The stream parameter.
    filtered - True if the stream already has a filter applied.
    Throws:
    IOException - If there is an error creating the stream in the document.
Method from org.apache.pdfbox.pdmodel.common.PDMetadata Summary:
exportXMPMetadata,   importXMPMetadata
Methods from org.apache.pdfbox.pdmodel.common.PDStream:
addCompression,   createFromCOS,   createInputStream,   createOutputStream,   getByteArray,   getCOSObject,   getDecodeParms,   getDecodedStreamLength,   getFile,   getFileDecodeParams,   getFileFilters,   getFilters,   getInputStreamAsString,   getLength,   getMetadata,   getPartiallyFilteredStream,   getStream,   setDecodeParms,   setDecodedStreamLength,   setFile,   setFileDecodeParams,   setFileFilters,   setFilters,   setMetadata
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.pdfbox.pdmodel.common.PDMetadata Detail:
 public XMPMetadata exportXMPMetadata() throws IOException 
    Extract the XMP metadata and create and build an in memory object. To persist changes back to the PDF you must call importXMPMetadata.
 public  void importXMPMetadata(XMPMetadata xmp) throws IOException, TransformerException 
    Import an XMP stream into the PDF document.