forrest-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bhatia Praveen, HCLT-Japan" <prav...@hcltech.co.jp>
Subject RE: mapping .svg files for document2pdf
Date Thu, 10 Feb 2005 07:16:58 GMT
Hi,
     I have diagonized more details on the problem, but am yet unable to
comprehend the workaround.

The further diagnosis that I have is:

The intermediate .fo file generated has 
<fo:external-graphic
src="C:\Sumpurn\websites\KanjiSensei/src/documentation/content/xdocs/charts/
bar3d.png" /> 

which is then sent to fo2pdf serializer.

fo2pdf has no idea that charts/bar3d.png was supposed to be serialized
through charts, hence expects the bar3d.png to be present in the respective
directory. Hence the file not found error comes.

Similarly for images/boxes.svg direction, the file generated is
<fo:external-graphic
src="C:\Sumpurn\websites\KanjiSensei/src/documentation/content/xdocs/images/
boxes.png" />

which is sent to fo2pdf serilizer, which in turns doesnt know that boxes.svg
was to be mapped to boxes.png, hence complaints about non-existence of the
file.

Can someone please guide me how to workaround this problem?

regards
Praveen 




Hi,
    I am able to get mapped .png files in the webpage but not in the pdf
from .svg files and chart files of fin.
    The error it gives for generating pdf is that respective .png files are
not found (though the path is correct for where the .svg and .xml chart
files are placed).

    I am trying to get the following figures to appear from document like
index.xml:
1) "charts/area.png"    (Should map from an charts/area.xml file through
JFreeChart/Fins module to a .png file)
2) "images/boxes.png"  (Should map from a charts/boxes.svg file through
svg2png serializer)

Both show correctly on the html page ie localhost:8888/index.html

However, when I look at the pdf file localhost:8888/index.pdf (and the core
logger errors) it says that 
1)charts/area.png file not found
2)images/boxes.png file not found 

>From my limited understanding, I feel that, while for index.html mapping and
pipelies are working correctly, but for index.pdf (which uses xml2fo and
fo2pdf serializer):
1)charts/area.xml did not get mapped through JFreechart/fins to
charts/area.png
2)images/boxes.svg did not get mapped through svg2png serializer to
images/boxes.png.

Additionaly, for charts, I have added the following in the project's
sitemap.xmap 
transformer:
      	<map:transformer name="chart"
				src="it.ipzs.charts.JFCTransformer"
				logger="core"/>

and the following 
mapper
			<map:match name="wildcard" pattern="charts/*.png">
				<map:generate
src="{project:content.xdocs}/charts/{1}.xml"/>
				<map:transform type="chart"/>
				<map:serialize type="svg2png"/>
			</map:match>

What should I add to make the pipeline do similar things for index.pdf also?

regards
Praveen

Mime
View raw message