care.emr.reports.renderer.generators.weasyprint_generator module

class WeasyPrintGeneratorOptions(*, page_size: Literal['A4', 'A3', 'A5', 'Letter', 'Legal'] = 'A4', margin: str = '1cm', orientation: Literal['portrait', 'landscape'] = 'portrait', stylesheets: list[str] = [])

Bases: BaseOptions

page_size: Literal['A4', 'A3', 'A5', 'Letter', 'Legal']
margin: str
orientation: Literal['portrait', 'landscape']
stylesheets: list[str]
model_config: ClassVar[ConfigDict] = {'extra': 'forbid'}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class WeasyPrintGenerator

Bases: BaseOutputGenerator

options_model

alias of WeasyPrintGeneratorOptions

__init__()
generate(html: str, options: WeasyPrintGeneratorOptions | None = None) bytes
get_format() str
get_supported_options() dict[str, Any]
get_http_response(content)