Save PDF 💾📄
Write your pages to a real PDF file
- pdf_pages
- saved_pdf_path
Save PDF 💾📄 is where every workflow in the ComfyUI PDF Nodes pack ends. Merge, rotate, or single-page-select all produce in-memory page lists - none of that is a file until this node writes one. It's an output node, the pack's version of ComfyUI's own save-image nodes, and you'll place it at the bottom of practically every graph you build here. No Save, no PDF on disk.
The inputs that matter
pdf_pages(PDF_PAGES) - the pages to write out. Comes from Load (whole doc), Merge (combined doc), Select (single page), or Rotate (fixed doc).output_directory(STRING, defaultoutput/) - where the file goes, relative to your ComfyUI root folder (sooutput/meansComfyUI/output/, where your generated images already land). Absolute paths work too. If the directory doesn't exist, the node creates it for you - one less thing to trip on.filename_prefix(STRING, defaultcomfy_pdf) - the base name. The node appends.pdf, so you getcomfy_pdf.pdf.overwrite_existing(enum:enable/disable, defaultdisable) - the one setting with a real opinion. Ondisable(the default), an existing file never gets clobbered: the node appends a counter instead, so a second save becomescomfy_pdf_1.pdf, thencomfy_pdf_2.pdf. Onenable, it overwrites the same path every time. If you're re-running a workflow repeatedly and hate.pdf_37piles,enableis your friend; if you want a trail of runs, keepdisable.
The output
saved_pdf_path (STRING) - the full path to the file that was written. It's mostly for your own confirmation - show it in a text node, log it, or pass it to something downstream that wants a file location. The actual saving happens as a side effect; this node's job is done the moment the file exists.
How it works
Under the hood it's pypdf's PdfWriter doing add_page() for every page in the list, then writer.write() to disk. No model, no image libraries, no heavy lifting. It does fail quietly in the pack's signature way: an empty page list just returns an empty string with a console note, so if Save gives you nothing, the empty list almost certainly originated upstream in a failed PDFLoad.
Common issues
- "Where did my file go?" It went to
ComfyUI/output/comfy_pdf.pdf(or wherever you setoutput_directory). Relative paths resolve against the folder where you launched ComfyUI, not the node's folder - the same gotcha asPDFLoad'spdf_path. - Unexpected
_1suffix. That'soverwrite_existingset todisabledoing its job. Toggle it toenableif you actually want the same filename reused. - Nothing appears in the output. Check the console for
PDFSaveNode: No PDF pages provided to save.- then walk back up the graph to the load.
Install
Same pack, same routine:
cd ComfyUI/custom_nodes/
git clone https://github.com/orion4d/ComfyUI_pdf_nodes.git
cd ComfyUI_pdf_nodes && pip install -r requirements.txt
Or ComfyUI Manager → search "ComfyUI PDF Nodes", restart, and it's under the PDF category. Requires only pypdf - no PyMuPDF or Pillow. It's the boring final step, and like all boring final steps it's the difference between a workflow that does something and a workflow that just warms up your RAM.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| pdf_pages | PDF_PAGES | — | |
| output_directory | STRING | output/ | — |
| filename_prefix | STRING | comfy_pdf | — |
| overwrite_existing | COMBO | disable | 2 options: enable, disable |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| saved_pdf_path | STRING | — |