Re: PDFTranscoder convert SVG links in resized and misplaced PDF annotation links
I think I have a fix now for this but I don't want to commit it before I can test it in my usual environment. So I've attached a patch with my current changes. Please test it yourself and let me know if it works. With your patch PdfTranscoder works fine, but fo:external-graphic links are generated of the right size, but misplaced. It seems that they are mirrored as scale(1, -1) would do or something similar. -- Abramo Bagnara mailto:[EMAIL PROTECTED] Opera Unica Phone: +39.0546.656023 Via Emilia Interna, 140 48014 Castel Bolognese (RA) - Italy
Re: PDFTranscoder convert SVG links in resized and misplaced PDF annotation links
Abramo Bagnara ha scritto: The Rect is generated using a wrong transformation matrix. I've attached the java source I've used and a tiny svg example. This happens with both 0.94 and svn. This does not happen using fop if I include the svg in a xsl:fo document with fo:external-graphic. I've attached what I believed was the right fix and indeed it WORKS for PDFTranscoder and my needs. It's a pity that now it's fo:external-graphic that it's misplaced :-) -- Abramo Bagnara mailto:[EMAIL PROTECTED] Opera Unica Phone: +39.0546.656023 Via Emilia Interna, 140 48014 Castel Bolognese (RA) - Italy Index: src/java/org/apache/fop/svg/PDFGraphics2D.java === --- src/java/org/apache/fop/svg/PDFGraphics2D.java (revisione 645431) +++ src/java/org/apache/fop/svg/PDFGraphics2D.java (copia locale) @@ -387,7 +387,9 @@ return; } preparePainting(); -AffineTransform at = getTransform(); +AffineTransform at; + at = new AffineTransform(getBaseTransform()); + at.concatenate(getTransform()); Shape b = at.createTransformedShape(bounds); b = trans.createTransformedShape(b); if (b != null) {