maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Steven Swor (JIRA)" <j...@codehaus.org>
Subject [jira] (MPDF-29) Improve figure scaling
Date Thu, 28 Feb 2013 03:56:52 GMT

    [ https://jira.codehaus.org/browse/MPDF-29?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=320601#comment-320601
] 

Steven Swor commented on MPDF-29:
---------------------------------

For SVG graphics exported from Google Docs, {{scale-to-fit}} seems to work better than {{scale-down-to-fit}}.
 Otherwise the image can end up being really tiny.
                
> Improve figure scaling
> ----------------------
>
>                 Key: MPDF-29
>                 URL: https://jira.codehaus.org/browse/MPDF-29
>             Project: Maven 2.x PDF Plugin
>          Issue Type: Improvement
>    Affects Versions: 1.0
>            Reporter: Lukas Theussl
>            Assignee: Lukas Theussl
>             Fix For: 1.2
>
>
> From a private mail:
> Today, I found an extremely useful tip for how to get the images/graphics "right" both
in HTML and PDF. As you know and write in the FAQ, there is a challenge with scaling the images,
especially when using APT.
> I think it would be useful for others, if you could publish this tip on the site for
the plugin.
> What I did was this:
> I made a copy of the original fo-styles.xslt, names it pdf-config.xml in my src/site/resources.
> Then I replaced the following section:
> {code:xml}
> <xsl:attribute-set name="figure.graphics">
>     <xsl:attribute name="width">auto</xsl:attribute>
>     <xsl:attribute name="height">auto</xsl:attribute>
>     <xsl:attribute name="content-width">auto</xsl:attribute>
>     <xsl:attribute name="content-height">auto</xsl:attribute>
> </xsl:attribute-set>
> {code}
> with this:
> {code:xml}
> <xsl:attribute-set name="figure.graphics">
>     <xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
>     <xsl:attribute name="content-height">scale-down-to-fit</xsl:attribute>
>     <xsl:attribute name="width">100%</xsl:attribute>
>     <xsl:attribute name="height">100%</xsl:attribute>
> </xsl:attribute-set>
> {code}
>  
> And VOILA, the scaling was perfect!

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message