[xep-support] Re: svg size parameters

From: Randy George <rkgeorge@cadmaps.com>
Date: Wed Jun 15 2005 - 17:10:11 PDT

Hi,

 

I have a foreign object svg which I am transcoding to PDF using XEP, but I'm
running into a problem understanding how to size my svg to fit the paper
width.The xep reference document has this comment:

1. "For an SVG image to be processed by XEP, it must have an intrinsic
size. If height or width are expressed in percents, a viewBox attribute must
be present: the intrinsic size is determined by the viewBox, assuming 1 user
space unit = 1 pixel. Otherwise, the image cannot be used with XEP. "

Here is the start of an example svg fo:block:

   .

   .

<fo:block >

  <fo:instream-foreign-object content-width="scale-to-fit" width="100%">

<svg:svg

            width="100%" height="100%"

    viewBox="17523842 -10290750.5 6746906 6112968.5"

    xmlns:xlink="http://www.w3.org/1999/xlink"

    xmlns:svg="http://www.w3.org/2000/svg"

>

   .

   .

 

            This file formats without comment but does not show the svg in
the resulting PDF file. Is this because viewBox width and height are used to
determine "intrinsic size" and are too large relative to PDF paper size?

 

If I make the following change to the svg width and height attributes, the
pdf will show the svg map (note: my page master is set to size="landscape" :

<svg:svg

            width="1000" height="650"

    viewBox="17523842 -10290750.5 6746906 6112968.5"

    xmlns:xlink="http://www.w3.org/1999/xlink"

    xmlns:svg="http://www.w3.org/2000/svg"

>

 

 

            Now if I change to: width="1200" height="800" then the PDF
file no longer shows my svg map. As long as I keep the height/width ratio
<0.65 the svg will show in the PDF? However the viewbox appears to change
with the use of different height/width ratios? Adding a
preserveAspectRatio="xMinYMin" attribute to the svg element does not appear
to affect the outcome.

 

What is the relationship between the width and height attributes of the svg
element and visibility in the pdf ?

 

Is there something in the xep docs that I've missed?

 

Thanks

Randy

 

 

-------------------
(*) To unsubscribe, send a message with words 'unsubscribe xep-support'
in the body of the message to majordomo@renderx.com from the address
you are subscribed from.
(*) By using the Service, you expressly agree to these Terms of Service http://www.renderx.com/terms-of-service.html
Received on Wed Jun 15 17:47:29 2005

This archive was generated by hypermail 2.1.8 : Wed Jun 15 2005 - 17:47:32 PDT