Thanks a lot, now it works as I wanted it to. But one more thing, I don't get, is why do you use the AffineTansform a 2nd time, before the addLink in your example:
AffineTransform pdfInitialTransform = new AffineTransform( 1, 0, 0, -1, 0, pageSize.height); g2d.translate(20, 20); Rectangle rect = new Rectangle(20, 20, 40, 50); g2d.setColor(Color.BLUE); g2d.fill(rect); >>> AffineTransform tx = new >>> AffineTransform(pdfInitialTransform); Rectangle2D targetRect = rect; g2d.addLink(targetRect, tx, "0 0 595 842", PDFLink.INTERNAL); Thanks again Tim Jeremias Maerki-2 wrote: > > You'll have to dig deeper and extend the code. "FitR" is currently > hard-coded. I'm sure that can be improved. > > But "/Page /Next" won't work. I haven't found that possibility in the > PDF specification. Take a look at the Table 8.2 in the PDF specification > 1.4 on page 475. That shows you what is possible. > > On 19.02.2009 13:29:52 useratnab wrote: >> >> I've tried to change the destination from >> >> String pdfdest = "/FitR " + dest; >> to >> String pdfdest = "/Page /Next"; >> >> but this won't do it. I guess I have to dig deeper for it or do you have >> any >> suggestions to link the prev. and next page? >> >> Thanks >> >> >> >> >> 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: fop-users-unsubscr...@xmlgraphics.apache.org >> > For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org >> > >> > >> > >> >> -- >> View this message in context: >> http://www.nabble.com/Making-Links-in-PDF-tp21994320p22099417.html >> Sent from the FOP - Users mailing list archive at Nabble.com. >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org >> For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org > > > > > Jeremias Maerki > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org > For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org > > > -- View this message in context: http://www.nabble.com/Making-Links-in-PDF-tp21994320p22118611.html Sent from the FOP - Users mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org