List Info

Thread: How to scale image so it will fit on a PDF page while conserving the initial ratio?




How to scale image so it will fit on a PDF page while conserving the initial ratio?
user name
2006-04-20 20:21:48
Hi,

How to scale image so it will fit on a PDF page while
conserving the initial ratio?
The original size of the image that I scaled is 1152 width
x100 height.
After reading this web page h
ttp://www.sagehill.net/docbookxsl/ImageSizing.html, 
I have put the following attributes:
<imagedata contentdepth="100%"
fileref="HugeWidth.bmp" scalefit="1"
width="100%" />

The newly created image in the generated PDF file doesn't
have the same ratio as the original.
Tools used:
   -xsltproc.exe
   -FOP 0.91Beta
   -Docbook-xsl v1.69.1

Can some1 help!
Thx!

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection
around 
http://mail.yahoo.com 

------------------------------------------------------------
---------
To unsubscribe, e-mail: docbook-apps-unsubscribelists.oasis-open.org
For additional commands, e-mail: docbook-apps-helplists.oasis-open.org

How to scale image so it will fit on a PDF page while conserving the initial ratio?
user name
2006-04-25 17:08:28
Hullo,
I'm no expert, but I have successfully been resizing
images, by using 
the following construct
   <mediaobject>
     <imageobject>
       <imagedata
         fileref="big_image.png"
         format="PNG"
         contentwidth="100"
         width="6in"/>
     </imageobject>
   </mediaobject>
Combined, as stated in the page you mentionned, with
"set the stylesheet 
parameter ignore.image.scaling to a non-zero value"
for the html output, 
  I get images that fit within the page width for fop
output, and at 
original size in html. I have had problems with some images
being taller 
than page height though... Hard coding the width allows you
to have the 
width fitting the page, and it keeps the ratio.
Hope this can be a suitable solution for you
Igor

Xuan Ngo wrote:
> Hi,
> 
> How to scale image so it will fit on a PDF page while
conserving the initial ratio?
> The original size of the image that I scaled is 1152
width x100 height.
> After reading this web page h
ttp://www.sagehill.net/docbookxsl/ImageSizing.html, 
> I have put the following attributes:
> <imagedata contentdepth="100%"
fileref="HugeWidth.bmp" scalefit="1"
width="100%" />
> 
> The newly created image in the generated PDF file
doesn't have the same ratio as the original.
> Tools used:
>    -xsltproc.exe
>    -FOP 0.91Beta
>    -Docbook-xsl v1.69.1
> 
> Can some1 help!
> Thx!

------------------------------------------------------------
---------
To unsubscribe, e-mail: docbook-apps-unsubscribelists.oasis-open.org
For additional commands, e-mail: docbook-apps-helplists.oasis-open.org

[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )