Why is pdftocairo not getting installed when installing poppler?

888 views Asked by At

I am using the following command in the dockerfile to install poppler

RUN wget --directory-prefix=~ poppler.freedesktop.org/poppler-22.04.0.tar.xz -O /tmp/poppler-22.04.0.tar.xz && apt-get install xz-utils && tar xf /tmp/poppler-22.04.0.tar.xz -C /tmp && cd /tmp/poppler-22.04.0 && ls && mkdir build && cd build && apt-get -y install libfreetype6-dev && apt-get -y install pkg-config && apt-get -y install libfontconfig1-dev && apt-get -y install libjpeg-dev && apt-get -y install libopenjp2-7-dev && apt-get -y install build-essential cmake && cmake -DENABLE_BOOST=OFF .. && make && make install 

When I exec inside the container and do

pdftocairo -v

it says command not found. However when I do

pdftotext -v

I get the following output

pdftotext version 22.04.0
Copyright 2005-2022 The Poppler Developers - http://poppler.freedesktop.org
Copyright 1996-2011, 2022 Glyph & Cog, LLC

Was expecting something similar for pdftocairo also as I need the library to convert pdf files to jpeg images. Can someone explain why this is happening ?

1

There are 1 answers

0
Skyost On

A bit late to the party, but here's your answer :

sudo apt install libcairo2-dev

You need to install libcairo2-dev (so that CAIRO_FOUND is set to true in the CMakeLists.txt of poppler-utils).