Quantcast

convert pdf to svg from command line

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

convert pdf to svg from command line

Matei Stroila-2
Are there any command line options for the inkscape executable to convert PDF to SVG?

Thanks,
Matei


     

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Inkscape-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/inkscape-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: convert pdf to svg from command line

Richard Querin
On Thu, Jun 12, 2008 at 7:26 AM, Matei Stroila <[hidden email]> wrote:
> Are there any command line options for the inkscape executable to convert PDF to SVG?
>
> Thanks,
> Matei
>

I'm not sure how to do this. You could use something like ImageMagick
to convert the pdf to a png first, and then use inkscape to open the
file and export a plain svg:

---------------------------------------------
convert -density 200 fileA.pdf fileB.png

inkscape -f fileB.png -l fileC.svg

--------------------------------------------
This indeed does create an svg file, but it is an svg file containing
a bitmap. The vector representation of the original pdf is lost when
you first convert it to png.

I'm not sure there is a way of opening a pdf file in Inkscape. And
ImageMagick can't convert from PDF to SVG (at least not that I'm aware
of). Perhaps there is some other tool that can do the job.

RQ

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Inkscape-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/inkscape-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: convert pdf to svg from command line

bulia byak
In reply to this post by Matei Stroila-2
On Thu, Jun 12, 2008 at 8:26 AM, Matei Stroila <[hidden email]> wrote:
> Are there any command line options for the inkscape executable to convert PDF to SVG?

I just fixed it in SVN (rev 18892) so now this will work:

inkscape file.pdf --export-plain-svg=file.svg

It will take the first page of the PDF and all the default import
options. Before, it crashed because it tried to open the PDF import
preferences dialog and could not do it in the command line mode.

--
bulia byak
Inkscape. Draw Freely.
http://www.inkscape.org

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Inkscape-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/inkscape-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: convert pdf to svg from command line

heathenx-2
bulia byak wrote the following on 6/12/2008 1:12 PM:

> On Thu, Jun 12, 2008 at 8:26 AM, Matei Stroila <[hidden email]> wrote:
>> Are there any command line options for the inkscape executable to convert PDF to SVG?
>
> I just fixed it in SVN (rev 18892) so now this will work:
>
> inkscape file.pdf --export-plain-svg=file.svg
>
> It will take the first page of the PDF and all the default import
> options. Before, it crashed because it tried to open the PDF import
> preferences dialog and could not do it in the command line mode.
>


A fairly decent alternative is pdf2svg from pdftron (http://www.pdftron.com/pdf2svg/index.html).
It's a cross-platform command-line app that seems to work rather well with Inkscape. One can batch
out a directory full of pdf's and convert them to svg, lickety split.

Example:

pdf2svg -o converted_svg *.pdf

heathenx

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Inkscape-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/inkscape-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: convert pdf to svg from command line

Matei Stroila-2
In reply to this post by Matei Stroila-2
Thanks a lot bulia! This is exactly what I was looking for.

Matei

----- Original Message ----
From: bulia byak <[hidden email]>
To: Inkscape User Community <[hidden email]>
Sent: Thursday, June 12, 2008 12:12:45 PM
Subject: Re: [Inkscape-user] convert pdf to svg from command line

On Thu, Jun 12, 2008 at 8:26 AM, Matei Stroila <[hidden email]> wrote:
> Are there any command line options for the inkscape executable to convert PDF to SVG?

I just fixed it in SVN (rev 18892) so now this will work:

inkscape file.pdf --export-plain-svg=file.svg

It will take the first page of the PDF and all the default import
options. Before, it crashed because it tried to open the PDF import
preferences dialog and could not do it in the command line mode.

--
bulia byak
Inkscape. Draw Freely.
http://www.inkscape.org

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Inkscape-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/inkscape-user



     

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Inkscape-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/inkscape-user
Loading...