xmlgraphics-fop-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeremias Maerki <dev.jerem...@greenmail.ch>
Subject Re: Interactive basic-link
Date Mon, 02 May 2005 06:22:55 GMT

On 02.05.2005 07:59:29 Richard Zschech wrote:
> ( Sorry firefox pasted a link from javadoc into the previous email  :-[  )
> I'm trying to implement a simple fo reader and am having trouble finding 
> information about the links with in a document. I'm using 1.0dev and the 
> Java2DRenderer developed for bug 33760 [1].  I would like to be able to:
> Given a mouse position, find the basic-links under it.
> Given an id-ref from a uri fragment or internal link, find the page and 
> position on the page for the element with that id.
> I have found the method AreaTreeHandler.getPageViewportsContainingID 
> which gives the pages a given id is on but not the position on the page.
> The FOEventHandler has methods startLink and endLink which I think can 
> be used to gather information about the areas generated for the link but 
> I'm not sure how.

I don't think the FOEventHandler will help you here as it is used only
at the very beginning of the FO processing to build the FO tree. 

> I'm guessing the development team intends to implement the functionality 
> I'm describing some time in the future.

It's not on the list of important things. It mostly depends on someone
having a need for a feature and implementing it himself/herself.

> Would it be much work to 
> implement? If it simple enough for me todo could someone give me some 
> pointers? 

I'd have a look at PDFRenderer.renderInlineParent which does link
processing for PDF. It shows how to get at the internal coordinates (in
millipoints) of any link. You can probably work from there.

> Should I submit an RFE for this?

Better just do it yourself and post patches in Bugzilla like Renaud did
for the Java2DRenderer. Since you work off his uncommitted code you
might want to contact him to discuss finishing his patch. I'd be glad to
help integrating the patch when it's ready.

> Also it would be nice to have access to the 
> destination-placement-offset, show-destination, indicate-destination, 
> target-processing-context, and target-stylesheet properties of the links 
> too.

In this case you will have to extend the BasicLinkLayoutManager in the
layoutmgr package. Currently, only two traits are generated for the
InlineParent area. Additionally, you will also have to fully implement
the org.apache.fop.fo.flow.BasicLink which doesn't support all FO
attributes, yet.

> Thanks in advance,
>  From Richard.
> [1] http://issues.apache.org/bugzilla/show_bug.cgi?id=33760

I hope that helps.

Jeremias Maerki

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

View raw message