Details
-
Type:
Improvement
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 1.0
-
Fix Version/s: 1.2
-
Labels:None
-
Number of attachments :
Description
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:
<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>
with this:
<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>
And VOILA, the scaling was perfect!
Activity
Lukas Theussl
made changes -
| Field | Original Value | New Value |
|---|---|---|
| Fix Version/s | 1.2 [ 16050 ] |
Lukas Theussl
made changes -
| Status | Open [ 1 ] | Closed [ 6 ] |
| Assignee | Lukas Theussl [ lukas ] | |
| Fix Version/s | 1.2 [ 16050 ] | |
| Resolution | Not A Bug [ 6 ] |
Lukas Theussl
made changes -
| Resolution | Not A Bug [ 6 ] | |
| Status | Closed [ 6 ] | Reopened [ 4 ] |
Lukas Theussl
made changes -
| Status | Reopened [ 4 ] | Closed [ 6 ] |
| Fix Version/s | 1.2 [ 16050 ] | |
| Resolution | Fixed [ 1 ] |
This tip is already published: http://maven.apache.org/plugins/maven-pdf-plugin/usage.html (Specific FOP Configuration Properties).