[Html2PdfConverter] Removing Item from PDF Export
Forge component by Miguel 'Kelter' Antunes
Application Type
Traditional Web


I'm trying to use the html 2 pdf converter for a screen which works great, but I have a modal to select what is on the export before it's actually exported. When the modal closes and we then export, the modal exists on the background and obscures the actual content. I found that there's a span with display none with no content in it, at any rate is there any way to remove that modal from the DOM so it's not rendered?

As you can see, the smaller text is what needs to show with a white background and the larger text is the modal.


You can try wrapping your modal in an if statement with a property to completely hide it and pass that property via the Html2PdfConverter URL. That way when Html2PdfConverter renders the page the modal won't be included at all in the output.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.