Samples
The Samples use preset parameters to call the API of PDF Generation SDK for Java for each function without UI interaction or parameter settings. This is achieved through modular code examples. 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 the best practices for each function but also provide detailed introductions. The impact of each function on PDF documents can be observed in the output directory. With the help of the 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 template with JSON and generate complete HTML. |
| RenderAndConvert | Combine HTML template 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. |