Restrict local files
Allow only the files conversion needs.
The wkhtmltopdf maintainer warns against converting HTML you do not trust. Protect the converter now, then test the move to a maintained engine.

Allow only the files conversion needs.
Clean or filter HTML from untrusted sources.
Disable it when a document does not need it.
Limit what the converter can reach.
Compare real PDFs and keep a fallback.
Install Marqius, render your HTML, and compare its PDF with your current tool.
curl -fsSL https://marqius.com/marqius-wkhtmltopdf.sh | bashThe maintainer’s status page says Qt 4 is unsupported, its WebKit has not been updated since 2012, and untrusted HTML can compromise the server. Read the original advice before making a migration decision.
wkhtmltopdf project statusArchived project repositoryMarqius is maintained and does not embed the 2012 browser engine. A replacement converter still needs isolation when it fetches URLs or receives HTML from other users.
No. The wkhtmltopdf maintainer warns against untrusted HTML. Sanitize input and restrict filesystem and network access before conversion.
No. Any converter that reads files or fetches URLs needs appropriate isolation and resource limits.
Restrict local files, sanitize untrusted HTML, disable unnecessary JavaScript, limit outbound network access and compare real PDFs before migration.
The wkhtmltopdf maintainer explains the risks and recommendations on the project status page at wkhtmltopdf.org/status.