On 01/26/2011 07:47 PM, Richard Edwards wrote:
> 
> I’m trying to size PNG images in DITA source so that they are rendered
> in appropriate sizes in PDF (via FOP) and Xhtml.
> 
> The image size in pixels makes them display OK in Xhtml, but they
> display stretched in the PDF.
> 
> Setting the scale attribute makes the image display OK in PDF but too
> small in Xhtml.
> 
> I’ve been looking for a way to set the pixel size in FOP, or some other
> way to control the image size in PDF.
> 
> Is there a way to get images sized for both media?
> 

In the principle, the answer is: set the width attribute in the DITA
source but do not use pixels, instead use a unit such as pc, pt, px, in,
cm, mm, em. The problem is that we forgot to support these units[*] in
the case of the XHTML output. We'll fix this omission in the next release.

For now, the workaround is to save your PNG images with a resolution
higher than 72dpi (which is FOP default). You may try 96dpi or even 120dpi.

Using the Gimp (http://www.gimp.org/), this done by selecting menu item
"Image|Print Size".



---
[*] We have confused a "Length" in the HTML spec
(http://www.w3.org/TR/html401/types.html#type-length) with a "Length" in
the CSS spec (http://www.w3.org/TR/CSS2/syndata.html#value-def-length).
 
--
XMLmind DITA Converter Support List
[email protected]
http://www.xmlmind.com/mailman/listinfo/ditac-support

Reply via email to