Marc Kupietz | ce1aa0c | 2023-06-15 07:50:23 +0200 | [diff] [blame] | 1 | #!/bin/sh -eu |
Marc Kupietz | fcb7d47 | 2025-06-17 18:07:57 +0200 | [diff] [blame] | 2 | in=$1 |
| 3 | |
Marc Kupietz | e074d05 | 2025-06-20 13:50:10 +0200 | [diff] [blame^] | 4 | R -e "pagedown::chrome_print('$in', |
Marc Kupietz | fcb7d47 | 2025-06-17 18:07:57 +0200 | [diff] [blame] | 5 | options=list( |
| 6 | pageRanges='1', |
| 7 | paperWidth=33.11, |
| 8 | paperHeight=46.81, |
| 9 | marginTop=0, |
| 10 | marginBottom=0, |
| 11 | marginLeft=0, |
| 12 | marginRight=0, |
| 13 | printBackground=TRUE, |
| 14 | scale=0.98, # Compensate for ~2% print scaling |
| 15 | displayHeaderFooter=FALSE, |
| 16 | preferCSSPageSize=TRUE |
| 17 | ), |
| 18 | extra_args = c( |
| 19 | '--disable-gpu', |
| 20 | '--no-sandbox', |
| 21 | '--disable-dev-shm-usage', |
| 22 | '--force-device-scale-factor=1', |
| 23 | '--disable-print-preview', |
| 24 | '--disable-background-timer-throttling', |
| 25 | '--allow-file-access-from-files', |
| 26 | '--force-color-profile=srgb', |
| 27 | '--disable-lcd-text', |
| 28 | '--disable-font-subpixel-positioning', |
| 29 | '--run-all-compositor-stages-before-draw' |
| 30 | ) |
| 31 | )" |