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

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 => { el.style.display = 'none' });"}

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

{ "customscript": "document.querySelectorAll('#navbar').forEach(el => { el.style.display = 'none' });"}
Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.