Skip to content

SelectionSimplify #57

@peterkimga

Description

@peterkimga

Hi

I got a problem with this code to run correctly.

So this is my code:

const fs = require('fs');
const Inkscape = require('inkscape');

const inkscape = new Inkscape([
  '--verb=EditSelectAll',
  '--verb=SelectionSimplify',
  '--verb=FileSave',
  '--verb=FileClose',
  '--verb=FileQuit'
]);

var readableStream = fs.createReadStream('./input.svg');
var writableStream = fs.createWriteStream('./output.svg');

readableStream.pipe(inkscape).pipe(writableStream);

But is not doing anything to SVG. It's just copying the file. When I do the steps in Inkscape 1.0.2 all works as it should. The path is optimized and all. The paths are grouped but it's not stopping the application to do it.

I got Terminal working with "inkscape" so that's ok.

Is there a way to pass config to your class? Maybe this is the problem?

I will like to hear your feedback on how to make this run.

Regards
Peter

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions