Skip to content
ComPDF

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

NameDescription
ConvertToPdfConvert HTML to PDF.
RenderTemplateCombine HTML templates with JSON to generate complete HTML.
RenderAndConvertCombine HTML templates with JSON data to generate complete HTML, and convert the complete HTML to PDF.

Layout API Examples

NameDescription
CreateParagraphCreate paragraphs with various text formatting options.
CreateTableCreate tables with headers, footers, and styled cells.
CreateListCreate ordered and unordered lists with multiple styles.