note PDFium build in README

This commit is contained in:
John Cupitt 2020-12-24 05:44:07 +00:00
parent 94ecb8d38d
commit 86fa9277e7
1 changed files with 25 additions and 2 deletions

View File

@ -162,8 +162,31 @@ via imagemagick instead.
### PDFium
If present, libvips will attempt to load PDFs via PDFium. This library must be
packaged by https://github.com/jcupitt/docker-builds/tree/master/pdfium
If present, libvips will attempt to load PDFs with PDFium. Download the
prebuilt pdfium binary from:
https://github.com/bblanchon/pdfium-binaries
Untar to the libvips install prefix, for example:
cd ~/vips
tar xf ~/pdfium-linux.tgz
Create a `pdfium.pc` like this (update the version number):
VIPSHOME=/home/john/vips
cat > $VIPSHOME/lib/pkgconfig/pdfium.pc << EOF
prefix=$VIPSHOME
exec_prefix=\${prefix}
libdir=\${exec_prefix}/lib
includedir=\${prefix}/include
Name: pdfium
Description: pdfium
Version: 4290
Requires:
Libs: -L\${libdir} -lpdfium
Cflags: -I\${includedir}
EOF
If PDFium is not detected, libvips will look for poppler-glib instead.