It does look like a bug somewhere in the PDFGraphics2D implementation. It's a little hard to guess what it is since a simple cubic bezier curve shouldn't pose much of an issue to it. Looking at the code it simply copies the control points to the PDF output. It looks a bit like someone replaced a cubic with a quadradic (which they might think they could do because the two control points are the same, but of course you can't).
Thomas On May 1, 2013, at 6:25 AM, Martin Gainty <mgai...@hotmail.com> wrote: > > XSL:FO acts like a template library similar to FreeMarker or Velocity > substiuting in values for attributes to FOP elements and then generating the > PDF based on the parameters you supplied > > so blaming FOP for incorrect params you supply in all probability wont > solve this particular problem > > if PDF is generated from SVG then i would suggest concentrate on the SVG to > PDF generation > > if after dissecting SVG to PDF generator you are still calling No Joy for > generating your PDF then you can write your own converter > > Martin Gainty > ______________________________________________ > Verzicht und Vertraulichkeitanmerkung > > Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger > sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung > oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich > dem Austausch von Informationen und entfaltet keine rechtliche > Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen > wir keine Haftung fuer den Inhalt uebernehmen. > > > > From: dsrog...@hp.com > To: batik-users@xmlgraphics.apache.org > Subject: RE: mismatch between pdf and png > Date: Tue, 30 Apr 2013 19:12:57 +0000 > > I’ve done more research on this, (though I haven’t gotten a solid response > from the list yet). I’ve managed to upgrade to FOP 1.1 in order to nail down > if it was a bug in the embedded version of FOP. > > Here is what I mean. The PDF and PNG were both generated from the SVG. They > don’t match. The PNG matches what I see in Chrome. The PDF does not. > > https://docs.google.com/file/d/0B73ieqBa7GmsRlY0UjAzLWNqODA/edit?usp=sharing > https://docs.google.com/file/d/0B73ieqBa7GmscmFxMnpSQ2p3Z3c/edit?usp=sharing > https://docs.google.com/file/d/0B73ieqBa7GmsM3JlZC0wRTlCbHM/edit?usp=sharing > > Is this a bug? If it’s a bug, I’m happy to file… > -- > Daniel > > > From: Rogers, Daniel > Sent: Monday, April 29, 2013 4:52 PM > To: 'batik-users@xmlgraphics.apache.org' > Subject: mismatch between pdf and png > > Hi, > > I’m trying to produce a web-based renderer for SVG using batik 1.1. I’d > really like PDF output. However when I render: > > http://www.w3schools.com/svg/tryit.asp?filename=trysvg_path2 > > (after deleting the font=”sans-serif” attribute) to png, jpeg and pdf using > batik-rasterizer.jar, PDF output is different and clearly NOT matching png, > jpeg or browser output. The blue curve touches the green line in all > versions but PDF. In PDF, the blue curve is below the green line. Shouldn’t > these be the same? > > I thought it might be a bug in the version of FOP embedded in batik and tried > replacing pdf-transcoder.jar, but it started dragging in a bunch of apache > Avalon dependencies, and I didn’t dig further. > > -- > Daniel