Spaces:
Paused
Paused
Add scale=0.9 to PDF generation for better A4 page fitting
Browse files
app.py
CHANGED
|
@@ -64,7 +64,8 @@ async def html_to_pdf_api(html_content: str) -> tuple[str, str]:
|
|
| 64 |
path=temp_path,
|
| 65 |
format="A4",
|
| 66 |
print_background=True,
|
| 67 |
-
margin={"top":"15mm","bottom":"15mm","left":"15mm","right":"15mm"}
|
|
|
|
| 68 |
)
|
| 69 |
|
| 70 |
await browser.close()
|
|
|
|
| 64 |
path=temp_path,
|
| 65 |
format="A4",
|
| 66 |
print_background=True,
|
| 67 |
+
margin={"top":"15mm","bottom":"15mm","left":"15mm","right":"15mm"},
|
| 68 |
+
scale=0.9 # 90%に縮小してA4 2ページに収める
|
| 69 |
)
|
| 70 |
|
| 71 |
await browser.close()
|