agency.pdf

Classes

AgencyPdfDefault

A standard PDF of an agency.

AgencyPdfZg

A PDF with the CI of the canton of ZG.

AgencyPdfAr

A PDF with the CI of the canton of AR.

AgencyPdfBs

Consult the styleguide from 2021.

Module Contents

class agency.pdf.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, **kwargs: Any)[source]

Bases: onegov.pdf.Pdf

A standard PDF of an agency.

previous_level_context: int | None = None[source]
property page_fn: Callable[[Canvas, Template], None][source]
property page_fn_later: Callable[[Canvas, Template], None][source]
classmethod from_agencies(agencies: Iterable[ExtendedAgency], title: str, toc: bool, exclude: Collection[str], page_break_on_level: int = 1, link_color: str | None = None, underline_links: bool = False) io.BytesIO[source]

Create an index PDF from a collection of notices.

memberships(agency: onegov.agency.models.ExtendedAgency, exclude: Collection[str]) None[source]

Adds the memberships of an agency as table.

agency(agency: onegov.agency.models.ExtendedAgency, exclude: 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[source]

Adds a single agency with the portrait and memberships.

class agency.pdf.AgencyPdfZg(*args: Any, **kwargs: Any)[source]

Bases: AgencyPdfDefault

A PDF with the CI of the canton of ZG.

A footer with the title and print date on the left and the page numbers on the right.

property page_fn: Callable[[Canvas, Template], None][source]
property page_fn_later: Callable[[Canvas, Template], None][source]
class agency.pdf.AgencyPdfAr(*args: Any, **kwargs: Any)[source]

Bases: AgencyPdfDefault

A PDF with the CI of the canton of AR.

A footer with the print date on the left and the page numbers on the right.

A header with the logo, a footer with the print date and page numbers.

A header with the title and author, a footer with the print date and page numbers.

property page_fn: Callable[[Canvas, Template], None][source]
property page_fn_later: Callable[[Canvas, Template], None][source]
class agency.pdf.AgencyPdfBs(*args: Any, **kwargs: Any)[source]

Bases: 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

margin_top[source]
margin_bottom[source]
margin_left[source]
margin_right[source]
font_name = 'Helvetica'[source]
font_size = 11[source]
static page_fn_header(canvas: reportlab.pdfgen.canvas.Canvas, doc: onegov.pdf.templates.Template) None[source]

A header with the logo, a footer with the print date and page numbers.

property page_fn: Callable[[Canvas, Template], None][source]
init_a4_portrait(page_fn: reportlab.platypus.doctemplate._PageCallback = empty_page_fn, page_fn_later: _PageCallback | None = None, **_ignored: object) None[source]