Hello,
Hope everyone is doing fine.
I am converting URL (HTML Content) to pdf using HtmlToPdf converter (selectPdf) library and attaching that pdf in user's email as attachment. That pdf can be 7 or 8 pages, coz the content is dynamic
I want pagination at the end of each page and footer with static content at the end of each page, meaning each page end should show page number and some text (Ex. ABC Company)
How to achieve it in dot net with SelectPdf library?
or any alternate solution will be fine.
Thanks in advance
Leon DPosted Feb 23, 2024, 9:45 AM
You can use Spire.PDF to convert HTML to PDF and add header to pdf.
https://www.e-iceblue.com/Tutorials/Spire.PDF/Spire.PDF-Program-Guide/Convert-HTML-to-PDF-Customize-HTML-to-PDF-Conversion-by-Yourself.html
https://www.e-iceblue.com/Tutorials/Spire.PDF/Spire.PDF-Program-Guide/Header-and-Footer/Add-Footer-to-Existing-PDF-in-C-VB.NET.html
Abhishek YadavPosted Feb 16, 2024, 5:51 AM
To achieve pagination and footer with static content at the end of each page when converting HTML content to PDF using the SelectPdf library in .NET, you can follow these steps:
Sushant TorankarPosted Feb 15, 2024, 8:03 AM
Hi Lokesh,
I tried below code but it's not working. You can see as in below image page is split to 2 diff page, but don't see any footer or paging
Sushant TorankarPosted Feb 14, 2024, 2:24 PM
Thank you,
Sure I will try this
Lokesh VarmanPosted Feb 14, 2024, 3:19 AM
To achieve pagination and add a footer with page numbers and static content to each page of a PDF using the SelectPdf library in .NET, you can follow these steps:
Here's a sample code demonstrating how to achieve this:
Replace
"your_html_url"with the URL of the HTML content you want to convert to PDF. Adjust the margins, header, footer, and other options according to your requirements.This code will create a PDF document with pagination at the bottom of each page and a footer with the static content "ABC Company" at the bottom right corner of each page.
Note : AI Generated