Skip to content

Commit

Permalink
Force SVG size
Browse files Browse the repository at this point in the history
Related to #867.
  • Loading branch information
liZe committed May 20, 2019
1 parent 76479de commit 37e788e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion docs/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ WeasyPrint |version| depends on:
* cairocffi_ ≥ 0.9.0
* tinycss2_ ≥ 1.0.0
* cssselect2_ ≥ 0.1
* CairoSVG_ ≥ 1.0.20
* CairoSVG_ ≥ 2.2.0
* Pyphen_ ≥ 0.8
* GDK-PixBuf_ ≥ 2.25.0 [#]_

Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ install_requires =
cairocffi>=0.9.0
tinycss2>=1.0.0
cssselect2>=0.1
CairoSVG>=1.0.20
CairoSVG>=2.2.0
Pyphen>=0.8
tests_require =
pytest-runner
Expand Down
4 changes: 2 additions & 2 deletions weasyprint/images.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,8 +156,8 @@ def draw(self, context, concrete_width, concrete_height, _image_rendering):
cairosvg.parser.Tree(
bytestring=self._svg_data, url=self._base_url,
url_fetcher=self._cairosvg_url_fetcher),
output=None, dpi=96, parent_width=concrete_width,
parent_height=concrete_height)
output=None, dpi=96, output_width=concrete_width,
output_height=concrete_height)
if svg.width and svg.height:
context.scale(
concrete_width / svg.width, concrete_height / svg.height)
Expand Down

0 comments on commit 37e788e

Please sign in to comment.