Select.Pdf Library for .NET can be downloaded as a NuGet package from the following page:
https://www.nuget.org/packages/Select.Pdf/
Add a “Save as PDF” button to your website
Allow your visitors to save/export your webpages as pdf. With Select.Pdf is very simple. Just add a link on your page and you are done.
<a href="https://selectpdf.com/export-to-pdf/?" onclick="if(!this.urlAdded)href+='&url='+encodeURIComponent(location.href);this.urlAdded=1">Save as Pdf</a>
For more details and parameters description, take a look at Save as Pdf feature main page.
‘Hello World’ from SelectPdf
It’s very easy to use Select.Pdf SDK for .NET. Take a look at the simple code below.
1 2 3 4 5 6 7 8 9 10 11 |
SelectPdf.PdfDocument doc = new SelectPdf.PdfDocument(); SelectPdf.PdfPage page = doc.AddPage(); SelectPdf.PdfFont font = doc.AddFont(SelectPdf.PdfStandardFont.Helvetica); font.Size = 20; SelectPdf.PdfTextElement text = new SelectPdf.PdfTextElement(50, 50, "Hello world!", font); page.Add(text); doc.Save("test.pdf"); doc.Close(); |