Images appearing too small
Having trouble installing Oxygen? Got a bug to report? Post it all here.
-
- Posts: 3
- Joined: Thu Nov 21, 2013 6:41 pm
Images appearing too small
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
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
-
- Posts: 9449
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Images appearing too small
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
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
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 9449
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Images appearing too small
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:
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
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">...
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
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 3
- Joined: Thu Nov 21, 2013 6:41 pm
Re: Images appearing too small
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?
-
- Posts: 9449
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Images appearing too small
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:
could get replace with:
Regards,
Radu
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>
Code: Select all
<xsl:if test="not($width) and not($height)">
<xsl:attribute name="content-width">150%</xsl:attribute>
</xsl:if>
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ Artificial Intelligence (AI Positron Assistant add-on)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service