Hi Fop developers,

I'm using FOP to produce PDFs and I'm trying to embed XMP (a set of XML
metadata-describing vocabularies "from" Adobe) in FO. These XMP packets
should be serialized (nearly) one-to-one in a PDF tag for metadata.
Here is an simple example:

<fo:page-sequence master-reference="default-page">
 <x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="XMP toolkit 2.9-9, framework
1.6">
  <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns";>
   <rdf:Description rdf:about="autodoc:tiff:c:/sample_path/sample.tiff"
xmlns:xmpMM="http://ns.adobe.com/xap/1.0/mm/";>
    <xmpMM:DocumentID>uuid:foo:id-0815</xmpMM:DocumentID>
   </rdf:Description>
  </rdf:RDF>
 </x:xmpmeta>
 <fo:flow flow-name="xsl-region-body">

 [...]

</fo:page-sequence>

This XMP metadata says that the generated PDF "page sequence" is made of the
sample.tiff.

Serialized to PDF it should look something like:
(the best would be only for the first page of the TIFF page sequence)

7 0 obj
<< /Type /Metadata /Subtype /XML /Length 541 >>stream
<?xpacket begin="" id="W5M0MpCehiHzreSzNTczkc9d"?><x:xmpmeta
xmlns:x="adobe:ns:meta/" x:xmptk="XMP toolkit 2.9-9, framework 1.6"><rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns";><rdf:Description
rdf:about="autodoc:tiff:c:/sample_path/sample.tiff"
xmlns:xmpMM="http://ns.adobe.com/xap/1.0/mm/";><xmpMM:DocumentID>uuid:foo:id-
0815</xmpMM:DocumentID></rdf:Description></rdf:RDF></x:xmpmeta><?xpacket
end="w"?>
endstream
endobj

Now my challenge: How can I do this as simple as possible. I tried to extend
the FOP sources but permanently get lost, while searching how the FObjs of
the FOTree get ready for the List of PDF objects to be rendered.

The problem is not the knowledge about XSL-FO nor PDF. I just don't have a
view through the FOP sources. With which things do I have to start to embed
the so-called foreign XML? I tried XMLObj but only got an "[ERROR] null".

Thanks in advance for your responce!

Bye,
        Victor

Reply via email to