Switch to headless=new chrome interface
Change-Id: Id6f2c847bf5d5b1be65caf78cdd03977b409d5e4
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 004f184..d8d7fbe 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -23,7 +23,7 @@
- start_section install_linux_packages "Installing missing Linux packages"
- apt-get update
- - apt-get install -y libvulkan1 libu2f-udev fonts-liberation build-essential libglpk40 libcurl4-gnutls-dev libxml2-dev libsodium-dev libsecret-1-dev libfontconfig1-dev libssl-dev libxt6 libpq-dev imagemagick ghostscript inkscape scour
+ - apt-get install -y libvulkan1 libu2f-udev fonts-liberation build-essential libglpk40 libcurl4-gnutls-dev libxml2-dev libsodium-dev libsecret-1-dev libfontconfig1-dev libssl-dev libxt6 libpq-dev imagemagick inkscape scour poppler-utils
- wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
- dpkg -i google-chrome-stable_current_amd64.deb || apt-get install -y -f
- locale-gen de_DE.utf8 en_GB.utf8 en_US.utf8
diff --git a/ci/html2pdf b/ci/html2pdf
index 9341aea..6967f9a 100755
--- a/ci/html2pdf
+++ b/ci/html2pdf
@@ -1,9 +1,4 @@
#!/bin/sh -eu
in=$1 out=$2 page0=${3:-} page1=${4:-$page0}
-google-chrome --disable-background-networking --enable-features=NetworkService,NetworkServiceInProcess --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 --hide-scrollbars --mute-audio --blink-settings=primaryHoverType=2,availableHoverTypes=2,primaryPointerType=4,availablePointerTypes=4 --no-sandbox --no-startup-window --disable-gpu --run-all-compositor-stages-before-draw --no-pdf-header-footer --print-to-pdf="$out" "$in"
-GS_ARGS=
-if [ -n "$page0" ]; then
- GS_ARGS="-dFirstPage=$page0 -dLastPage=$page1"
-fi
-gs -sDEVICE=pdfwrite -dNOPAUSE -dBATCH $GS_ARGS -sOutputFile="$2.tmp" "$2"
-mv "$2.tmp" "$2"
+google-chrome --no-sandbox --headless --no-pdf-header-footer --print-to-pdf="$out".tmp "$in"
+pdfseparate -f 1 -l 1 "$out".tmp $out