NODE.JS · GO · COMMAND-LINE WRAPPERS

Keep the wrapper.
Swap the program.

If your package starts wkhtmltopdf, Marqius can take that executable name. Keep the calling code and test its output stream and error handling.

curl -fsSL https://marqius.com/marqius-wkhtmltopdf.sh | bash
wkhtmltopdf (current)Marqius (drop-in)
Illustrative pair of matching sample invoices
A simple, drop-in migration Keep your Node & Go workflow Install in minutes Compare your own PDFs
1

Install

Install the compatible program alongside your current wkhtmltopdf.

curl -fsSL https://marqius.com/marqius-wkhtmltopdf.sh | bash
2

Node.js

Keep your calling code and update the executable path.

const wkhtmltopdf = require("wkhtmltopdf");
wkhtmltopdf.command = "/usr/local/bin/wkhtmltopdf";
wkhtmltopdf(html, { pageSize: "A4" }).pipe(fs.createWriteStream("report.pdf"));
3

Compare output

Render a representative document and check the PDF before switching production.

marqius wkhtmltopdf invoice.html new.pdf
marqius compare old.pdf new.pdf
PRACTICAL DETAILS

What to check before you switch.

Go

wkhtmltopdf.SetPath("/usr/local/bin/wkhtmltopdf")
pdfg, _ := wkhtmltopdf.NewPDFGenerator()
pdfg.AddPage(wkhtmltopdf.NewPageReader(strings.NewReader(html)))
_ = pdfg.Create()

Other command-line callers

Exercise standard input/output, page options and the exit status your application expects. Use the switching manual as a checklist.

Marqius is proprietary software from Simple AI LLC. It is independent of the wkhtmltopdf project. Other product names identify the tools discussed in these guides.
QUESTIONS & ANSWERS

Node & Go questions

Do I have to replace my Node.js or Go package?

Usually no if it starts a wkhtmltopdf executable. Configure the path to the installed compatible program where your package pins one.

Can my application stream the PDF?

Test the standard input and output path your application already uses, including error handling and exit status.

Will the same command work in CI?

Install the correct Linux build and the fonts used by your templates in the runner, then render and compare a test document.

What if a package loads libwkhtmltox instead of a program?

An executable replacement will not work for a direct native-library binding. That integration needs a separate adapter.