Samples
Samples use preset parameters, documents, and modular code examples to call each function API of the ComPDF Generation SDK, without UI interaction or parameter settings. Not only does it demonstrate HTML to PDF functionality, but it also provides complete examples of creating PDF documents directly using the Layout API.
These projects not only demonstrate best practices for each function but also provide detailed descriptions. You can observe the impact of each function on PDF documents in the output directory. With Samples, you can quickly learn how to use the functions you need and apply them to your projects.
HTML to PDF Examples
| Name | Description |
|---|---|
| ConvertToPdf | Convert HTML to PDF. |
| RenderTemplate | Combine HTML templates with JSON to generate complete HTML. |
| RenderAndConvert | Combine HTML templates with JSON data to generate complete HTML, and convert the complete HTML to PDF. |
Layout API Examples
| Name | Description |
|---|---|
| CreateParagraph | Create paragraphs with various text formatting options. |
| CreateTable | Create tables with headers, footers, and styled cells. |
| CreateList | Create ordered and unordered lists with multiple styles. |