[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: XSL-FO: How to Control Rendered Size of InStream S

Subject: Re: XSL-FO: How to Control Rendered Size of InStream SVG?
From: "Eliot Kimber ekimber@xxxxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Sun, 27 Jul 2014 15:16:31 -0000
Re:  XSL-FO: How to Control Rendered Size of InStream S
Follow up: It looks like with the width and height set on the SVG element
to match the original, then the units in the SVG canvas align with points,
such that this produces the expected result:

<svg:svg version="1.1" id="Layer_1" xmlns:svg="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="7in"
      <svg:polygon fill="#9A9A9A" points="9.8,0 504,0 504,10 0,10 "/>

That is, a pointed polygon 504 points (7 inches) long and 10 points high.

Again, this is an SVG produced by Illustrator, which appears to use a 1
pixel = 1 point space, at least by default.


Eliot Kimber, Owner
Contrext, LLC

On 7/27/14, 9:36 AM, "Eliot Kimber ekimber@xxxxxxxxxxxx"
<xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote:

>That was the hint I needed.
>It turns out that the key appears to be specifying @width and @height on
>the <svg> element. This markup gives me the result I wanted: a 7in x 9pt
><fo:block margin-top="2pc">
>            <fo:instream-foreign-object
>              >
>  <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg"
>xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="7in"
>  	  xml:space="preserve">
>  <rect x="0" y="0" fill="#009A9A" width="100%" height="100%"/>
>  </svg>
>            </fo:instream-foreign-object>
>          </fo:block>
>Eliot Kimber, Owner
>Contrext, LLC
>On 7/27/14, 3:16 AM, "jfrm.maurel@xxxxxxxxx jfrm.maurel@xxxxxxxxx"
><xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote:
>>Le 26/07/2014 22:38, Eliot Kimber ekimber@xxxxxxxxxxxx a C)crit :
>>> Any guidance on what I need to adjust to control the size of the
>>> SVG to my desires?
>>Jean-FranC'ois MAUREL

Current Thread


Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
First Name
Last Name
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.