Skip to content
DemoSampleAPI ReferenceFAQ

PDF Generation Template Editor

Open-source visual PDF generation engine with customizable templates and developer-friendly APIs.

View on GitHub

Notes ​

  • Existing files are not overwritten: Neither ExportHtml nor WritePdf overwrites existing files. They return EMAIL_ERROR_WRITE when the target exists, so delete the old file or use another path first. When WritePdf fails, it removes the incomplete file it created.
  • Retry after failure: A failed PDF output does not discard the generated HTML. After fixing the problem, you can call WritePdf again on the same result.
  • PDF content: The PDF only contains the email headers, the body and (optionally) the attachment list. It does not contain the attachment content, and the download links in the attachment list are removed. Content wider than the page is scaled down proportionally for the whole page, to no less than 50%.
  • Offline processing: Remote images are not downloaded, and scripts, event attributes, tracking pixels and similar content are removed.
  • Releasing resources: Call Dispose() on a CEmailResult when done, also when the conversion fails. We recommend using.
  • Concurrency: Different conversion results can be processed in parallel. The same result must not be used from multiple threads at the same time. PDF output is serialized inside the SDK.