Page 1 of 1

SVG to PDF

Posted: 27 Apr 2017, 09:06
by Hasher
Hi all,

I have a series of Magazines that I want to convert to PDF. Currently the pages are in .svg file format. Each page consists of a svg file which contains the overlay text and a jpg that contains some text and background image. I have attached a sample page to show what I mean.

http://tinyurl.com/lht8gzz


I have tried Svg2Png https://sourceforge.net/projects/svg2png/ but it has a very noticeable drop in quality.

Has anyone have suggestions on how I can convert these files to PDF?

Thanks
Paul

Re: SVG to PDF

Posted: 27 Apr 2017, 17:07
by cday
Looks like a resolution problem, the svg file you uploaded opens fine in Firefox, which seems to serve as a useful freeware SVG viewer. :D

The sourceforge download page you linked to refers to options to select the resolution and density, so have you located those controls?

Re: SVG to PDF

Posted: 27 Apr 2017, 21:10
by Hasher
Hi Cday,

Yes . I am thinking the conversion drops the resolution. I have played with the controls for size and density but obviously it has it's limits.


I would be happy with a viewer . As each time I want to read the next page I close my browser and open another browser.

Paul

Re: SVG to PDF

Posted: 28 Apr 2017, 05:11
by cday
I've had a quick Google and it looks as if there can be quality issues with some SVG readers, slightly surprising but I suppose there must be some technical reason.

You might find this list of freeware SVG viewer software useful.

If you decide later that you still wish to convert multiple SVGs to a multi-page PDF, some of the above software may provide a way of doing that, or if you can convert the files successfully to PNGs, for example, there is other freeware software that can be used.

Re: SVG to PDF

Posted: 28 Apr 2017, 08:56
by dingodog
Hasher wrote: 27 Apr 2017, 09:06 Hi all,
I have a series of Magazines that I want to convert to PDF. Currently the pages are in .svg file format
there are several programs to perform this task

one solution can be

*Batik rasterizer*
- https://xmlgraphics.apache.org/batik/

Code: Select all

java -jar path...to/batik-rasterizer.jar -m application/pdf *.svg
or

*svg2pdf*
- https://github.com/openclipart-dev/svg2 ... /svg2pdf.c
a simple c program based on libcairo

Code: Select all

usage: svg2pdf input_file.svg output_file.pdf
so, for batch automatic conversion of several svg to pdf; you can type in a terminal window

Code: Select all

for f in *.svg; do svg2pdf $f ${f%%.svg}.pdf;done
svg2pdf.gz I attach gzipped svg2pdf executable I built with gcc 4.1.2 with 2.6.21.7 kernel

Re: SVG to PDF

Posted: 29 Apr 2017, 09:07
by Hasher
Thanks Dingodog and Cday.

I have taken another track by open and save in a browser as a saved as a PDF . The rendering is almost as good as the original .
Can automate it thru scripting.


Thanks all that helped out!
Paul