SVG to Submission File
SVG to Submission File
- file
The path from "I have an SVG string" to "the plotter service has my file" runs through this node. SVG to Submission File takes the raw SVG markup that ImageToCenterline or OptimizeSVG produce, wraps it as a PENPLOTTER_FILE - name, bytes, MIME type - and hands it to UploadSubmission so your drawing can be uploaded and plotted.
If you're building one of those image-to-plot pipelines, this is the node that turns an intermediate string into something the rest of the graph can ship. It's the SVG sibling of Image to Submission File and Video to Submission File: three tiny adapters feeding the same upload node, each handling one data type.
How it works
It's a wrapper, full stop. The svg_string input (a multiline string with forceInput, so you can wire it straight from a previous node's string output) is encoded to UTF-8 bytes and packaged as {name, bytes, mime} with mime: image/svg+xml. Your SVG is sent exactly as-is - no parsing, no validation, no optimization. Garbage in, garbage out.
The one input you'll set is name (default drawing.svg). It controls the filename the plotter service sees and, if you leave the extension off, the node appends .svg for you. That's the whole surface area.
Install
It's in the ComfyUI PenPlotter pack. ComfyUI Manager → search "ComfyUI PenPlotter", or:
cd ComfyUI/custom_nodes
git clone https://github.com/wouterverweirder/comfyui-penplotter
Restart ComfyUI. This node itself is dependency-light, but the pack installs its full requirements (numpy>=2.3.4, opencv-python, numba, vpype, websockets, requests, qrcode[pil], plus the AxiDraw API from a URL zip). Manager handles all of that for you.
Common issues
- The file output won't connect -
PENPLOTTER_FILEonly fits UploadSubmission's file slots and pack-internal consumers. Don't expect it to plug into standard save or preview nodes. - The uploaded drawing is wrong - check what's upstream. This node doesn't transform anything, so if your SVG has bad paths or wrong dimensions, they're inherited from ImageToCenterline or wherever the string came from. Run Optimize SVG with vpype first if the linework is messy.
- Name collisions - with up to ten file slots, two nodes defaulting to
drawing.svgwill confuse your upload. Give each a distinctname.
A perfectly boring node that makes the interesting half of the pipeline work.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| svg_string | STRING | — | |
| name | STRING | drawing.svg | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| file | PENPLOTTER_FILE | — |