Markdown to PDF Image Scaling

Oxygen general issues.
ghedlund
Posts: 1
Joined: Thu Sep 13, 2018 1:13 pm

Markdown to PDF Image Scaling

Post by ghedlund »

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.
Radu
Posts: 9041
Joined: Fri Jul 09, 2004 5:18 pm

Re: Markdown to PDF Image Scaling

Post by Radu »

Hi,

There is an issue registered for this:

https://github.com/jelovirt/org.lwdita/issues/9

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.

https://www.oxygenxml.com/doc/versions/ ... utput.html

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Post Reply