Skip to content

Commit

Permalink
fix: svg images bottom part is missing
Browse files Browse the repository at this point in the history
Refs: #63
  • Loading branch information
Jumas committed Sep 12, 2024
1 parent b2a4126 commit c7cfab3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ Service providing REST API to use WeasyPrint functionality

```bash
docker build \
--build-arg APP_IMAGE_VERSION=62.4.0 \
--build-arg APP_IMAGE_VERSION=62.4.3 \
--file Dockerfile \
--tag weasyprint-service:62.4.0 .
--tag weasyprint-service:62.4.3 .
```

## Start Docker container
Expand All @@ -16,7 +16,7 @@ Service providing REST API to use WeasyPrint functionality
docker run --detach \
--publish 9080:9080 \
--name weasyprint-service \
weasyprint-service:62.4.0
weasyprint-service:62.4.3
```

## Stop Docker container
Expand Down
3 changes: 2 additions & 1 deletion app/SvgUtils.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,13 +93,14 @@ def replace_svg_with_png(svg_content):
png_filepath = os.path.join(temp_folder, uuid + '.png')
result = subprocess.run([
f'{chrome_executable}',
'--headless',
'--headless=old',
'--no-sandbox',
'--disable-gpu',
'--disable-software-rasterizer',
'--disable-dev-shm-usage',
'--default-background-color=00000000',
'--hide-scrollbars',
'--enable-features=ConversionMeasurement,AttributionReportingCrossAppWeb',
f'--screenshot={png_filepath}',
f'--window-size={width},{height}',
f'{svg_filepath}',
Expand Down

0 comments on commit c7cfab3

Please sign in to comment.