brk-code

WeasyPrint の API リファレンス

WeasyPrint (Kozea/WeasyPrint) の公開 API 201 件 —— クラス 60、関数 108、メソッド 33。実際のソースを静的解析して抽出した正確なシグネチャを掲載しています。

リポジトリ: Kozea/WeasyPrint

種別件数
クラス60
関数108
メソッド33

API 一覧

classweasyprint.Attachment
File attachment for a PDF document.
classweasyprint.CSS
CSS stylesheet parsed by tinycss2.
classweasyprint.HTML
HTML document parsed by tinyhtml5.
classweasyprint.css.AnonymousStyle
Computed style used for anonymous boxes.
classweasyprint.css.ComputedStyle
Computed style used for non-anonymous boxes.
classweasyprint.css.InitialStyle
Dummy computed style used to store initial values.
classweasyprint.css.Style
Abstract class for all style dictionaries.
classweasyprint.css.StyleFor
Convenience function to get the computed styles for an element.
funcweasyprint.css.computed_values.compute_float(style, name, value)
Compute the ``float`` property.
funcweasyprint.css.computed_values.content(style, name, values)
Compute the ``content`` property.
funcweasyprint.css.computed_values.display(style, name, value)
Compute the ``display`` property.
funcweasyprint.css.computed_values.gap(style, name, value)
Compute the ``*-gap`` properties.
funcweasyprint.css.computed_values.lang(style, name, values)
Compute the ``lang`` property.
funcweasyprint.css.computed_values.length(style, name, value, font_size=None, pixels_only=False)
Compute a length ``value``.
funcweasyprint.css.computed_values.link(style, name, values)
Compute the ``link`` property.
funcweasyprint.css.computed_values.tab_size(style, name, value)
Compute the ``tab-size`` property.
funcweasyprint.css.computed_values.transform(style, name, value)
Compute the ``transform`` property.
classweasyprint.css.counters.CounterStyle
Counter styles dictionary.
funcweasyprint.css.counters.symbol(string_or_url)
Create a string from a symbol.
classweasyprint.css.functions.Function
CSS function.
methodweasyprint.css.functions.Function.split_comma(single_tokens=True, trailing=False)
Split arguments on commas.
methodweasyprint.css.functions.Function.split_space()
Split arguments on spaces.
funcweasyprint.css.parse_page_selectors(rule)
Parse a page selector rule.
funcweasyprint.css.resolve_math(token, computed=None, property_name=None, refer_to=None)
Return token with resolved math functions.
classweasyprint.css.targets.CounterLookupItem
Item controlling page based counters.
classweasyprint.css.tokens.InvalidValues
Invalid or unsupported values for a known CSS property.
classweasyprint.css.tokens.PercentageInMath
Percentage in math function without reference length.
funcweasyprint.css.tokens.get_angle(token)
Parse an <angle> token in radians.
funcweasyprint.css.tokens.get_content_list(tokens, base_url)
Parse <content-list> tokens.
funcweasyprint.css.tokens.get_image(token, base_url)
Parse an <image> token.
funcweasyprint.css.tokens.get_keyword(token)
If ``token`` is a keyword, return its lowercase name.
funcweasyprint.css.tokens.get_length(token, negative=True, percentage=False)
Parse a <length> token.
funcweasyprint.css.tokens.get_number(token, negative=True, integer=False)
Parse a <number> token.
funcweasyprint.css.tokens.get_percentage(token, negative=True)
Parse a <percentage> token.
funcweasyprint.css.tokens.get_quote(token)
Parse a <quote> token.
funcweasyprint.css.tokens.get_resolution(token)
Parse a <resolution> token in dppx.
funcweasyprint.css.tokens.get_string(token)
Parse a <string> token.
funcweasyprint.css.tokens.get_target(token, base_url)
Parse a <target> token.
funcweasyprint.css.tokens.get_url(token, base_url)
Parse an <url> token.
funcweasyprint.css.validation.descriptors.pad(tokens, base_url)
``pad`` descriptor validation.
funcweasyprint.css.validation.descriptors.range(tokens)
``range`` descriptor validation.
funcweasyprint.css.validation.descriptors.src(tokens, base_url)
``src`` descriptor validation.
funcweasyprint.css.validation.descriptors.system(tokens)
``system`` descriptor validation.
funcweasyprint.css.validation.expanders.expand_flex(tokens, name)
Expand the ``flex`` property.
funcweasyprint.css.validation.expanders.expand_gap(tokens, name)
Expand the ``gap`` property.
funcweasyprint.css.validation.expanders.expand_grid(tokens, name)
Expand the ``grid`` property.
funcweasyprint.css.validation.expanders.generic_expander_wrapper(tokens, name, base_url)
Wrap the expander.
funcweasyprint.css.validation.properties.anchor(token)
Validation for ``anchor``.
funcweasyprint.css.validation.properties.bleed(token)
``bleed`` property validation.
funcweasyprint.css.validation.properties.box_shadow(tokens)
`box-shadow` property validation.
funcweasyprint.css.validation.properties.clear(keyword)
``clear`` property validation.
funcweasyprint.css.validation.properties.clip(token)
Validation for the ``clip`` property.
funcweasyprint.css.validation.properties.content(tokens, base_url)
``content`` property validation.
funcweasyprint.css.validation.properties.continue_(keyword)
``continue`` property validation.
funcweasyprint.css.validation.properties.direction(keyword)
``direction`` property validation.
funcweasyprint.css.validation.properties.display(tokens)
``display`` property validation.
funcweasyprint.css.validation.properties.flex_basis(token)
``flex-basis`` property validation.
funcweasyprint.css.validation.properties.flex_wrap(keyword)
``flex-wrap`` property validation.
funcweasyprint.css.validation.properties.float_(keyword)
``float`` property validation.
funcweasyprint.css.validation.properties.font_size(token)
``font-size`` property validation.
funcweasyprint.css.validation.properties.hyphens(token)
Validation for ``hyphens``.
funcweasyprint.css.validation.properties.lang(token)
Validation for ``lang``.
funcweasyprint.css.validation.properties.link(token, base_url)
Validation for ``link``.
funcweasyprint.css.validation.properties.marks(tokens)
``marks`` property validation.
funcweasyprint.css.validation.properties.page(token)
``page`` property validation.
funcweasyprint.css.validation.properties.position(token)
``position`` property validation.
funcweasyprint.css.validation.properties.quotes(tokens)
``quotes`` property validation.
funcweasyprint.css.validation.properties.size(tokens)
``size`` property validation.
funcweasyprint.css.validation.properties.string_set(tokens, base_url)
Validation for ``string-set``.
funcweasyprint.css.validation.properties.tab_size(token)
Validation for ``tab-size``.
funcweasyprint.css.validation.properties.transform(tokens)
Validation for ``transform``.
classweasyprint.document.DiskCache
Dict-like storing images content on disk.
classweasyprint.document.Document
A rendered document ready to be painted in a pydyf stream.
methodweasyprint.document.Document.copy(pages='all')
Take a subset of the pages.
classweasyprint.document.Page
Represents a single rendered page.
methodweasyprint.document.Page.paint(stream, scale=1)
Paint the page into the PDF file.
funcweasyprint.draw.color.darken(color)
Return a darker color.
funcweasyprint.draw.color.lighten(color)
Return a lighter color.
funcweasyprint.draw.draw_box_shadows(stream, boxes, style, inset)
Draw box shadows.
funcweasyprint.draw.draw_page(page, stream)
Draw the given PageBox.
funcweasyprint.draw.text.draw_emojis(stream, style, x, y, emojis)
Draw list of emojis.
classweasyprint.formatting_structure.boxes.AtomicInlineLevelBox
An atomic box in an inline formatting context.
classweasyprint.formatting_structure.boxes.BlockBox
A block-level box that is also a block container.
classweasyprint.formatting_structure.boxes.BlockLevelBox
A box that participates in an block formatting context.
classweasyprint.formatting_structure.boxes.BlockReplacedBox
A box that is both replaced and block-level.
classweasyprint.formatting_structure.boxes.Box
Abstract base class for all boxes.
methodweasyprint.formatting_structure.boxes.Box.border_height()
Height of the border box.
methodweasyprint.formatting_structure.boxes.Box.border_width()
Width of the border box.
methodweasyprint.formatting_structure.boxes.Box.copy()
Return shallow copy of the box.
methodweasyprint.formatting_structure.boxes.Box.is_floated()
Return whether this box is floated.
methodweasyprint.formatting_structure.boxes.Box.margin_height()
Height of the margin box (aka.
methodweasyprint.formatting_structure.boxes.Box.margin_width()
Width of the margin box (aka.
methodweasyprint.formatting_structure.boxes.Box.padding_height()
Height of the padding box.
methodweasyprint.formatting_structure.boxes.Box.padding_width()
Width of the padding box.
methodweasyprint.formatting_structure.boxes.Box.page_values()
Return start and end page values.
methodweasyprint.formatting_structure.boxes.Box.translate(dx=0, dy=0, ignore_floats=False)
Change the box’s position.
classweasyprint.formatting_structure.boxes.FlexBox
A box that is both block-level and a flex container.
classweasyprint.formatting_structure.boxes.FlexContainerBox
A box that contains only flex-items.
classweasyprint.formatting_structure.boxes.FootnoteAreaBox
Box displaying footnotes, as defined in GCPM.
classweasyprint.formatting_structure.boxes.GridBox
A box that is both block-level and a grid container.
classweasyprint.formatting_structure.boxes.GridContainerBox
A box that contains only grid-items.
classweasyprint.formatting_structure.boxes.InlineBlockBox
A box that is both inline-level and a block container.
classweasyprint.formatting_structure.boxes.InlineBox
An inline box with inline children.
classweasyprint.formatting_structure.boxes.InlineFlexBox
A box that is both inline-level and a flex container.
classweasyprint.formatting_structure.boxes.InlineGridBox
A box that is both inline-level and a grid container.
classweasyprint.formatting_structure.boxes.InlineLevelBox
A box that participates in an inline formatting context.
classweasyprint.formatting_structure.boxes.InlineReplacedBox
A box that is both replaced and inline-level.
classweasyprint.formatting_structure.boxes.InlineTableBox
Box for elements with ``display: inline-table``
classweasyprint.formatting_structure.boxes.MarginBox
Box in page margins, as defined in CSS3 Paged Media
classweasyprint.formatting_structure.boxes.PageBox
Box for a page.
classweasyprint.formatting_structure.boxes.ParentBox
A box that has children.
classweasyprint.formatting_structure.boxes.ReplacedBox
A box whose content is replaced.
classweasyprint.formatting_structure.boxes.TableBox
Box for elements with ``display: table``
classweasyprint.formatting_structure.boxes.TableCaptionBox
Box for elements with ``display: table-caption``
classweasyprint.formatting_structure.boxes.TableCellBox
Box for elements with ``display: table-cell``
classweasyprint.formatting_structure.boxes.TableColumnBox
Box for elements with ``display: table-column``
classweasyprint.formatting_structure.boxes.TableRowBox
Box for elements with ``display: table-row``
classweasyprint.formatting_structure.boxes.TableRowGroupBox
Box for elements with ``display: table-row-group``
classweasyprint.formatting_structure.boxes.TextBox
A box that contains only text and has no box children.
funcweasyprint.html.handle_col(element, box, _get_image_from_uri, _base_url)
Handle the ``span`` attribute.
funcweasyprint.html.handle_colgroup(element, box, _get_image_from_uri, _base_url)
Handle the ``span`` attribute.
funcweasyprint.html.handle_img(element, box, get_image_from_uri, base_url)
Handle ``<img>`` elements.
funcweasyprint.html.handle_svg(element, box, get_image_from_uri, base_url)
Handle ``<svg>`` elements.
funcweasyprint.html.make_replaced_box(element, box, image)
Wrap an image in a replaced box.
funcweasyprint.html.parse_string(string)
Parse a URL from an HTML attribute value.
funcweasyprint.html.parse_url(string)
Parse a URL from an HTML attribute value.
funcweasyprint.html.parse_w3c_date(meta_name, string)
Parse datetimes as defined by the W3C.
classweasyprint.images.ImageLoadingError
An error occured when loading an image.
classweasyprint.layout.FakeList
List in which you can’t append objects.
funcweasyprint.layout.block.block_level_width(box, containing_block, with_min_max=True)
Set the ``box`` width.
classweasyprint.layout.flex.FlexLine
Flex container line.
funcweasyprint.layout.initialize_page_maker(context, root_box)
Initialize ``context.page_maker``.
funcweasyprint.layout.layout_document(html, root_box, context, max_loops=8)
Lay out the whole document.
funcweasyprint.layout.table.add_top_padding(box, extra_padding)
Increase the top padding of a box.
funcweasyprint.pdf.anchors.add_annotations(links, matrix, document, pdf, page, annot_files, compress)
Include annotations in PDF.
funcweasyprint.pdf.anchors.add_forms(forms, matrix, pdf, page, resources, stream, font_map)
Include form inputs in PDF.
funcweasyprint.pdf.anchors.add_outlines(pdf, bookmarks, parent=None)
Include bookmark outlines in PDF.
funcweasyprint.pdf.anchors.resolve_links(pages)
Resolve internal hyperlinks.
funcweasyprint.pdf.debug.debug(pdf, metadata, document, page_streams, attachments, compress)
Set debug PDF metadata.
methodweasyprint.pdf.fonts.Font.clean(to_unicode, hinting)
Remove useless data from font.
classweasyprint.pdf.metadata.DocumentMetadata
Meta-information belonging to a whole :class:`Document`.
classweasyprint.pdf.stream.Stream
PDF stream object with extra features.
funcweasyprint.pdf.tags.add_tags(pdf, document, pdf_version, page_streams)
Add tag tree to the document.
classweasyprint.svg.Node
An SVG document node.
methodweasyprint.svg.Node.display()
Whether node should be displayed.
methodweasyprint.svg.Node.flatten()
Flatten text in node and in its children.
methodweasyprint.svg.Node.get(key, default=None)
Get attribute.
methodweasyprint.svg.Node.get_viewbox()
Get node viewBox as a tuple of floats.
methodweasyprint.svg.Node.override_iter(iterator)
Override node’s children iterator.
methodweasyprint.svg.Node.pop_rotation(original_rotate, rotate)
Merge nested letter rotations.
methodweasyprint.svg.Node.tag()
XML tag name with no namespace.
methodweasyprint.svg.Node.tail()
Text after the XML node.
methodweasyprint.svg.Node.text()
XML node text.
methodweasyprint.svg.Node.visible()
Whether node is visible.
classweasyprint.svg.Pattern
SVG node applied as a pattern.
classweasyprint.svg.SVG
An SVG document.
methodweasyprint.svg.SVG.draw(stream, concrete_width, concrete_height, base_url, context)
Draw image on a stream.
methodweasyprint.svg.SVG.draw_markers(node, font_size, fill_stroke)
Draw markers defined in a node.
methodweasyprint.svg.SVG.draw_node(node, font_size, fill_stroke=True, context=None)
Draw a node.
methodweasyprint.svg.SVG.fill_stroke(fill, stroke, even_odd=False, text=False)
Paint fill and stroke for a node.
methodweasyprint.svg.SVG.get_intrinsic_size(font_size)
Get intrinsic size of the image.
methodweasyprint.svg.SVG.length(length, font_size)
Compute size of an arbirtary attribute.
methodweasyprint.svg.SVG.point(x, y, font_size)
Compute size of an x/y or width/height couple.
funcweasyprint.svg.bounding_box.bounding_box(svg, node, font_size, stroke)
Bounding box for any node.
funcweasyprint.svg.bounding_box.bounding_box_circle(svg, node, font_size)
Bounding box for circle node.
funcweasyprint.svg.bounding_box.bounding_box_ellipse(svg, node, font_size)
Bounding box for ellipse node.
funcweasyprint.svg.bounding_box.bounding_box_g(svg, node, font_size)
Bounding box for g node.
funcweasyprint.svg.bounding_box.bounding_box_line(svg, node, font_size)
Bounding box for line node.
funcweasyprint.svg.bounding_box.bounding_box_path(svg, node, font_size)
Bounding box for path node.
funcweasyprint.svg.bounding_box.bounding_box_polyline(svg, node, font_size)
Bounding box for polyline node.
funcweasyprint.svg.bounding_box.bounding_box_rect(svg, node, font_size)
Bounding box for rect node.
funcweasyprint.svg.bounding_box.bounding_box_text(svg, node, font_size)
Bounding box for text node.
funcweasyprint.svg.bounding_box.bounding_box_use(svg, node, font_size)
Bounding box for use node.
funcweasyprint.svg.defs.draw_gradient(svg, node, gradient, font_size, opacity, stroke)
Draw given gradient node.
funcweasyprint.svg.defs.draw_pattern(svg, node, pattern, font_size, opacity, stroke)
Draw given gradient node.
funcweasyprint.svg.defs.paint_mask(svg, node, mask, font_size)
Apply given mask node.
funcweasyprint.svg.defs.spread_linear_gradient(spread, positions, colors, x1, y1, x2, y2, bounding_box, matrix)
Repeat linear gradient.
funcweasyprint.svg.defs.spread_radial_gradient(spread, positions, colors, fx, fy, fr, cx, cy, r, width, height, matrix)
Repeat radial gradient.
funcweasyprint.svg.defs.use(svg, node, font_size)
Draw use tags.
funcweasyprint.svg.images.image(svg, node, font_size)
Draw image tags.
funcweasyprint.svg.images.svg(svg, node, font_size)
Draw svg tags.
funcweasyprint.svg.path.path(svg, node, font_size)
Draw path node.
funcweasyprint.svg.shapes.circle(svg, node, font_size)
Draw circle tag.
funcweasyprint.svg.shapes.ellipse(svg, node, font_size)
Draw ellipse tag.
funcweasyprint.svg.shapes.line(svg, node, font_size)
Draw line tag.
funcweasyprint.svg.shapes.polygon(svg, node, font_size)
Draw polygon tag.
funcweasyprint.svg.shapes.polyline(svg, node, font_size)
Draw polyline tag.
funcweasyprint.svg.shapes.rect(svg, node, font_size)
Draw rect tag.
classweasyprint.svg.text.Style
Dummy class to store dict.
classweasyprint.svg.text.TextBox
Dummy text box used to draw text.
funcweasyprint.svg.text.text(svg, node, font_size)
Draw text node.
classweasyprint.svg.utils.PointError
Exception raised when parsing a point fails.
funcweasyprint.text.ffi.unicode_to_char_p(string)
Return ``(pointer, bytestring)``.
classweasyprint.text.fonts.FontConfiguration
A Fontconfig font configuration.
classweasyprint.text.line_break.Layout
Object holding PangoLayout-related cdata pointers.
classweasyprint.urls.URLFetcher
Fetcher of external resources such as images or stylesheets.
methodweasyprint.urls.URLFetcher.fetch(url, headers=None)
Fetch a given URL.
classweasyprint.urls.URLFetcherResponse
The HTTP response of an URL fetcher.
classweasyprint.urls.URLFetchingError
Some error happened when fetching an URL.
funcweasyprint.urls.get_link(url, base_url)
Get the URL value of an element attribute.
funcweasyprint.urls.path2url(path)
Return file URL of `path`.

この情報について

掲載しているシグネチャは Kozea/WeasyPrint の公開ソースコードを Python の ast モジュールで静的解析し、引数名・デフォルト値・ 型注釈・戻り値型をそのまま抽出したものです。実装コードは保存していません。 詳しくは仕組みの解説をご覧ください。

収録ライブラリ一覧(全 805 件)へ戻る