tomo2chin2 commited on
Commit
371916d
·
verified ·
1 Parent(s): d28ead3

Add scale=0.9 to PDF generation for better A4 page fitting

Browse files
Files changed (1) hide show
  1. app.py +2 -1
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()