Skip to main content
12-Amethyst
October 17, 2019
Question

Scale Down Oversized Graphics using ArborText Styler in XSL Print

  • October 17, 2019
  • 1 reply
  • 2719 views

How do I use Styler to force oversized graphics to fit within the width and/or height of a page? 

I cannot edit the graphic or have the authors/illustrators resize the graphic files.

I am using the XSL Print mode and understand that it is no longer supported.  

I cannot use the APP Print mode because I've already made custom XSL changes and do not have time to learn how to make custom changes with the APP. 

I am using ArborText Editor with Styler Release 7.1.

 

I have already tried the following XSL, but it has no effect:

 

 

<xsl:attribute name="width">8in</xsl:attribute>
<xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
<xsl:attribute name="scaling">uniform</xsl:attribute>

 

 

 

I can force graphics to a particular size with the following, but it blows up small graphics:

 

 

 

<xsl:attribute name="width">8in</xsl:attribute>
<xsl:attribute name="content-width">scale-to-fit</xsl:attribute>
<xsl:attribute name="scaling">uniform</xsl:attribute>

 

 

 

 

 

Thanks,

-James

1 reply

16-Pearl
October 17, 2019

I'm not familiar with the XSL publishing, do you mean the XSL-FO publishing feature that was grandfathered about 10 years ago? Both underlying print engines (FOSI and APP) support the feature you need, so there is hope 🙂

JamesCLS12-AmethystAuthor
12-Amethyst
October 18, 2019

Yes, XSL-FO. I apologize for the confusion.

16-Pearl
October 19, 2019

Here are some tips then:

1. How it should work in XSL-FO: https://stackoverflow.com/questions/6220316/scale-down-to-fit-an-image-in-fop

2. What the underlying FOSI <putgraph> supports: http://support.ptc.com/cs/help/arbortext_hc/ae61_hc/index.jspx?id=help357&action=show

Between those two things you should be able to figure this out. First try the out-of-the-box XSL-FO method and if it isn't working, have a look in the ACL code that does the FOSI transformation to find where the <putgraph> is being generated and if it supports the scaling features you require.