https://github.com/jordancampos20/c20.htmltopdf
Exporta HTML para PDF
https://github.com/jordancampos20/c20.htmltopdf
csharp html5 nuget-package selenium selenium-webdriver
Last synced: 4 months ago
JSON representation
Exporta HTML para PDF
- Host: GitHub
- URL: https://github.com/jordancampos20/c20.htmltopdf
- Owner: JordanCampos20
- License: gpl-2.0
- Created: 2024-08-16T00:59:26.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-09-15T20:30:24.000Z (almost 2 years ago)
- Last Synced: 2025-03-03T14:11:18.317Z (over 1 year ago)
- Topics: csharp, html5, nuget-package, selenium, selenium-webdriver
- Language: C#
- Homepage: https://www.nuget.org/packages/C20.HtmlToPDF
- Size: 22.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# C20.HtmlToPDF
PT-BR:
funciona normalmente no Windows x86 e x64,
não foi implementado para os outros sistemas.
EN:
works normally on Windows x86 and x64,
it has not been implemented for other systems.
# Example
```cs
using C20.HtmlToPDF;
var fileBase64String = "";
var pathDocuments =
Environment.GetFolderPath(
Environment.SpecialFolder.MyDocuments);
const string html = """
Document
Hello World...
""";
fileBase64String = ConvertToPdf.ConverterHtml(html, new ConvertToPdfOptions(orientation: PrintOrientationOptions.Portrait));
File.WriteAllBytes($@"{pathDocuments}\example_html.pdf", Convert.FromBase64String(fileBase64String));
const string url = "https://www.google.com.br";
fileBase64String = ConvertToPdf.ConverterPage(url, new ConvertToPdfOptions(orientation: PrintOrientationOptions.Portrait));
File.WriteAllBytes($@"{pathDocuments}\example_page.pdf", Convert.FromBase64String(fileBase64String));
```