Hi Andreas,

Andreas Neumann <[EMAIL PROTECTED]> wrote on 03/27/2006 09:49:00 
AM:

> I am trying to render a SVG to PDF using Batik-rasterizer on the command 

> line but get an error message:
> -----------
> Error while converting files:
>   Error: invalid url 

   The code wants the input to end in either '.svg' or '.svgz' (so it can
replace it with '.pdf').  So you can use the old IE hack and add 
"&dummy=.svg" on the end.

   You will still get a pretty ugly file name from the Rasterizer (it
will have all of the args in it).  If you know a little bit of Java and
Java Servlets it's pretty easy to write a wrapper around the PDFTranscoder 
that
will do this on the server... 

> (http://www.carto.net/williams/yosemite/unstable/printMap.psvg?
> 
paperWidth=210&paperHeight=297&mapTitle=Yosemite&xmin=270762.25&xmax=279262.
> 
25&ymin=4174203.5&ymax=4186053.5&mapLayers=hydrology,transportation,landcover,
> elevation&relief=true&ortho=false&scale=50000)
> ------------
> 
> The URL is rather complicated since I pass parameters into a serverside 
> script.
> 
> My command was as follows:
> -------------
> java -Xmx512M -jar batik-rasterizer.jar -d test.pdf -m application/pdf 
> -dpi 300 -onload 
> http://www.carto.net/williams/yosemite/unstable/printMap.psvg?
> paperWidth=210\&paperHeight=297\&mapTitle=Yosemite\&xmin=270762.
> 25\&xmax=279262.25\&ymin=4174203.5\&ymax=4186053.5\&mapLayers=hydrology,
> 
transportation,landcover,elevation\&relief=true\&ortho=false\&scale=50000
> ----------
> 
> I tested with both Batik SVN and Batik 1.6 on Linux (bash).
> 
> The URL works fine in Squiggle or other browsers. I escaped the "&" 
> (ampersand) signs since he previously cutted the URL off at the "&" sign 

> and would also report "invalid url".
> 
> I also tried using quotes around the ULR.
> 
> Anyone knows where the problem is? It would help me a lot.
> 
> Thanks,
> Andreas
> 
> -- 
> ----------------------------------------------
> Andreas Neumann - Institute of Cartography
> Swiss Federal Institute of Technology (ETH)
> ETH Hoenggerberg
> CH-8093  Zurich, Switzerland
> Phone: ++41-1-633 3031, Fax: ++41-1-633 1153
> e-mail: [EMAIL PROTECTED]
> www: http://www.carto.net/neumann/
> SVG.Open: http://www.svgopen.org/
> Carto.net: http://www.carto.net/
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to