Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: svg images bottom part is missing #65

Merged
merged 1 commit into from
Sep 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading