1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
// Create PDFs from Markdown, HTML, and plain text.
// Run: dotnet run
using .;
Console.;
// From Markdown
var markdown = @"# Project Report
## Summary
This document was generated from **Markdown** using pdf_oxide.
- Fast rendering
- Clean typography
- Cross-platform
";
var pdf = Pdf.;
pdf.;
Console.;
// From HTML
var html = @"<html><body>
<h1>Invoice #1234</h1>
<p>Generated from <em>HTML</em> using pdf_oxide.</p>
<table><tr><th>Item</th><th>Price</th></tr>
<tr><td>Widget</td><td>$9.99</td></tr></table>
</body></html>";
pdf = Pdf.;
pdf.;
Console.;
// From plain text
var text = "Hello, World!\n\nThis PDF was created from plain text using pdf_oxide.";
pdf = Pdf.;
pdf.;
Console.;
Console.;