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 kralik <kr...@ijablonec.cz> on 2006/04/24 17:24:57 UTC

New problem with internal-destination in FOP Trunk

During transformation from xml and xsl to PDF, I found strange behavior of
FOP Trunk. 
FO file seems to be OK, but in result - first two links in PDF Bookmarks
(Uvod and Uvod do XML) and first two links in Content (Obsah in Czech) at
the end of the document show another place, I expected.
Maybe it's a bug.
My FO file:
http://laduska.ic.cz/diplomka/diplomkaTrunk.fo 

Any idea?

Thanks for your help, Pavel Tyl
--
View this message in context: http://www.nabble.com/New-problem-with-internal-destination-in-FOP-Trunk-t1500002.html#a4065884
Sent from the FOP - Users forum at Nabble.com.

Re: New problem with internal-destination in FOP Trunk

Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
I've just fixed the bug. I did it by adding a simple ID generator to
AreaTreeHandler that makes sure we have unique IDs for all pages.

http://svn.apache.org/viewcvs?rev=396640&view=rev

Note: If multiple intermediate format files are concatenated unchanged
to a larger PDF, the basic links will still end up wrong since the keys
generated are not globally unique, only unique within the same
AreaTreeHandler. Shouldn't be a problem for most use cases, though. Just
noting this as a reminder in case anyone stumbles on this in the future.


On 24.04.2006 18:35:26 Jeremias Maerki wrote:
> It's a bug. The problem seems to be PageViewport.getKey() which uses
> toString() to build a unique key for the page. When there are multiple
> page-sequences that generate the same page number strings, the
> uniqueness is not given anymore.
> 
> I've tried to use getPageIndex() instead but that's not good because
> setPageIndex() is set too late (after the page is generated and ready to
> be rendered). It looks like we need to find a way to generate a unique
> ID for the PageViewport. Good ideas welcome.
> 
> On 24.04.2006 17:24:57 kralik wrote:
> > 
> > During transformation from xml and xsl to PDF, I found strange behavior of
> > FOP Trunk. 
> > FO file seems to be OK, but in result - first two links in PDF Bookmarks
> > (Uvod and Uvod do XML) and first two links in Content (Obsah in Czech) at
> > the end of the document show another place, I expected.
> > Maybe it's a bug.
> > My FO file:
> > http://laduska.ic.cz/diplomka/diplomkaTrunk.fo 
> > 
> > Any idea?
> > 
> > Thanks for your help, Pavel Tyl


Jeremias Maerki


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


Re: New problem with internal-destination in FOP Trunk

Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
It's a bug. The problem seems to be PageViewport.getKey() which uses
toString() to build a unique key for the page. When there are multiple
page-sequences that generate the same page number strings, the
uniqueness is not given anymore.

I've tried to use getPageIndex() instead but that's not good because
setPageIndex() is set too late (after the page is generated and ready to
be rendered). It looks like we need to find a way to generate a unique
ID for the PageViewport. Good ideas welcome.

On 24.04.2006 17:24:57 kralik wrote:
> 
> During transformation from xml and xsl to PDF, I found strange behavior of
> FOP Trunk. 
> FO file seems to be OK, but in result - first two links in PDF Bookmarks
> (Uvod and Uvod do XML) and first two links in Content (Obsah in Czech) at
> the end of the document show another place, I expected.
> Maybe it's a bug.
> My FO file:
> http://laduska.ic.cz/diplomka/diplomkaTrunk.fo 
> 
> Any idea?
> 
> Thanks for your help, Pavel Tyl


Jeremias Maerki


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