]> source.dussan.org Git - xmlgraphics-fop.git/commit
Initial support for XMP metadata (PDF 1.4) under fo:declarations. Both xmpmeta and...
authorJeremias Maerki <jeremias@apache.org>
Fri, 17 Feb 2006 10:57:15 +0000 (10:57 +0000)
committerJeremias Maerki <jeremias@apache.org>
Fri, 17 Feb 2006 10:57:15 +0000 (10:57 +0000)
commitc939529a9baf1a9ac1d16f935e8f11c89ca77be2
tree1c6f827ad2421ba2ded81d2c8f4e15f196c9075e
parent90a82aaadad9c950b0c12c33ffb8b4d7201df286
Initial support for XMP metadata (PDF 1.4) under fo:declarations. Both xmpmeta and RDF elements can be used as root elements for XMP metadata.
Extracted DOM2SAX functionality from XMLXMLHandler into utility class since it is now reused elsewhere.
New DOMBuilderContentHandlerFactory is used to create ContentHandlers that build generic DOMs.
New DelegatingContentHandler is a convenience base class modelled after XMLFilterImpl but as passive SAX receiver. It is used by DOMBuilderContentHandlerFactory.
Refactored FOTreeBuilder. FO tree building is now in a special ContentHandler which can be replaced temporarily when handling foreign XML like SVG or XMP. Extension Elements wanting the set their own ContentHandlers (instead of using the standard FO tree building mechanism) return a non-null value in getContentHandlerFactory(). The old mechanism is still supported (MathML, Plan and Barcode4J still use that). However, SVG support is changed to use a ContentHandlerFactory.
Extension elements for xmpmeta and RDF elements making use of the new DOM build-up using ContentHandlerFactory.
XMP metadata is passed to the renderer as ExtensionAttachment to the document. Only PDFRenderer uses the XMP extension attachment at this time.
The PDFRenderer automatically builds XMP metadata based on the basic metadata information in the PDFInfo object if no explicit XMP metadata has been added to the XSL-FO document.
XMP metadata merging is not implemented because this would involve a more sophisticated XMP infrastructure. That also means that XMP metadata is not validated. It's passed into the PDF as is.
The PDF library now provides the PDFMetadata class to embed XMP metadata in PDFs version >=1.4. stream contents use a special filter list which is initially empty, so non-PDF-aware XMP readers can extract (and optionally modify) the XMP metadata.

git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@378482 13f79535-47bb-0310-9956-ffa450edef68
26 files changed:
src/java/org/apache/fop/fo/ElementMapping.java
src/java/org/apache/fop/fo/ElementMappingRegistry.java
src/java/org/apache/fop/fo/FONode.java
src/java/org/apache/fop/fo/FOTreeBuilder.java
src/java/org/apache/fop/fo/XMLObj.java
src/java/org/apache/fop/fo/extensions/svg/SVGElement.java
src/java/org/apache/fop/fo/extensions/xmp/RDFElement.java [new file with mode: 0644]
src/java/org/apache/fop/fo/extensions/xmp/RDFElementMapping.java [new file with mode: 0644]
src/java/org/apache/fop/fo/extensions/xmp/XMPConstants.java [new file with mode: 0644]
src/java/org/apache/fop/fo/extensions/xmp/XMPElementMapping.java [new file with mode: 0644]
src/java/org/apache/fop/fo/extensions/xmp/XMPMetaElement.java [new file with mode: 0644]
src/java/org/apache/fop/fo/extensions/xmp/XMPMetadata.java [new file with mode: 0644]
src/java/org/apache/fop/pdf/PDFDocument.java
src/java/org/apache/fop/pdf/PDFFactory.java
src/java/org/apache/fop/pdf/PDFFilterList.java
src/java/org/apache/fop/pdf/PDFInfo.java
src/java/org/apache/fop/pdf/PDFMetadata.java [new file with mode: 0644]
src/java/org/apache/fop/pdf/PDFRoot.java
src/java/org/apache/fop/render/pdf/PDFRenderer.java
src/java/org/apache/fop/render/ps/extensions/PSExtensionHandler.java
src/java/org/apache/fop/render/xml/XMLXMLHandler.java
src/java/org/apache/fop/util/ContentHandlerFactory.java
src/java/org/apache/fop/util/DOM2SAX.java [new file with mode: 0644]
src/java/org/apache/fop/util/DOMBuilderContentHandlerFactory.java [new file with mode: 0644]
src/java/org/apache/fop/util/DelegatingContentHandler.java [new file with mode: 0644]
status.xml