I've experimented a little with the pdf image size issue and I've found a solution. Fop is printing-oriented so it doesn't consider the image size but the pixel-per-inch (ppi) attribute. So if the image has a ppi of 72 (as normally is when saving an image file) and a width of 510pixel it will be printed with a width of 510/72*2,5=17,7cm. At this point I figured out a simple way to convert all the images ppi in a run with Imagemagik:. From the figures folder issue the following two commands:

ls *.png > list
for i in `cat list`; do convert -units PixelsPerInch -density 130 "$i" "$i"; done

The best would be to have the ppi changed or (checked) automatically when "make pdf" is issued (I don't know how to do this). If the check is on user-side there will be the need of a new dependency (imagemagick) so I think it would be better to have a check upstream.

So we need only to choose in what dimension print images in PDF and set a ppi to all figures.


NOTE: the ppi attribute is not influent on image size but only in it's printed size (on paper) and not in video. So changing this attribute is like not changing it at all if you display the Manual on your monitor.

Il 24/11/2010 15:18, Geert Janssens ha scritto:
On Wednesday 24 November 2010, Cristian Marchi wrote:
I tested it right now and works well; the result is very good!
I see problems with images (some are overscaled) and with some help
tables where the last column is probably too large and is drawn in a new
page.

Regards
Cristian

Thinking some more on the image sizes. It looks as if the resolution stored in
the images has something to do with this. The images that get oversized were
saved in 72dpi, images that look good had higher resolutions.

For example, the image basic_AccountsSampleQIF.png in "Putting it all
together" in concepts guide chapter 2 is 72dpi and gets overscaled.
On the other hand image basic_EmptyAccounts.png in the same section has 126dpi
and looks much better in pdf.

If we want to have nice looking pdfs, we will have to be careful how we save
our images.

Note that docbook also allows to define multiple imageobjects inside one
mediaobject. This could help us in some cases to provide different resolution
images for html and pdf.

Geert
.

_______________________________________________
gnucash-devel mailing list
[email protected]
https://lists.gnucash.org/mailman/listinfo/gnucash-devel

Reply via email to