Graphic Scalin in PDF

View: New views
8 Messages — Rating Filter:   Alert me  

Graphic Scalin in PDF

by fingerli :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi @ all

There's another problem appeared:

In PDF the images are to big. How can i scale these images to a viewable size?



thanks for your answers.

Re: Graphic Scalin in PDF

by Bob Stayton :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

There are several scaling attributes you can use, as documented here:

http://www.sagehill.net/docbookxsl/ImageSizing.html

Bob Stayton
Sagehill Enterprises
bobs@...


----- Original Message -----
From: "fingerli" <MICHAEl.finger@...>
To: <docbook-apps@...>
Sent: Friday, March 14, 2008 12:49 AM
Subject: [docbook-apps] Graphic Scalin in PDF


>
> Hi @ all
>
> There's another problem appeared:
>
> In PDF the images are to big. How can i scale these images to a viewable
> size?
>
> http://www.nabble.com/file/p16045877/supersach.jpg
>
> thanks for your answers.
> --
> View this message in context:
> http://www.nabble.com/Graphic-Scalin-in-PDF-tp16045877p16045877.html
> Sent from the docbook apps mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: docbook-apps-unsubscribe@...
> For additional commands, e-mail: docbook-apps-help@...
>
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: docbook-apps-unsubscribe@...
For additional commands, e-mail: docbook-apps-help@...


Re: Graphic Scalin in PDF

by Ina F :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi

I also have a problem with images in pdf.
It completely ignores my imagedata commends. All the pictures are totally unscaled, bigger than 100% and distorted.
I've tried various image formats (png, gif, jpg) and units (cm, px, pc, %). Nothing works.
Without giving units the images are also unscaled.

I've also used scalefit="1", width="100%" & contentwidth="100%". Nothing works.

What can I do?

Thanks in advance!

RE: Graphic Scalin in PDF

by Emmanuel Bégué-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

The following attributes work for me, for imagedata:
  width="100%" scalefit="1"

(and nothing else, no units, no nothing).


As per http://www.sagehill.net/docbookxsl/ImageSizing.html

" scalefit
  If set to a value of 1, then the processor will scale the
  graphic proportionally to fit the allowed area. The image
  is scaled to fit the specified width or depth viewport
  dimension, whichever fills up first.

  [...]

  To keep a graphic for printed output at its natural size
  unless it is too large to fit the available width, in which
  case shrink it to fit, use scalefit="1", width="100%" and
  contentdepth="100%" attributes."


Regards,
EB


> -----Original Message-----
> From: cookiemonster [mailto:ina_frenzel@...]
> Sent: Tuesday, April 01, 2008 1:58 PM
> Subject: Re: [docbook-apps] Graphic Scalin in PDF
>
> Hi
>
> I also have a problem with images in pdf.
> It completely ignores my imagedata commends. All the pictures are totally
> unscaled, bigger than 100% and distorted.
> I've tried various image formats (png, gif, jpg) and units (cm,
> px, pc, %).
> Nothing works.
> Without giving units the images are also unscaled.
>
> What can I do?
>
> Thanks in advance!
>



---------------------------------------------------------------------
To unsubscribe, e-mail: docbook-apps-unsubscribe@...
For additional commands, e-mail: docbook-apps-help@...


Re: Graphic Scalin in PDF

by Bob Stayton :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Can you describe what FO processor you are using?  And perhaps include a
very short document showing how you are marking it up?  That would enable us
to diagnose the problem.

Bob Stayton
Sagehill Enterprises
bobs@...


----- Original Message -----
From: "cookiemonster" <ina_frenzel@...>
To: <docbook-apps@...>
Sent: Tuesday, April 01, 2008 4:58 AM
Subject: Re: [docbook-apps] Graphic Scalin in PDF


>
> Hi
>
> I also have a problem with images in pdf.
> It completely ignores my imagedata commends. All the pictures are totally
> unscaled, bigger than 100% and distorted.
> I've tried various image formats (png, gif, jpg) and units (cm, px, pc,
> %).
> Nothing works.
> Without giving units the images are also unscaled.
>
> What can I do?
>
> Thanks in advance!
> --
> View this message in context:
> http://www.nabble.com/Graphic-Scalin-in-PDF-tp16045877p16418184.html
> Sent from the docbook apps mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: docbook-apps-unsubscribe@...
> For additional commands, e-mail: docbook-apps-help@...
>
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: docbook-apps-unsubscribe@...
For additional commands, e-mail: docbook-apps-help@...


Re: Graphic Scalin in PDF

by Ina F :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I'm using the Apache FOP FO-Processor.

This is my source code:

<mediaobject>
<imageobject>
<imagedata scalefit="1" width="100%" contentwidth="100%" fileref="figure/pic1.png" format="PNG"/>
</imageobject>
</mediaobject>

I have attached the unscaled image (in pdf) and the original image.

Bob Stayton wrote:
Can you describe what FO processor you are using?  And perhaps include a
very short document showing how you are marking it up?  That would enable us
to diagnose the problem.

Bob Stayton
Sagehill Enterprises
bobs@sagehill.net

Re: Graphic Scalin in PDF

by Bob Stayton :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Actually, we would need the version of FOP, because the handling of graphics
in version 0.20.5 was very limited, and much improved in the 0.94 line of
development.  If you are using 0.20.5, you should upgrade to the latest
version.

Bob Stayton
Sagehill Enterprises
bobs@...


----- Original Message -----
From: "Ina F" <ina_frenzel@...>
To: <docbook-apps@...>
Sent: Tuesday, April 01, 2008 11:25 PM
Subject: Re: [docbook-apps] Graphic Scalin in PDF


>
> I'm using the Apache FOP FO-Processor.
>
> This is my source code:
>
> <mediaxobject>
> <imagexobject>
> <imagedata scalefit="1" width="100%" contentwidth="100%"
> fileref="figure/pic1.png" format="PNG"/>
> </imagexobject>
> </mediaxobject>
>
> I have attached the unscaled image (in pdf) and the original image.
>
>
> Bob Stayton wrote:
>>
>> Can you describe what FO processor you are using?  And perhaps include a
>> very short document showing how you are marking it up?  That would enable
>> us
>> to diagnose the problem.
>>
>> Bob Stayton
>> Sagehill Enterprises
>> bobs@...
>>
> http://www.nabble.com/file/p16443000/pic1-pdf.png
> http://www.nabble.com/file/p16443000/pic1-original.png
> --
> View this message in context:
> http://www.nabble.com/Graphic-Scalin-in-PDF-tp16045877p16443000.html
> Sent from the docbook apps mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: docbook-apps-unsubscribe@...
> For additional commands, e-mail: docbook-apps-help@...
>
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: docbook-apps-unsubscribe@...
For additional commands, e-mail: docbook-apps-help@...


Re: Graphic Scalin in PDF

by Ina F :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I've tried it also without using contentwidth, but it also doesn't work. It's the same result as before. Nothing has changed.

Bob Stayton wrote:
The problem is you are using contentwidth="100%". A percentage in the
contentwidth attribute means to scale the image itself to a percentage of
the intrinsic image size. So setting contentwidth to 100% effectively means
you do not want it scaled. Not only that, contentwidth takes precedence
over scalefit="1" in the stylesheets. So just remove contentwidth and your
graphic should scale to the width of page based on the other two attributes.
See this page for more details on image scaling attributes:

http://www.sagehill.net/docbookxsl/ImageSizing.html

Bob Stayton
Sagehill Enterprises
bobs@sagehill.net