Spaces:
Sleeping
Sleeping
Update server.js
Browse files
server.js
CHANGED
|
@@ -36,13 +36,24 @@ const runInkscape = (svg, mode) => {
|
|
| 36 |
|
| 37 |
const actions = [
|
| 38 |
`file-open:${inputFile}`,
|
| 39 |
-
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
|
| 43 |
-
|
| 44 |
-
|
| 45 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 46 |
].join(';');
|
| 47 |
|
| 48 |
const command = `xvfb-run -a inkscape --actions="${actions}"`;
|
|
|
|
| 36 |
|
| 37 |
const actions = [
|
| 38 |
`file-open:${inputFile}`,
|
| 39 |
+
'select-all',
|
| 40 |
+
|
| 41 |
+
|
| 42 |
+
// ?? 新增:强制填充
|
| 43 |
+
'object-set-property:fill,#000000',
|
| 44 |
+
'object-set-property:fill-opacity,1',
|
| 45 |
+
|
| 46 |
+
// ?? 原有逻辑
|
| 47 |
+
'object-stroke-to-path',
|
| 48 |
+
|
| 49 |
+
|
| 50 |
+
'path-combine',
|
| 51 |
+
|
| 52 |
+
'path-union',
|
| 53 |
+
|
| 54 |
+
`export-filename:${outputFile}`,
|
| 55 |
+
'export-do',
|
| 56 |
+
'file-close'
|
| 57 |
].join(';');
|
| 58 |
|
| 59 |
const command = `xvfb-run -a inkscape --actions="${actions}"`;
|