jira.codehaus.org

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What?s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
Signup
Maven 2.x PDF Plugin
  • Maven 2.x PDF Plugin
  • MPDF-29

Improve figure scaling

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Improvement Improvement
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.0
  • Fix Version/s: 1.2
  • Labels:
    None
  • Number of attachments :
    0

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

Ascending order - Click to sort in descending order
  • All
  • Comments
  • Work Log
  • History
  • Activity
Lukas Theussl made changes - 04/Jun/10 1:11 PM
Field Original Value New Value
Fix Version/s 1.2 [ 16050 ]
Hide
Permalink
Lukas Theussl added a comment - 07/Jun/10 8:36 AM

This tip is already published: http://maven.apache.org/plugins/maven-pdf-plugin/usage.html (Specific FOP Configuration Properties).

Show
Lukas Theussl added a comment - 07/Jun/10 8:36 AM This tip is already published: http://maven.apache.org/plugins/maven-pdf-plugin/usage.html (Specific FOP Configuration Properties).
Lukas Theussl made changes - 07/Jun/10 8:36 AM
Status Open [ 1 ] Closed [ 6 ]
Assignee Lukas Theussl [ lukas ]
Fix Version/s 1.2 [ 16050 ]
Resolution Not A Bug [ 6 ]
Hide
Permalink
Steven Swor added a comment - 22/Mar/12 3:20 PM

This specific example is not given in the plugin usage page, and there is little documentation on what attribute sets are used by the PDF plugin. Can you please take a second look at this ticket, and either make this the default behavior in the PDF plugin, or update the documentation?

Show
Steven Swor added a comment - 22/Mar/12 3:20 PM This specific example is not given in the plugin usage page, and there is little documentation on what attribute sets are used by the PDF plugin. Can you please take a second look at this ticket, and either make this the default behavior in the PDF plugin, or update the documentation?
Lukas Theussl made changes - 23/Mar/12 2:25 AM
Resolution Not A Bug [ 6 ]
Status Closed [ 6 ] Reopened [ 4 ]
Hide
Permalink
Lukas Theussl added a comment - 23/Mar/12 2:27 AM

I changed the default behavior in doxia-module-fo, see r1304214. The documentation is complete IMO as it links to the original configuration file where all the available parameters are listed.

Show
Lukas Theussl added a comment - 23/Mar/12 2:27 AM I changed the default behavior in doxia-module-fo, see r1304214 . The documentation is complete IMO as it links to the original configuration file where all the available parameters are listed.
Lukas Theussl made changes - 23/Mar/12 2:27 AM
Status Reopened [ 4 ] Closed [ 6 ]
Fix Version/s 1.2 [ 16050 ]
Resolution Fixed [ 1 ]
Hide
Permalink
Steven Swor added a comment - 23/Mar/12 9:22 AM

Thanks!

Show
Steven Swor added a comment - 23/Mar/12 9:22 AM Thanks!
Hide
Permalink
Steven Swor added a comment - 27/Feb/13 9:55 PM

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.

Show
Steven Swor added a comment - 27/Feb/13 9:55 PM 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.

People

  • Assignee:
    Lukas Theussl
    Reporter:
    Lukas Theussl
Vote (0)
Watch (1)

Dates

  • Created:
    01/Sep/09 6:19 AM
    Updated:
    27/Feb/13 9:55 PM
    Resolved:
    23/Mar/12 2:27 AM
  • Atlassian JIRA (v5.2.7#850-sha1:b2af0c8)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Codehaus. Try JIRA - bug tracking software for your team.