Link Search Menu Expand Document

How to hide selected html content using a custom js script before converting

For Zapier, Integromat and others plugins insert custom profiles into profiles field. For API calls please set value as string in profiles parameter as string.

URL to PDF and HTML to PDF can run small javascript scripts before converting to PDF. You can hide selected elements using this customScript param in profiles.

For example, let’s hide all elements with navbar class name:

{ "customscript": "document.querySelectorAll('.navbar').forEach(el => { = 'none' });"}

You can also hide elements by their id instead of class:

{ "customscript": "document.querySelectorAll('#navbar').forEach(el => { = 'none' });"}