org.apache.fop.pdf

Class PDFMetadata

Implemented Interfaces:
PDFWritable

public class PDFMetadata
extends PDFStream

Special PDFStream for Metadata.
Since:
PDF 1.4

Field Summary

Fields inherited from class org.apache.fop.pdf.PDFStream

data

Fields inherited from class org.apache.fop.pdf.PDFDictionary

entries, order

Fields inherited from class org.apache.fop.pdf.PDFObject

DATE_FORMAT, log

Constructor Summary

PDFMetadata(Metadata xmp, boolean readOnly)

Method Summary

static Metadata
createXMPFromPDFDocument(PDFDocument pdfDoc)
Creates an XMP document based on the settings on the PDF Document.
Metadata
getMetadata()
protected int
output(java.io.OutputStream stream)
overload the base object method so we don't have to copy byte arrays around so much
protected void
outputRawStreamData(OutputStream out)
protected void
populateStreamDict(Object lengthEntry)
protected void
setupFilterList()
static void
updateInfoFromMetadata(Metadata meta, PDFInfo info)
Updates the values in the Info object from the XMP metadata according to the rules defined in PDF/A-1 (ISO 19005-1:2005)

Methods inherited from class org.apache.fop.pdf.PDFStream

add, getBufferOutputStream, getDataLength, getSizeHint, output, outputRawStreamData, setData

Methods inherited from class org.apache.fop.pdf.AbstractPDFStream

encodeAndWriteStream, encodeStream, getFilterList, getSizeHint, output, outputRawStreamData, outputStreamData, populateStreamDict, prepareImplicitFilters, setupFilterList

Methods inherited from class org.apache.fop.pdf.PDFDictionary

get, output, put, put, writeDictionary

Methods inherited from class org.apache.fop.pdf.PDFObject

encode, encodeBinaryToHexString, encodeString, encodeText, formatDateTime, formatDateTime, formatObject, getDocument, getDocumentSafely, getGeneration, getObjectID, getObjectNumber, getParent, hasObjectNumber, makeReference, output, outputInline, referencePDF, setDocument, setObjectNumber, setParent, toPDF, toPDFString

Constructor Details

PDFMetadata

public PDFMetadata(Metadata xmp,
                   boolean readOnly)

Method Details

createXMPFromPDFDocument

public static Metadata createXMPFromPDFDocument(PDFDocument pdfDoc)
Creates an XMP document based on the settings on the PDF Document.
Parameters:
pdfDoc - the PDF Document
Returns:
the requested XMP metadata

getMetadata

public Metadata getMetadata()
Returns:
the XMP metadata

output

protected int output(java.io.OutputStream stream)
            throws java.io.IOException
overload the base object method so we don't have to copy byte arrays around so much

outputRawStreamData

protected void outputRawStreamData(OutputStream out)
            throws IOException
Overrides:
outputRawStreamData in interface PDFStream

populateStreamDict

protected void populateStreamDict(Object lengthEntry)
Overrides:
populateStreamDict in interface AbstractPDFStream

setupFilterList

protected void setupFilterList()
Overrides:
setupFilterList in interface AbstractPDFStream

updateInfoFromMetadata

public static void updateInfoFromMetadata(Metadata meta,
                                          PDFInfo info)
Updates the values in the Info object from the XMP metadata according to the rules defined in PDF/A-1 (ISO 19005-1:2005)
Parameters:
meta - the metadata
info - the Info object

Copyright 1999-2008 The Apache Software Foundation. All Rights Reserved.