How can I setting import option to poppler/cairo via command line?

Post questions on how to use or achieve an effect in Inkscape.
deepbluesea
Posts: 2
Joined: Sun Sep 17, 2017 6:06 am

How can I setting import option to poppler/cairo via command line?

Postby deepbluesea » Sun Sep 17, 2017 6:13 am

With GUI, I can select the poppler/cairo option instead of internal importing in the dialog when opening a pdf file. How can I select this option with command line? I want to batch convert pdf files to emf files. Following command can work except the poppler/cairo option issue.
inkscape -f test.pdf --export-emf=test1.emf

theozh
Posts: 437
Joined: Fri Mar 23, 2012 6:30 pm

Re: How can I setting import option to poppler/cairo via command line?

Postby theozh » Tue Sep 19, 2017 7:14 am

Welcome @deepbluesea to the Inkscape forum.
Well, I still do struggle with the command line support in Inkscape...
probably you can't set this option... :-( ...at least I don't know how...

Maybe you could do it in a two step process:
1. use a standalone version of Poppler for Windows to convert PDF to SVG
http://blog.alivate.com.au/poppler-windows/

Code: Select all

pdftocairo.exe -svg "File.pdf" "File.svg"

2. use Inkscape (option -z without GUI) to convert SVG to EMF

Code: Select all

inkscape -z -f "File.svg" -M "File.emf"

It seems to convert something but I cannot tell whether the output is always correct.
I never understood what EMF is good for...
Maybe there are converters which can convert PDF to EMF in a single step?
Win7/64, Inkscape 0.92.2

Moini
Posts: 3381
Joined: Mon Oct 05, 2015 10:44 am

Re: How can I setting import option to poppler/cairo via command line?

Postby Moini » Wed Sep 20, 2017 9:21 am

Something doesn't work? - Keeping an eye on the status bar can save you a lot of time!

Inkscape FAQ - Learning Resources - Website with tutorials (German and English)

deepbluesea
Posts: 2
Joined: Sun Sep 17, 2017 6:06 am

Re: How can I setting import option to poppler/cairo via command line?

Postby deepbluesea » Sun Oct 01, 2017 7:24 am

@theozh, thanks for the info although it is not a perfect solution on my case.
@Moini, I noticed the bug but it seemed a coding case. There is no importing option or preference for importing pdf in command line.

Moini
Posts: 3381
Joined: Mon Oct 05, 2015 10:44 am

Re: How can I setting import option to poppler/cairo via command line?

Postby Moini » Sun Oct 01, 2017 8:40 am

Correct. It doesn't work at the moment - but it might, wenn https://bugs.launchpad.net/inkscape/+bug/1507740 is fixed (then it will load the settings from your preferences file).
Something doesn't work? - Keeping an eye on the status bar can save you a lot of time!

Inkscape FAQ - Learning Resources - Website with tutorials (German and English)


Return to “Help with using Inkscape”