Replies: 11 comments
-
Hi @perelin, You need to build libvips with poppler support -- it's a compile time thing. Install poppler-glib-dev and try rebuilding libvips. |
Beta Was this translation helpful? Give feedback.
-
For example: https://github.com/jcupitt/docker-builds/blob/master/pyvips-alpine/Dockerfile Though obvs. you'll need to update that a bit. |
Beta Was this translation helpful? Give feedback.
-
Hi @jcupitt , thanks for the quick reply. Ah! I was hopping to get around the "compile by hand" dance :) I was not able to find a $ apk -q search poppler
poppler-qt5
poppler-dev
poppler-glib
poppler-data
poppler
poppler-doc
poppler-utils
zathura-pdf-poppler
poppler-qt5-dev But I used the packages from your Dockerfile example. My Dockerfile now looks like this: FROM alpine:latest
ARG VIPS_VERSION=8.10.0
ARG VIPS_URL=https://github.com/libvips/libvips/releases/download
RUN apk update && apk update
RUN apk --no-cache add \
poppler-glib \
build-base \
autoconf \
automake \
libtool \
pkgconf \
glib-dev \
expat-dev \
bc
RUN wget -O- ${VIPS_URL}/v${VIPS_VERSION}/vips-${VIPS_VERSION}.tar.gz | tar xzC /tmp
RUN cd /tmp/vips-${VIPS_VERSION} \
&& ./configure --prefix=/usr --disable-static --disable-debug \
&& make V=0 \
&& make install But still I don´t see any pdf support when running I tried substituting Any hint what to try next? |
Beta Was this translation helpful? Give feedback.
-
You need to check the output of vips configure and add packages until you get "yes" next to pdf in the summary at the end. I tried my dockerfile and it seems to work fine for me -- I get |
Beta Was this translation helpful? Give feedback.
-
Yes, that did the trick! Thanks for the support. Any way to contribute? |
Beta Was this translation helpful? Give feedback.
-
Ah, btw: I use a builder container to compile all that stuff. What files / settings do I need to transfer to the production container to have it work there? |
Beta Was this translation helpful? Give feedback.
-
I would just copy There's a "contribute" button at the top of the page, of you'd like to help the project financially. |
Beta Was this translation helpful? Give feedback.
-
Hey @jcupitt thanks for your help on this. I was running into the same thing. Looking at my container, I'm at 500mb.. obviously I want to shrink that. /usr/lib is 200mb and has the shared libraries. Is that in the ballpark? |
Beta Was this translation helpful? Give feedback.
-
I tried:
So 46mb for a debug build. |
Beta Was this translation helpful? Give feedback.
-
I tried a production build, then stripped the libraries and binaries and removed the headers.
|
Beta Was this translation helpful? Give feedback.
-
Ahh that's awesome. As I was working on the build, I realized, I'm linking against the libs so I can't use a standalone binary. Previous container size before going down this path was 90mb. After getting everything to work correctly and adding pack the shared libs I'm at 199mb. So roughly 110mb of libs. certainly more reasonable to deal with. Does that seem about right for the shared libs? Here's the final build step.
|
Beta Was this translation helpful? Give feedback.
-
Describe the bug
In a nutshell: I want to use VIPS together with Poppler in an Alpine Docker container. After installing
poppler-glib vips-dev vips-tools
VIPS does not seem to recognize the existence of Poppler.Talking directly to VIPS via the vips cli I cant see any pdf support in the objects list:
vips -l | grep pdf
Background: Working on a Go project and including VIPS via https://github.com/davidbyttow/govips
There for PDF files I always get the error
Even though govips says it has a loader for pdf during init:
But when I test in govips for PDF support I get
false
Have tested JPEG files and they work fine.
To Reproduce
docker build -t vipspopplertest .
docker run vipspopplertest vips -l | grep pdf
Expected behavior
There are pdf operations listed after
vips -l | grep pdf
Environment
Any pointers what I could try to get some more debugging information on this?
Beta Was this translation helpful? Give feedback.
All reactions