Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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: about 1 month 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 (4 months ago)
- Default Branch: main
- Last Pushed: 2024-09-15T20:30:24.000Z (3 months ago)
- Last Synced: 2024-11-14T08:06:54.283Z (about 1 month 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));
```