SVG to PDF

General discussion about software packages and releases, new software you've found, and threads by programmers and script writers.

Moderator: peterZ

Post Reply
Hasher
Posts: 77
Joined: 26 Sep 2009, 03:05

SVG to PDF

Post 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
cday
Posts: 447
Joined: 19 Mar 2013, 14:55
Number of books owned: 0
Country: UK

Re: SVG to PDF

Post 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?
Hasher
Posts: 77
Joined: 26 Sep 2009, 03:05

Re: SVG to PDF

Post 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
cday
Posts: 447
Joined: 19 Mar 2013, 14:55
Number of books owned: 0
Country: UK

Re: SVG to PDF

Post 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.
User avatar
dingodog
Posts: 110
Joined: 22 Jul 2010, 18:19
Number of books owned: 1000
Country: on the net
Location: on the net
Contact:

Re: SVG to PDF

Post 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
Attachments
svg2pdf.gz
svg2pdf gcc 4.1.2
(2.71 KiB) Downloaded 340 times
Hasher
Posts: 77
Joined: 26 Sep 2009, 03:05

Re: SVG to PDF

Post 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
Post Reply