[xep-support] Automatic resizing of big graphic

Marc marc.liste at free.fr
Wed Jul 9 00:47:23 PDT 2003


Hello,

I try it it's OK, but I have to know the size of the page and the size
of the graphic to know if I have the size or the height to indicate in
cm.
I don't know how to have the size of the graphic!
Marc
On Wed, 02 Jul 2003 08:26:45 +0200, you wrote:

>Hello Alexander,
>
>Thank for answer, I will try it in few days (I'm unable at this time).
>With this solution, I will try that all the graphic would be with a
>width of 20cm!
>
>Marc
>
>On Mon, 30 Jun 2003 11:26:13 +0400, you wrote:
>
>>Hello Marc,
>>
>>M> Thank for answer,
>>
>>M> I'll try to be more explicit.
>>M> I have a graphic who is 30cm width, and my page is only 20cm.
>>M> But this graphic is an XML file and sometimes it is only 10cm width.
>>M> When it is 30cm, I want to reduce it to 20cm, but when it is 10cm I
>>M> don't.
>>M> In the XML file I don't know the size of the graphic.
>>M> WHen I read the XSL documentation, I understand that the scale-to-fit
>>M> is what I want, but ...
>>
>>Try this code:
>>  <fo:external-graphic content-width="scale-to-fit"
>>                       width="20cm"
>>                       content-height="100%"
>>                       scaling="uniform"
>>                       src="url(./Ann7CnvTriP51.gif)"/>
>>
>>It should scale down everything that is wider than 20cm, but leave all
>>other images intact.
>>
>>M> I try this, but it's the same I have an overflow:
>>M> <fo:external-graphic content-width="scale-to-fit"  scaling="uniform"
>>M> src="url(./Ann7CnvTriP50.gif)"/>
>>
>>Yes, since you haven't set explicit width as I recommended in my
>>previous post you still have an overflow.
>>
>>Best regards,
>>Alexander Peshkov                             mailto:peshkov at renderx.com
>>RenderX
>>
>>
>>
>>M> Marc
>>M> On Fri, 27 Jun 2003 18:17:22 +0400, you wrote:
>>
>>>>Hello Marc,
>>>>
>>>>What exactly are you trying to achieve? Why to wrap
>>>>fo:external-graphic in fo:inline's?
>>>>Note that 'scale-to-fit' property makes sense only when used with
>>>>explicit 'width' or/and 'height' specified. Those properties define
>>>>viewport size. In your code both images actually have
>>>>width="100%" height="100%". As a result you have viewport with the
>>>>size of parent reference area (whole page in your case, I suppose) and
>>>>hence there is an overflow.
>>>>Consider following example:
>>>>  <fo:external-graphic content-width="scale-to-fit"
>>>>                       width="25pt"
>>>>                       content-height="100%"
>>>>                       scaling="uniform"
>>>>                       src="url(./Ann7CnvTriP51.gif)"/>
>>>>
>>>>This one will scale you image width down to 25pt (height will be
>>>>scaled proportionally).
>>>>
>>>>Best regards,
>>>>Alexander Peshkov                             mailto:peshkov at renderx.com
>>>>RenderX
>>>>
>>>>
>>>>M> Hello,
>>>>
>>>>M> I will have a look to the thread, and I try to use the solution, but I
>>>>M> always have the same error message :
>>>>M> -- {?no space for an element, trying to recover} ---
>>>>M> and I don't have the graphic in the pdf file.
>>>>
>>>>M> Here is the piece of code I use :
>>>>M> <fo:block font-family="Times" text-align="justify" font-size="9pt"
>>>>color="black">>
>>>>M> <fo:inline>
>>>>M> <fo:external-graphic content-width="scale-to-fit"
>>>>M> content-height="scale-to-fit" scaling="uniform"
>>>>M> src="url(./Ann7CnvTriP50.gif)"/>
>>>>M> </fo:inline>
>>>>M> </fo:block>
>>>>M> <fo:block font-family="Times" text-align="justify" font-size="9pt"
>>>>color="black">>
>>>>M> <fo:inline>
>>>>M> <fo:external-graphic content-width="scale-to-fit"
>>>>M> content-height="100%" width="100%" scaling="uniform"
>>>>M> src="url(./Ann7CnvTriP51.gif)"/>
>>>>M> </fo:inline>
>>>>M> </fo:block>
>>>>
>>>>M> Marc
>>>>M> On Fri, 27 Jun 2003 14:18:46 +0400, you wrote:
>>>>
>>>>>>Hello Marc,
>>>>>>
>>>>>>The short answer: you have to use 'scale-to-fit' value of
>>>>>>content-width/height attributes.
>>>>>>There was several discussion on the list regarding this topic.
>>>>>>Take a look at the posting of David Tolpin:
>>>>>>
>>>>>>http://xep.xattic.com/lists/xep-support/0376.html
>>>>>>
>>>>>>It contains a code snippet that could be useful for you.
>>>>>>
>>>>>>Best regards,
>>>>>>Alexander Peshkov                             mailto:peshkov at renderx.com
>>>>>>RenderX
>>>>>>
>>>>>>
>>>>>>M> Hello,
>>>>>>
>>>>>>M> I have a problem with graphic resizing.
>>>>>>M> In the same XML file I have small graphic and grphic too big to be on
>>>>>>M> the page.
>>>>>>M> The size can't be given by the author, because he doesn't know the
>>>>>>M> format of the PDF and the same XML is used for HTML.
>>>>>>M> I don't know how to automaticly conserve the size of the small graphic
>>>>>>M> and to force the size of the big graphic to the maximum, if I don't
>>>>>>M> give with to the 'fo:external-graphic' I have an XEP error as the
>>>>>>M> object can be in the margins.
>>>>>>
>>>>>>M> I don't find any information about that in the documentation (XEP or
>>>>>>M> XSL-FO).
>>>>>>
>>>>>>M> Thank for an idea
>>>>>>
>>>>>>M> Marc
>>>>>>
>>>>>>M> -------------------
>>>>>>M> (*) To unsubscribe, send a message with words 'unsubscribe xep-support'
>>>>>>M> in the body of the message to majordomo at renderx.com from the address
>>>>>>M> you are subscribed from.
>>>>>>M> (*) By using the Service, you expressly agree to these Terms of Service http://www.renderx.com/tos.html
>>>>>>
>>>>>>
>>>>>>
>>>>>>Ñ óâàæåíèåì,
>>>>>> Àëåêñàíäð                             mailto:peshkov at renderx.com
>>>>>>
>>>>>>
>>>>>>-------------------
>>>>>>(*) To unsubscribe, send a message with words 'unsubscribe xep-support'
>>>>>>in the body of the message to majordomo at renderx.com from the address
>>>>>>you are subscribed from.
>>>>>>(*) By using the Service, you expressly agree to these Terms of Service http://www.renderx.com/tos.html
>>>>
>>>>
>>>>M> -------------------
>>>>M> (*) To unsubscribe, send a message with words 'unsubscribe xep-support'
>>>>M> in the body of the message to majordomo at renderx.com from the address
>>>>M> you are subscribed from.
>>>>M> (*) By using the Service, you expressly agree to these Terms of Service http://www.renderx.com/tos.html
>>>>
>>>>
>>>>-------------------
>>>>(*) To unsubscribe, send a message with words 'unsubscribe xep-support'
>>>>in the body of the message to majordomo at renderx.com from the address
>>>>you are subscribed from.
>>>>(*) By using the Service, you expressly agree to these Terms of Service http://www.renderx.com/tos.html
>>
>>
>>M> -------------------
>>M> (*) To unsubscribe, send a message with words 'unsubscribe xep-support'
>>M> in the body of the message to majordomo at renderx.com from the address
>>M> you are subscribed from.
>>M> (*) By using the Service, you expressly agree to these Terms of Service http://www.renderx.com/tos.html
>>
>>
>>-------------------
>>(*) To unsubscribe, send a message with words 'unsubscribe xep-support'
>>in the body of the message to majordomo at renderx.com from the address
>>you are subscribed from.
>>(*) By using the Service, you expressly agree to these Terms of Service http://www.renderx.com/tos.html
>
>
>-------------------
>(*) To unsubscribe, send a message with words 'unsubscribe xep-support'
>in the body of the message to majordomo at renderx.com from the address
>you are subscribed from.
>(*) By using the Service, you expressly agree to these Terms of Service http://www.renderx.com/tos.html


-------------------
(*) To unsubscribe, send a message with words 'unsubscribe xep-support'
in the body of the message to majordomo at renderx.com from the address
you are subscribed from.
(*) By using the Service, you expressly agree to these Terms of Service http://www.renderx.com/tos.html



More information about the Xep-support mailing list