wkhtmltopdf build for alpine 3.19 not working correclty
Following instructions at https://gitlab.lakedrops.com/docker/wkhtmltopdf the resulting wkhtmltopdf does output black squares instead of text.
Dockerfile used (used libssl3 instead of libssl1.1 as latter not available, anymore):
FROM surnet/alpine-wkhtmltopdf:3.19.0-0.12.6-full as wkhtmltopdf
FROM php:8.2-fpm-alpine3.19 AS app
# wkhtmltopdf install dependencies
RUN apk add --no-cache \
libstdc++ \
libx11 \
libxrender \
libxext \
libssl3 \
ca-certificates \
fontconfig \
freetype \
ttf-droid \
ttf-freefont \
ttf-liberation \
# more fonts
;
# wkhtmltopdf copy bins from ext image
COPY --from=wkhtmltopdf /bin/wkhtmltopdf /bin/libwkhtmltox.so /bin/
For testing I have copied the 2 files into af-grp-php-1:
docker cp libwkhtmltox.so af-grp-php-1:/bin
docker cp wkhtmltopdf af-grp-php-1:/bin
Then in af-grp-php-1:/bin run:
wkhtmltopdf https://google.com /var/www/html/files/default/private/gam_pdf_test/test.pdf
which results in the following file: