On 06/07/2012 04:01 PM, Robert Gurol wrote:
>
> recently, my task is to insert a picture in the footer of a document,
> inside a table.
>
> Depending on the input data, the picture may span multiple columns and
> rows, and its size is unspecified. Thus, I
> - generate the picture with  the size constraints (width, height) as
> appropriate for its surrounding table cell,
> - specify scaling to be uniform, and
> - set content-width and content-height both to "scale-to-fit" (same
> observable effect with "scale-down-to-fit").
>
> The effect is not as expected - while in PDF output the picture is
> scaled down uniformly, it is distorted for DOCX output (stretched as far
> as width and height go). An attached picture demonstrates the effect.
>
> I currently use XFC in its 4.6.1 version in Java, the same effect is
> present with version 4.4.1.
>
> Is this a bug,

We have dozens of tests which deal with image scaling. May be you have 
found a case which is not covered by our tests. On the other hand, may 
be your issue is triggered by the context in which you use the 
fo:external-graphic.




> is there a workaround?

Don't know.



> Uniform scaling ought to be
> supported according to the conformance statement


Please provide us with an actual, valid, XSL-FO file (a .fo, not a .xsl) 
which would allow us to quickly and easily reproduce the problem here at 
XMLmind. If this XSL-FO file references external graphics files (e.g. 
PNG), please also send us these graphics files.




>
> Regards,
>
> Robert Gurol
>
> PS: Example XSL code:
> ,,,
> <static-content flow-name="header">
> <block background-color="#ffffff" font-family="Helvetica"
>            font-size="10pt" margin-bottom="0mm" margin-top="0mm">
> <block>
> <table table-layout="fixed" width="100%">
> <table-column column-width="proportional-column-width(2)" />
> <table-column column-width="proportional-column-width(1)" />
> <table-column column-width="proportional-column-width(1)" />
> <table-column column-width="proportional-column-width(2)" />
> <table-body start-indent="0pt">
> <table-row height="10mm">
> <table-cell number-columns-spanned="1"
>                      number-rows-spanned="2" padding="2pt"
>                      text-align="left">
> <block>
> <external-graphic content-height="scale-to-fit"
>                          content-type="content-type:image/jpg"
>                          content-width="scale-to-fit"
>                          height="20.0mm" scaling="uniform"
>                          width="56.666666666666664mm">
> <!-- shortened attribute content for this example -->
> <attribute name="src"
>
> xmlns="http://www.w3.org/1999/XSL/Transform";>data:image/jpg;base64,/9j/4AAQSkZJRgABAgAAAQABAAD/4AAcT2NhZC...</attribute>
> </external-graphic>
> </block>
> </table-cell>

 
--
XMLmind FO Converter Support List
[email protected]
http://www.xmlmind.com/mailman/listinfo/xfc-support

Reply via email to