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 Barry Hansen <bh...@imany.com> on 2002/09/04 20:15:12 UTC

Offset hotspot to fo:basic-link text

Yet another item I've been playing with without coming to resolution:

I have used fop per the example (I thought) to add internal links to the
document where appropriate. The actual hotspot and the text are offset from
one another. The hotspot works wonderfully and jumps to exactly the right ID
in the document.

My block looks like this:

<fo:table-cell 
	font-family="sans-serif" 
	font-size="8pt" 
	border-style="solid" 
	border-width="0.25pt" 
	border-color="black" 
	padding-start="2.5pt" 
	padding-end="2.5pt" 
	padding-before="4.5pt" 
	padding-after="4.5pt" 
	text-align="left" 
	vertical-align="top" 
	keep-together="always">
	<fo:block>
		<fo:basic-link color="blue"
internal-destination="309-C9">3Ã~9-C9</fo:basic-link>
	</fo:block>
</fo:table-cell>

Incidentally, the Ã~ translates to a slashZero when pdf'd. In the case of
this example, the hotspot appears about 1/2 line above the text. In some
other extreme cases, the hotspot is about 2" higher than the text.

Any suggestions for my little problem? Any samples required?

Thanks,
Barry Hansen
I-many, Inc.

RE: Offset hotspot to fo:basic-link text

Posted by Roland Neilands <rn...@pulsemining.com.au>.
> > For me the hotspots appear several inches lower, on the
> left side of the
> > page (not even in line with the actual link). No padding &
> not in table
> > cells, just an abs. positioned block-container. I raised a
> bug on this a
> > while ago.
>
> Yeah.
> Don't use basic-link in static content
> Don't use basic-link in absolutely positioned
> block-containers
> Don't use basic-link within elements with padding
> (doesn't matter whether blocks or table-cells or whatever)
> Don't use basic-link within lists in tables
> Don't use basic-link with hyphenation (fixed for the upcoming
> maintenance release)
> Don't use basic-link around external graphics, page numbers
> or page number citations.
>
> That's not necessarily complete. Fortunately, other
> complications like relative position, aligning within
> lines and varying line heigts are not implemented at
> all.
>
> J.Pietschmann

Hmmm.
<jaded cynicism>The really lucky thing is that the hotspots are so far away
they will probably never be noticed as links at all so it won't even look
like a bug.</jaded cynicism>


Re: Offset hotspot to fo:basic-link text

Posted by "J.Pietschmann" <j3...@yahoo.de>.
Roland Neilands wrote:
> For me the hotspots appear several inches lower, on the left side of the
> page (not even in line with the actual link). No padding & not in table
> cells, just an abs. positioned block-container. I raised a bug on this a
> while ago.

Yeah.
Don't use basic-link in static content
Don't use basic-link in absolutely positioned
block-containers
Don't use basic-link within elements with padding
(doesn't matter whether blocks or table-cells or whatever)
Don't use basic-link within lists in tables
Don't use basic-link with hyphenation (fixed for the upcoming
maintenance release)
Don't use basic-link around external graphics, page numbers
or page number citations.

That's not necessarily complete. Fortunately, other
complications like relative position, aligning within
lines and varying line heigts are not implemented at
all.

J.Pietschmann


RE: Offset hotspot to fo:basic-link text

Posted by Roland Neilands <rn...@pulsemining.com.au>.
> Barry Hansen wrote:
> > In the case of
> > this example, the hotspot appears about 1/2 line above the
> text. In some
> > other extreme cases, the hotspot is about 2" higher than the text.
> >
> This is a known problem due to the somewhat odd implementation
> of link hotspot placing. It has probably something to do
> with the padding which is not take into account, try to use
> space-before/after and start-indent/end-indent on the block
> in the cell rather than padding on the table cell.
>
> J.Pietschmann

For me the hotspots appear several inches lower, on the left side of the
page (not even in line with the actual link). No padding & not in table
cells, just an abs. positioned block-container. I raised a bug on this a
while ago.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=7815
as did someone else:
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=9885

Cheers,
Roland.


Re: Offset hotspot to fo:basic-link text

Posted by "J.Pietschmann" <j3...@yahoo.de>.
Barry Hansen wrote:
> In the case of
> this example, the hotspot appears about 1/2 line above the text. In some
> other extreme cases, the hotspot is about 2" higher than the text.
> 
This is a known problem due to the somewhat odd implementation
of link hotspot placing. It has probably something to do
with the padding which is not take into account, try to use
space-before/after and start-indent/end-indent on the block
in the cell rather than padding on the table cell.

J.Pietschmann