agency.pdf ========== .. py:module:: agency.pdf Classes ------- .. autoapisummary:: agency.pdf.AgencyPdfDefault agency.pdf.AgencyPdfZg agency.pdf.AgencyPdfAr agency.pdf.AgencyPdfBs agency.pdf.AgencyPdfLu Module Contents --------------- .. py:class:: AgencyPdfDefault(*args: Any, toc_levels: int = 3, created: str = '', logo: str | None = None, link_color: str | None = None, underline_links: bool = False, underline_width: float | str = 0.5, skip_numbering: bool = False, **kwargs: Any) Bases: :py:obj:`onegov.pdf.Pdf` A standard PDF of an agency. .. py:attribute:: previous_level_context :type: int | None :value: None .. py:property:: page_fn :type: collections.abc.Callable[[reportlab.pdfgen.canvas.Canvas, onegov.pdf.templates.Template], None] .. py:property:: page_fn_later :type: collections.abc.Callable[[reportlab.pdfgen.canvas.Canvas, onegov.pdf.templates.Template], None] .. py:method:: from_agencies(agencies: collections.abc.Iterable[onegov.agency.models.ExtendedAgency], title: str, toc: bool, exclude: collections.abc.Collection[str], page_break_on_level: int = 1, link_color: str | None = None, underline_links: bool = False) -> io.BytesIO :classmethod: Create an index PDF from a collection of notices. .. py:method:: memberships(agency: onegov.agency.models.ExtendedAgency, exclude: collections.abc.Collection[str]) -> None Adds the memberships of an agency as table. .. py:method:: agency(agency: onegov.agency.models.ExtendedAgency, exclude: collections.abc.Collection[str], level: int = 1, content_so_far: bool = False, skip_title: bool = False, page_break_on_level: int = 1, portrait_last_content: bool = False) -> bool Adds a single agency with the portrait and memberships. .. py:class:: AgencyPdfZg(*args: Any, **kwargs: Any) Bases: :py:obj:`AgencyPdfDefault` A PDF with the CI of the canton of ZG. .. py:method:: page_fn_footer(canvas: reportlab.pdfgen.canvas.Canvas, doc: onegov.pdf.templates.Template) -> None :staticmethod: A footer with the title and print date on the left and the page numbers on the right. .. py:property:: page_fn :type: collections.abc.Callable[[reportlab.pdfgen.canvas.Canvas, onegov.pdf.templates.Template], None] .. py:property:: page_fn_later :type: collections.abc.Callable[[reportlab.pdfgen.canvas.Canvas, onegov.pdf.templates.Template], None] .. py:class:: AgencyPdfAr(*args: Any, **kwargs: Any) Bases: :py:obj:`AgencyPdfDefault` A PDF with the CI of the canton of AR. .. py:method:: page_fn_footer(canvas: reportlab.pdfgen.canvas.Canvas, doc: onegov.pdf.templates.Template) -> None :staticmethod: A footer with the print date on the left and the page numbers on the right. .. py:method:: page_fn_header_logo_and_footer(canvas: reportlab.pdfgen.canvas.Canvas, doc: onegov.pdf.templates.Template) -> None :staticmethod: A header with the logo, a footer with the print date and page numbers. .. py:method:: page_fn_header_and_footer(canvas: reportlab.pdfgen.canvas.Canvas, doc: onegov.pdf.templates.Template) -> None :staticmethod: A header with the title and author, a footer with the print date and page numbers. .. py:property:: page_fn :type: collections.abc.Callable[[reportlab.pdfgen.canvas.Canvas, onegov.pdf.templates.Template], None] .. py:property:: page_fn_later :type: collections.abc.Callable[[reportlab.pdfgen.canvas.Canvas, onegov.pdf.templates.Template], None] .. py:class:: AgencyPdfBs(*args: Any, **kwargs: Any) Bases: :py:obj:`AgencyPdfDefault` Consult the styleguide from 2021. Page Settings are on page 25: Logo position to page margins, left most visual part of the logo: - indent 10mm left - 10mm beneath top - Format A4: The Baslerstab must be 10mm high, total is 17.5mm with the | p. 24 - Font Arial - Footer: Arial pt, start approx 12mm beneath bottom margin - Regular text Arial 11p .. py:attribute:: margin_top :value: 62.36220472440945 .. py:attribute:: margin_bottom :value: 68.03149606299212 .. py:attribute:: margin_left :value: 62.36220472440945 .. py:attribute:: margin_right :value: 56.69291338582677 .. py:attribute:: font_name :value: 'Helvetica' .. py:attribute:: font_size :value: 11 .. py:method:: page_fn_header(canvas: reportlab.pdfgen.canvas.Canvas, doc: onegov.pdf.templates.Template) -> None :staticmethod: A header with the logo, a footer with the print date and page numbers. .. py:method:: page_fn_footer(canvas: reportlab.pdfgen.canvas.Canvas, doc: onegov.pdf.templates.Template) -> None :staticmethod: .. py:property:: page_fn :type: collections.abc.Callable[[reportlab.pdfgen.canvas.Canvas, onegov.pdf.templates.Template], None] .. py:method:: init_a4_portrait(page_fn: reportlab.platypus.doctemplate._PageCallback = empty_page_fn, page_fn_later: reportlab.platypus.doctemplate._PageCallback | None = None, **_ignored: object) -> None .. py:class:: AgencyPdfLu(*args: Any, **kwargs: Any) Bases: :py:obj:`AgencyPdfDefault` No hierarchical numbering .. py:property:: page_fn :type: collections.abc.Callable[[reportlab.pdfgen.canvas.Canvas, onegov.pdf.templates.Template], None]