Closed nohnaimer closed 3 years ago
I will answer to myself: Rebuild container without xvfb in alpine. Install into container wkhtmltopdf 0.12.5/6 (with patchet qt) and everything work fine.
FROM golang:1.15-alpine AS build
RUN apk add --no-cache git
RUN go get github.com/nohnaimer/go-wkhtmltox
WORKDIR $GOPATH/src/github.com/nohnaimer/go-wkhtmltox
RUN export CGO_ENABLED=0 && go build -o $GOPATH/src/github.com/nohnaimer/go-wkhtmltox
FROM surnet/alpine-wkhtmltopdf:3.13.5-0.12.6-full as wkhtmltopdf
FROM alpine:3.14
# Install needed packages
RUN apk add --update --no-cache \
libgcc \
libstdc++ \
musl \
qt5-qtbase \
qt5-qtbase-x11 \
qt5-qtsvg \
qt5-qtwebkit \
ttf-freefont \
font-noto-kannada \
fontconfig \
ca-certificates
# Install wkhtmltopdf
RUN apk add --update --no-cache --repository http://dl-cdn.alpinelinux.org/alpine/v3.14/main/ wkhtmltopdf=0.12.6-r0
# Copy pached wkhtmltopdf to system
COPY --from=wkhtmltopdf /bin/wkhtmltopdf /usr/bin/wkhtmltopdf
COPY --from=wkhtmltopdf /bin/wkhtmltoimage /usr/bin/wkhtmltoimage
COPY --from=wkhtmltopdf /lib/libwkhtmltox.* /usr/lib/
WORKDIR /app
COPY . /app
# Clean up when done
RUN rm -rf /tmp/* && \
rm -rf /var/cache/apk/*
COPY --from=build /go/bin/go-wkhtmltox /app
VOLUME /app/templates
Hi, I use https://github.com/idocking/go-wkhtmltox docker container with wkhtmltopdf 0.12.5 (with patched qt). I try to set GlobalOptions like this:
I use space like in footer-right line I get error when convert to pdf:
When I delete space in string line this "Prepared[date][page]/[topage]" everything work fine.
Any ideas how to escape space?