Dear FOP mailinglist readers,
I’ve been fighting with the Apache FOP source for a week, but I can’t solve my
problem alone…
One of the features of the application I’m writing produces a PDF, based on an
XML that follows a simple schema (header info, tables, images and text, but
nothing fancy). Generating the FO then the PDF are the easy steps. Fop does the
job marvelously. Now I need to output to the user the coordinates of bounding
boxes. Those bounding boxes must represent the placement in the PDF of the
original text within the XML. To provide an example:
If I had in my original XML ,
<text id=”xxx”>This text appears somewhere in the PDF</text>
I would want, during the XML to PDF process, to output something like
Bounding_box {id=”xxx”, x=34, y=45, w=444,h=25}
I understand this as “the original text of tag xxx is contained in the pdf in
the rectangle starting at point (34,45), of width 444, and height 25”
(if the text is split into several pages or areas, receiving a list of
rectangles would be fine)
To summarize: how can I know the position in the final PDF of the original text?
I’ve tried decorating different classes of FOP, looking at the FOTreeBuilder,
the AreaTreeParser, but failed to maintain the identifier of the original text
tags.
I’d prefer staying with release 0.95, but can also use the trunk if required.
While browsing, I thought that the accessibility features might help, but
couldn’t figure out how
http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/documentation/content/xdocs/trunk/accessibility.xml?view=markup
I thought relying on the Area Tree, but couldn’t retrieve the original id that
were set to the original XML tags.
http://wiki.apache.org/xmlgraphics-fop/AreaTreeXMLDocumentation
http://old.nabble.com/Area-Tree-Handling-to24431098.html
Thanks for any help
Igor
------------------------------------------------------------------
This e-mail and the documents attached are confidential and intended
solely for the addressee; it may also be privileged. If you receive
this e-mail in error, please notify the sender immediately and destroy it.
As its integrity cannot be secured on the Internet, the Atos Origin
group liability cannot be triggered for the message content. Although
the sender endeavours to maintain a computer virus-free network,
the sender does not warrant that this transmission is virus-free and
will not be liable for any damages resulting from any virus transmitted.
Este mensaje y los ficheros adjuntos pueden contener informacion confidencial
destinada solamente a la(s) persona(s) mencionadas anteriormente
pueden estar protegidos por secreto profesional.
Si usted recibe este correo electronico por error, gracias por informar
inmediatamente al remitente y destruir el mensaje.
Al no estar asegurada la integridad de este mensaje sobre la red, Atos Origin
no se hace responsable por su contenido. Su contenido no constituye ningun
compromiso para el grupo Atos Origin, salvo ratificacion escrita por ambas
partes.
Aunque se esfuerza al maximo por mantener su red libre de virus, el emisor
no puede garantizar nada al respecto y no sera responsable de cualesquiera
danos que puedan resultar de una transmision de virus.
------------------------------------------------------------------