pug-pelle-p/pugpdf

Not working on Linux Envirotment

Opened this issue · 2 comments

It is not working on linux, tried aloot of things, had to import a new version of wkhtmltopdf that i found on the web and got it working for me.

This repository has "wkhtmltopdf 0.12.4" version and i had to create a docker image with "wkhtmltopdf 0.12.5 (with patched qt)"

Dockerfile
`FROM mcr.microsoft.com/dotnet/core/aspnet:3.1-buster-slim AS base

...

// Install wkhtmltopdf dependencies
RUN apt-get update && apt-get install -y
xvfb
libfontconfig
wkhtmltopdf
libxrender1
libgdiplus
libc6-dev

...

// copy a working linux binary of wkhtmltopdf
// wkhtmltopdf 0.12.5 (with patched qt) -
// this is where i replace your wkhtmltopdf for a latest version
RUN cp newVersionFileForLinux /app/wkhtmltopdf/linux/x64/wkhtmltopdf`

can you work in linux environment with this solution now if you are working I will have to apply the same solution.
@vitorcampea

For using this in docker (linux) you might need to install some dependencies depending on your linux environment.
We are using asp.net alpine image and for that we need to install the following:
RUN apk add --no-cache
libstdc++=10.3.1_git20210424-r2
libx11
libxrender
libxext
libssl1.1
ca-certificates
fontconfig
freetype
ttf-dejavu
ttf-droid
ttf-freefont
ttf-liberation
ttf-ubuntu-font-family \