pub enum RenderError {
Font(FontError),
Image(ImageEmbedError),
MissingFont(FontKey),
PdfAFeatureDisabled,
ZugferdFeatureDisabled,
TaggedPdfFeatureDisabled,
NoFontsRegistered,
}Variants§
Font(FontError)
Image(ImageEmbedError)
MissingFont(FontKey)
A Text used a FontKey (e.g. via .font(key), or .italic()
when no italic was registered) that FontRegistry has nothing
registered under — a typed error instead of silently substituting
the registry’s default font.
PdfAFeatureDisabled
Document::pdf_a3b() was set but this crate wasn’t compiled with
the pdf-a feature — a clear error instead of silently rendering
a non-conformant PDF the caller believes is PDF/A-3b (issue #25).
ZugferdFeatureDisabled
Document::zugferd_xml() was set but this crate wasn’t compiled
with the zugferd feature (issue #26) — same reasoning as
PdfAFeatureDisabled.
TaggedPdfFeatureDisabled
Document::pdf_ua() was set but this crate wasn’t compiled with
the tagged-pdf feature (issue #27) — same reasoning as
PdfAFeatureDisabled.
NoFontsRegistered
render_with_fonts/render_with_fonts_and_diagnostics were called
with a FontRegistry nothing was ever registered on — layout has
no error channel of its own (every width/wrap lookup just falls
back to whatever FontRegistry::entry finds), so this is checked
up front instead of surfacing as a panic once layout starts.