Markdown to PDF Image Scaling

<oXygen/> general issues.
Posts: 1
Joined: Thu Sep 13, 2018 1:13 pm

Markdown to PDF Image Scaling

Post by ghedlund » Thu Sep 13, 2018 1:18 pm

When converting markdown to pdf using Author 20.1 images are not scaled to fit within page boundaries. Is there any way to specify image scaling without converting to DITA first? It would be nice if this was the default behaviour when converting from markdown to pdf.

Posts: 6341
Joined: Fri Jul 09, 2004 5:18 pm

Re: Markdown to PDF Image Scaling

Post by Radu » Thu Sep 13, 2018 2:17 pm


There is an issue registered for this:

but somehow I'm not sure how you could specify something like this in Markdown. You cannot just generate @scalefit for all DITA images converted from Markdown because someone else may complain that they do not want that.
Maybe in your case to alter the publishing you could create a PDF customization plugin or folder which overrides from the XSLT stylesheet OXYGEN_INSTALL_DIR/frameworks/dita/DITA-OT2.x/plugins/org.dita.pdf2/xsl/fo/topic.xsl the XSLT template:

Code: Select all

<xsl:template match="*" mode="placeImage">
and behave as if the @scalefit is always set on the converted DITA image. ... utput.html

Radu Coravu
<oXygen/> XML Editor

Post Reply