You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by Phillip Rhodes <rh...@telerama.com> on 2002/11/04 10:06:37 UTC

svg problems in pdf

I am trying to use svg for my charts and graphs in a pdf.

I am having the following problems:

1)      the chart area is not respected by the other areas.  The svg chart 
seems to allow other content to "run into it".  If I do not use svg, but a 
jpg or other image for the chart, this does not happen.
"Good fences make good neighbors"  (just came to mind)

2)      The svg image looks very rough.  I need to set "Smooth line art" 
manually in the acrobat reader.  Is there anyway around this?  The average 
user is not going to know how to do this, and I will get screamed at.

3)   The svg does not get scaled.  I have tried setting a width on the 
image.  I don't think it is doing anything.  The svg image goes beyond my 
page margins.  it doesn't respect anything!

                            <fo:block>
                               <fo:external-graphic 
src="http://test.rhoderunner.com/hragraph/servlet/chart?val=x&amp;title=Health+Score&amp;showLegend=true&amp;series=November+1999&amp;chartValues=1&amp;chartValues=14&amp;chartValues=1&amp;chartValues=1&amp;chartValues=25&amp;chartValues=9&amp;chartValues=15&amp;categories=Cancer&amp;categories=Heart+Disease&amp;categories=Emphysema&amp;categories=Cirrhosis&amp;categories=Arthritis&amp;categories=Overall&amp;categories=Self-assessed+Health&amp;chartType=1&amp;format=svg" 
width="13cm" />
                            </fo:block>

Thanks for any pointers.  I have a ton of example fo and pdf that you can 
see that demonstrates this problem at http://test.rhoderunner.com/logs/









Re: svg problems in pdf

Posted by "J.Pietschmann" <j3...@yahoo.de>.
Phillip Rhodes wrote:
> 2)      The svg image looks very rough.  I need to set "Smooth line art" 
> manually in the acrobat reader.  Is there anyway around this?

No, currently not. You'll have to take the shouting. Or invent
some machinery which sets the flag remotely.
I'm not even sure whether this is feature can be set in the PDF
or whether it is completely client controlled. You might examine
iText
   http://www.lowagie.com/itext
whether it allows setting this feature. If so, try to postprocess
the FOP generated PDF with iText. There is demo code available
from the list archive.

> 3)   The svg does not get scaled.  I have tried setting a width on the 
> image.

If you want to be sure about the appearance, set both height and
width on the fo:external-graphics to the same values as on the
SVG document element. Use explicitely specified length units.

J.Pietschmann