Recently any generated pdf contains a 50% wide column containing:
You are currently using a browser that is no longer 100% supported. It can cause display
problems.
Please upgrade your browser.
Some alternatives: Firefox, Chrome.
Any ideas where I should start investigating?
I searched for some obvious commandline arguments in the wkhtmltopdf manual to no avail
Environment: Arch Linux, Python pdfkit, Firefox, https://aur.archlinux.org/packages/wkhtmltopdf-static
This message isn't coming from
wkhtmltopdf, it's coming from the website you are trying to PDF. That website is sniffing thewkhtmltopdfbrowser's user-agent, and conditionally displaying that message.Websites sometimes do this because they are written & tested with newer ES6 JavaScript and CSS3 features, without polyfills for older browser versions.
wkthtmltopdfis basically a very old version of Chrome, which doesn't support all modern CSS & JS features, so it's getting this message.Because
wkhtmltopdfis based off of the open-source version of Chromium before the license changed, it will likely never be updated. The Wkthtmltopdf GitHub page even shows that it is now archived, and no longer getting updates.However, if the PDFs are otherwise looking pretty good, you have 3 options (I think).
Disable the browser check when requesting the PDF version of the page (either with a param like
?pdf=trueor by checking the user-agent header). This only works if you can change the code on the server.Add some custom JavaScript to find the banner message and remove it from the DOM before rendering the PDF
You can do this by passing something like this argument to
wkhtmltopdf:You can do this by passing something like these arguments to
wkhtmltopdf:There might be other options of interest to you in the wkhtmltopdf documentation.