Images appearing too small

Having trouble installing Oxygen? Got a bug to report? Post it all here.
mlimtiaco
Posts: 3
Joined: Thu Nov 21, 2013 6:41 pm

Images appearing too small

Post by mlimtiaco »

Hello! I've been evaluating oXygen as a tool for our DITA authoring system, and so far I've been able to customize and format things as needed. However, I still have a problem with images.

Images (mostly SVG files with a few PNG and JPG here and there) display at about 50% the expected size in Author mode and in our PDF output. Many of our images include text callouts that should appear at 10-pt., but because of this weird sizing problem the text looks more like 6 pt.

As part of my testing, I've used @scale to enlarge the artwork, but we'd prefer not to have to edit every SVG to add @scale - that attribute isn't currently specified in any of our image files.

Is there a single stylesheet (or .xsl, or..?) that controls the overall scaling of all images? It seems to me that's the easiest way to customize our transform to get the output we want. Or do we need to add @scale to each of our 300+ images in my test project?

Please advise,
Matso Limtiaco
Everett WA
Radu
Posts: 9449
Joined: Fri Jul 09, 2004 5:18 pm

Re: Images appearing too small

Post by Radu »

Hi Matso,

Both the Author visual editing mode and the default PDF rendering use the open source Apache Batik library to display the SVG.
Most SVG images have the width and height attributes specified on the root element. Do your images have these particular attributes specified on the root <svg> element? If so, what values do they have?
Could you send a small sample SVG to reproduce and study the issue on our side? (tech support email address: support@oxygenxml.com).

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Radu
Posts: 9449
Joined: Fri Jul 09, 2004 5:18 pm

Re: Images appearing too small

Post by Radu »

Coming back to your question about applying scale automatically to the images.
This XSLT stylesheet used in the PDF output:

OXYGEN_INSTALL_DIR/frameworks/dita/DITA-OT/plugins/org.dita.pdf2/xsl/fo/commons.xsl

has a template called:

Code: Select all

<xsl:template match="*" mode="placeImage">...
which looks at the scale attribute set on the image. So you could probably override that behavior.
Usually PDF customizations are made without modifying directly the XSLT code in the DITA OT:

http://www.oxygenxml.com/doc/ug-oxygen/ ... ation.html

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
mlimtiaco
Posts: 3
Joined: Thu Nov 21, 2013 6:41 pm

Re: Images appearing too small

Post by mlimtiaco »

To confirm: Using a custom.xsl file as described, I can specify scale="150" (or whatever value seems appropriate) to set the value for the scale attribute, correct? However, none of our graphics currently have any value set for the scale attribute. So should setting the value in custom.xsl still work?
Radu
Posts: 9449
Joined: Fri Jul 09, 2004 5:18 pm

Re: Images appearing too small

Post by Radu »

Hi,

I looked at the sample SVG image you sent and in my opinion the PDF publishing properly obeys the width and height attributes set to the <svg> image.

Anyway, probably in that XSL template the XSL code:

Code: Select all

<xsl:if test="not($width) and not($height) and @scale">
<xsl:attribute name="content-width">
<xsl:value-of select="concat(@scale,'%')"/>
</xsl:attribute>
</xsl:if>
could get replace with:

Code: Select all

<xsl:if test="not($width) and not($height)">
<xsl:attribute name="content-width">150%</xsl:attribute>
</xsl:if>
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Post Reply