Welcome to HiQPdf Demo
HTML to PDF
HTML to PDF Converter Demo
Merge Multiple HTML to PDF
Add HTML in PDF Header and Footer
Add Header and Footer using Browser
Add Header and Footer on Merged PDF
Select HTML Elements to Convert to PDF
Select HTML Elements to Exclude from PDF
Retrieve HTML Element Positions in PDF
Add HTML Stamp to Generated PDF
Repeat HTML Table Header and Footer
Control PDF Page Breaks with CSS
Auto Create Outlines and Links
Auto Create Table of Contents
Auto Create Tagged PDF
Set Conversion Triggering Mode
Select Media Type for Rendering
Web Fonts Advanced Support
Convert Current View with Form Data
Convert Another View with Form Data
PDF Viewer Settings
PDF Security Settings
PDF Digital Signatures
Set HTTP Headers Demo
Set HTTP Cookies Demo
GET and POST Requests Demo
HTML to Image
Convert HTML to Image
Select HTML Elements to Convert to Image
Select HTML Elements to Exclude from Image
PDF Creator
Create PDF Documents
PDF Editor
Add HTML Stamp to Existing PDF
Word to PDF
Convert Word DOCX to PDF
Select HTML Elements to Exclude from Image
Use this demo to exclude selected parts of an HTML page from conversion to image by entering a CSS selector. You can either provide a page URL or paste HTML code, optionally with a base URL. The selector allows you to choose exactly which content will be excluded from the image. You can choose to remove or simply hide the excluded elements.
Convert HTML with Base URL
Convert URL or Local File
HTML String To Convert
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <title>Exclude HTML Elements from Conversion Demo</title> <style> body { font-family: Arial, sans-serif; margin: 0; padding: 0; background-color: #f9f9f9; } header, footer { background-color: #e0e0e0; text-align: center; padding: 20px; color: #333; } #ExcludedHtmlElement { padding: 30px; background-color: #ffffff; margin: 20px auto; max-width: 800px; box-shadow: 0 0 10px rgba(0,0,0,0.1); } .image-container { text-align: center; margin: 20px 0; } img { max-width: 100%; height: auto; border-radius: 8px; box-shadow: 0 0 10px rgba(0,0,0,0.2); } h2 { color: #0055a5; } code { background-color: #eef; padding: 2px 5px; border-radius: 4px; } </style> </head> <body> <header> <h1>Exclude HTML Elements from Conversion to PDF</h1> <p>This header will be included in the PDF.</p> </header> <!-- This section will be excluded from PDF --> <div id="ExcludedHtmlElement"> <h2>Content to be Excluded from PDF</h2> <p>This section contains the HTML elements that will be excluded from the generated PDF file. It includes text, images and basic formatting.</p> <div class="image-container"> <a href="http://www.hiqpdf.com"> <img alt="Logo Image" src="Images/HiQPdfLogo.png" /> </a> </div> </div> <footer> <p>This is the footer section that should be included in the PDF.</p> </footer> </body> </html>
Base URL
HTML Page to Convert URL
Excluded HTML Elements Options
CSS Selector:
Enable CSS Selector
Remove Excluded Elements