Table of Contents
- Getting Started
- EO.Pdf
- Overview
- Installation and Deployment
- Using HTML to PDF
- Using HTML to PDF
- Quick Start
- Setting Page Size and Margins
- Resizing Output
- Output Paging
- Web Page Authentication
- HTTP Post and Headers
- JavaScript in HTML
- Conversion Trigger
- Links in HTML
- Page Header and Footer
- Partial Page Conversion
- Repeating Table Header and Footer
- Merging Multiple HTML pages
- Generating Page Images
- Using with PDF Creator
- Creating Interactive Form Elements
- Working with Secure Pages
- Using HtmlToPdfSession object
- Troubleshooting HTML to PDF
- Debugging HTML to PDF
- Using PDF Creator
- Working with Existing PDF Files
- Using in Web Application
- Advanced Topics
- EO.Web
- EO.WebBrowser
- EO.Wpf
- Common Topics
- Reference
Partial Page Conversion |
EO.Pdf HTML to PDF can convert only a portion of the Web page. To use this feature, set HtmlToPdf.Options.VisibleElementIds to the ID of the element that is to remain visible in the final PDF file. For example, you can set VisibleElementIds to "item_list" while converting the following HTML:
<html> <body> <h1>Partial Page Conversion</h1> <p> Here is the detailed list: </p> <div id="item_list"> ....items.... <div id="item_to_hide"> ...an item to be hidden.... </div> ....more items.... </div> </body> </html>
In this case, neither "Hello" nor "Here is the detailed list" will be visible in the final PDF file. Furthermore, you can also set HtmlToPdf.Options.InvisibleElementIds to explicitly hide elements even though they are marked as visible through VisibleElementIds. For example, with the above HTML, you can set InvisibleElementIds to "item_to_hide" to remove that item from the item list.
Both VisibleElementIds and InvisibleElementIds accept multiple IDs. To specify multiple IDs, use ";" to separate them. For example, "item_list1;item_list2".