Crate c2pdf

Source
Expand description

§Code To PDF

This crate provides primitives for generating PDFs containing syntax-highlighted code

code_to_pdf::CodeToPdf is the main struct for this so is likely the best place to start

Modules§

code_to_pdf
Contains HighlighterConfig and CodeToPdf structs
dimensions
Contains Dimensions struct and implementations to simplify passing document dimensions where needed
font_loader
Functions for loading fonts from the system fonts, a path, or using the bundled Helvetica font
helpers
Miscellaneous helper functions
logging
Module for logging on a separate thread
text_manipulation
Primitives for wrapping text

Structs§

ParsedFont
PdfDocument
Parsed PDF document
PdfSaveOptions