Lets look at the default case, that creates a 100x100 pixel image. The default target dpi is 72, so 100/72 = 1.388888.
If you set the target dpi to 204, then the image needs to be 283x283 pixels because 204*1.38888 = 283.3333. Then a 1 pixel line needs to be 2.83 pixels to keep the scaling correct. Since you cannot have 2.83 pixel thickness in the monitor, it defaults to 3 pixels. Is your goal to print (to paper) a line of a certain thickness? Then you need to talk about dimensions (say, mm) not pixels. On Tue, Jul 9, 2013 at 1:35 PM, Massimo <massimo.iasev...@snai.it> wrote: > Thanks for the answer. > > I try to better explain the problem with an attached java example. > > If you run the main method you should get two png image > . svgDefImage.png that contain a 1px thin line generated with default > target > resolution > . svg204Image.png that contain a 3px thin line generated with 204dpi target > resolution > > According to the svg tag, both files should contain 1px thin lines. > > All images is generated with the same attached fo file. > > Notice that I use a custom Java2D renderer. > > I forgot to mention that I am using the fop trunk version. > > Thanks. > Massimo. > > SVGTest.java > <http://apache-fop.1065347.n5.nabble.com/file/n38858/SVGTest.java> > svgpixelsize.fo > <http://apache-fop.1065347.n5.nabble.com/file/n38858/svgpixelsize.fo> > svgDefImage.png > <http://apache-fop.1065347.n5.nabble.com/file/n38858/svgDefImage.png> > svg204Image.png > <http://apache-fop.1065347.n5.nabble.com/file/n38858/svg204Image.png> > > > > -- > View this message in context: > http://apache-fop.1065347.n5.nabble.com/SVG-pixel-size-tp38853p38858.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 > >