You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by solomailing <so...@gmail.com> on 2008/10/29 12:41:36 UTC

areatree concat (with bookmarks)

ciao,

while trying to concat some files in areatree intermediate format (using 
somenthing like ExampleConcat.java in fop examples) all work fine if the 
source files don't contain bookmarks...

when source files have some bookmarks in the result pdf all the 
bookmarks reference the same destination...

is this a known issue or maybe i'm doing somenthing wrong?

for example if i've 3 AT file...
...all of them contain 2 pageViewport one with key=P1 and another with 
key=P2
...all of them contain a bookmark with an internal-link=(P1, myDocId)

it seems that in the result of concatenation i get 3 pageViewport with 
key=P1, 3 pageViewport with key=P2 and 3 bookmark that point to the last 
pageViewport with key=P1...
so i get something like:
<areaTree>
...
<!-- from file AT-1 -->
<pageViewport key="P1" ...>
...
<pageViewport key="P2" ...>
...
<!-- from file AT-2 -->
<pageViewport key="P1" ...>
...
<pageViewport key="P2" ...>
...
<!-- from file AT-3 -->
<pageViewport key="P1" ...>
...
<pageViewport key="P2" ...>
...
<bookmarkTree>
<bookmark internal-link="(P1, myDocId-1)" ...>
<bookmark internal-link="(P1, myDocId-2)" ...>
<bookmark internal-link="(P1, myDocId-3)" ...>
...
</areaTree>



if i edit by hand the AT files to have unique pageViewport's keys all 
bookmarks work fine...
the resulting tree become something like...
<areaTree>
...
<!-- from file AT-1 -->
<pageViewport key="P1.1" ...>
...
<pageViewport key="P1.2" ...>
...
<!-- from file AT-2 -->
<pageViewport key="P2.1" ...>
...
<pageViewport key="P2.2" ...>
...
<!-- from file AT-3 -->
<pageViewport key="P3.1" ...>
...
<pageViewport key="P3.2" ...>
...
<bookmarkTree>
<bookmark internal-link="(P1.1, myDocId-1)" ...>
<bookmark internal-link="(P2.1, myDocId-2)" ...>
<bookmark internal-link="(P3.1, myDocId-3)" ...>
...
</areaTree>







---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: areatree concat (with bookmarks)

Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
I think you describe exactly what you need to do. If I concatenate multi
FO files together into one I also have to process all IDs and make them
unique over the whole concatenated FO file. The same applies to the area
tree XML files. ExampleConcat just show you the basics. Advanced cases
like yours might need additional attention, like running the area tree
XML files through an XSLT process to make the IDs unique. There's no
code in FOP that does that for you.

On 29.10.2008 13:41:36 solomailing wrote:
> ciao,
> 
> while trying to concat some files in areatree intermediate format (using 
> somenthing like ExampleConcat.java in fop examples) all work fine if the 
> source files don't contain bookmarks...
> 
> when source files have some bookmarks in the result pdf all the 
> bookmarks reference the same destination...
> 
> is this a known issue or maybe i'm doing somenthing wrong?
> 
> for example if i've 3 AT file...
> ...all of them contain 2 pageViewport one with key=P1 and another with 
> key=P2
> ...all of them contain a bookmark with an internal-link=(P1, myDocId)
> 
> it seems that in the result of concatenation i get 3 pageViewport with 
> key=P1, 3 pageViewport with key=P2 and 3 bookmark that point to the last 
> pageViewport with key=P1...
> so i get something like:
> <areaTree>
> ...
> <!-- from file AT-1 -->
> <pageViewport key="P1" ...>
> ...
> <pageViewport key="P2" ...>
> ...
> <!-- from file AT-2 -->
> <pageViewport key="P1" ...>
> ...
> <pageViewport key="P2" ...>
> ...
> <!-- from file AT-3 -->
> <pageViewport key="P1" ...>
> ...
> <pageViewport key="P2" ...>
> ...
> <bookmarkTree>
> <bookmark internal-link="(P1, myDocId-1)" ...>
> <bookmark internal-link="(P1, myDocId-2)" ...>
> <bookmark internal-link="(P1, myDocId-3)" ...>
> ...
> </areaTree>
> 
> 
> 
> if i edit by hand the AT files to have unique pageViewport's keys all 
> bookmarks work fine...
> the resulting tree become something like...
> <areaTree>
> ...
> <!-- from file AT-1 -->
> <pageViewport key="P1.1" ...>
> ...
> <pageViewport key="P1.2" ...>
> ...
> <!-- from file AT-2 -->
> <pageViewport key="P2.1" ...>
> ...
> <pageViewport key="P2.2" ...>
> ...
> <!-- from file AT-3 -->
> <pageViewport key="P3.1" ...>
> ...
> <pageViewport key="P3.2" ...>
> ...
> <bookmarkTree>
> <bookmark internal-link="(P1.1, myDocId-1)" ...>
> <bookmark internal-link="(P2.1, myDocId-2)" ...>
> <bookmark internal-link="(P3.1, myDocId-3)" ...>
> ...
> </areaTree>
> 
> 
> 
> 


Jeremias Maerki


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org