Markdown to PDF Image Scaling

<oXygen/> general issues.
ghedlund
Posts: 1

Markdown to PDF Image Scaling

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.
Radu
Posts: 5690

Re: Markdown to PDF Image Scaling

Thu Sep 13, 2018 2:17 pm

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/20.1/ug-editor/topics/dita-pdf-output.html

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

Return to “Other Issues”

Who is online

Users browsing this forum: No registered users and 3 guests