Now it works just fine. 

But I guess I have to modify the PDFGraphics2D.java, because for internal
links, it'll always start the destination like this:

pdfdest = "/FitR " + dest;

This is probably the reason why "[/XYZ 0 0 null]" won't work either...



  public void addLink(Rectangle2D bounds, AffineTransform trans, String
dest, int linkType) {
        if (!pdfDoc.getProfile().isAnnotationAllowed()) {
            return;
        }
        preparePainting();
        AffineTransform at = getTransform();
        Shape b = at.createTransformedShape(bounds);
        b = trans.createTransformedShape(b);
        if (b != null) {
            Rectangle rect = b.getBounds();

            if (linkType != PDFLink.EXTERNAL) {
                String pdfdest = "/FitR " + dest;
                resourceContext.addAnnotation(
                    pdfDoc.getFactory().makeLink(rect, getPageReference(),
pdfdest));
            } else {
                resourceContext.addAnnotation(
                    pdfDoc.getFactory().makeLink(rect, dest, linkType, 0));
            }
        }
    }





Jeremias Maerki-2 wrote:
> 
> Yes, you'll need that fix I mentioned. You'll have to use the latest FOP
> Trunk directly from the Subversion repository.
> 
> On 18.02.2009 14:28:06 useratnab wrote:
>> 
>> Hey,
>> 
>> first of all I gotta say: a big thanks to you and your support, I got
>> some
>> things fixed, I thought I'd never find the answer for :confused:
>> 
>> But unfortunately there's still the "Cannot reference this object. It
>> doesn't have an object number" error, when calling:
>> 
>> g2d.addLink(targetRect, tx, "0 0 595 842", PDFLink.INTERNAL);
>> 
>> What fop are you using? 
>> Is that "SVG #svgView(viewBox())" bug-fix necessary, you mentioned
>> earlier?
>> 
>> Thanks again Tim
>> 
> <snip/> 
> 
> 
> Jeremias Maerki
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Making-Links-in-PDF-tp21994320p22096684.html
Sent from the FOP - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to