Inkscape.org
Beginners' Questions Question about Command Line Options
  1. #1
    Honeybeelette Honeybeelette @Honeybeelette
    *

    I have a PDF file with a lot of text and images.

    If you open the PDF file in InkScape GUI and save it as SVG, it will be saved without any problems.
    Here's how I worked in the GUI:

    Open File -> Select PDF -> Poppler/Cairo

    Path -> Object to Path -> save svg

    SVG generated in this way is displayed normally in my application.

    But when I run it through the command line most of the objects are not shown.

    Am I doing something wrong with my command line options?
    How can I apply the same options as the GUI?

    ย 

    inkscape --export-filename=d:\test.svg --pdf-page=190 --pdf-popplerย --export-text-to-path --export-background=white d:\Test.pdf

    What I want is
    Command Line
    (Windows OS)
    in
    How to set all objects to path and
    This is how to set Background-Color to Red.

  2. #2
    Honeybeelette Honeybeelette @Honeybeelette

    inkscape --export-filename=d:\testtest.svg --actions="select-all;object-to-path;export-background:red;" --pdf-poppler --pdf-page=190 d:\Test.pdf

    ย 

    I have succeeded in perfectly saving the character with the above command.

    But still the background color is not applied.

    I also need to save a PDF with many pages as SVG.

    It is very slow and takes up a lot of capacity.

    Is there a way to efficiently process multiple pages at once and reduce the capacity?

    while reducing the capacity
    I want more speed.

  3. #3
    Polygon Polygon @Polygonโš–๐ŸŒถ

    I guess the background is still transparent? Even a Background color set to A:100 will appear transparent in SVG here.

  4. #4
    inklinea inklinea @inklineaโ›ฐ๏ธ

    No, I don't think you will get any extra speed from that command line per file. You may get a slight increase feeding a file list into shell mode, but I have not tried it with PDFs.

    There are other options, but maybe that's not a route you want to go down.

    You can use pdftocairo on windows 10 under Ubuntu 20.04 installed from the Windows store. It is very fast, less that 1s in many cases.

    ย 

    ย 

  5. #5
    Honeybeelette Honeybeelette @Honeybeelette

    @inklinea

    Thanks for your comments.
    I have downloaded version 21.03 of pdftocairo.

    And I did the document conversion.

    Obviously, the pace is very fast.

    But there were two problems.

    The first was that I couldn't find a property like inkscape's object-to-path option.
    As a result, when I open the svg in my application, all the fonts are not visible.

    The second problem is that even if you specify the range of pages you want to convert, only a single document is created, which cannot be easily opened as a very large svg file.

    Should I use another place for questions about pdftocairo?

    together
    What do you think about reconverting the svg file created in pdftocairo to inkscape? (The object-to-path option is required.)

  6. #6
    inklinea inklinea @inklineaโ›ฐ๏ธ

    Well, I wrote a powershell batch files, to make a list of command lines to pipe into Inkscape shell mode.

    I was faster than I expected but.....

    Sadly Inkscape only uses actions, and seems to ignore any options - namely the --pdf-poppler option.

    The text is not correct. If anyone knows if shell mode can use the switches / options as well as actions please reply :)

Inkscape Inkscape.org Inkscape Forum Beginners' Questions Question about Command Line Options