blob: 5f9bce9e1d04a862436af1d25e3df5e9eb5ac9b3 [file] [log] [blame]
#!/bin/sh -eu
in=$1 out=$2 page0=${3:-} page1=${4:-$page0}
google-chrome --no-sandbox --headless=new --no-pdf-header-footer --disable-gpu --disable-background-timer-throttling --disable-backgrounding-occluded-windows --disable-breakpad --disable-client-side-phishing-detection --disable-component-extensions-with-background-pages --disable-default-apps --disable-dev-shm-usage --disable-extensions --disable-features=TranslateUI,BlinkGenPropertyTrees,ImprovedCookieControls,SameSiteByDefaultCookies,LazyFrameLoading --disable-hang-monitor --disable-ipc-flooding-protection --disable-popup-blocking --disable-prompt-on-repost --disable-renderer-backgrounding --disable-sync --force-color-profile=srgb --metrics-recording-only --no-first-run --enable-automation --password-store=basic --use-mock-keychain --headless=new --hide-scrollbars --mute-audio --no-pdf-header-footer --virtual-time-budget=42000 --print-to-pdf="$out".tmp "$in"
pdfseparate -f 1 -l 1 "$out".tmp $out