How to install poppler 0.73 on ubuntu 18.04

I created a PPA with backports of Poppler 0.74.0 for Ubuntu 16.04 (Xenial) and Ubuntu 18.04 (Bionic). This is now the recommended way to update your poppler.

sudo add-apt-repository -y ppa:cran/poppler
sudo apt-get update
sudo apt-get install -y libpoppler-cpp-dev

To make it working we need to do the following:

  1. Uninstall the libpoppler-cpp-dev package

    sudo apt purge libpoppler-cpp-dev
    
  2. Compile and install Poppler 0.73 with checkinstall (as you already did) to the /usr/local:

    sudo apt-get install libopenjp2-7-dev libgdk-pixbuf2.0-dev cmake checkinstall
    sudo apt-get build-dep libpoppler-cpp-dev
    
    cd ~/Downloads
    wget https://poppler.freedesktop.org/poppler-0.73.0.tar.xz
    tar -xf poppler-0.73.0.tar.xz
    cd poppler-0.73.0
    
    mkdir build
    cd build
    cmake ..
    sudo checkinstall make install
    
  3. Define the environment variable R_LD_LIBRARY_PATH to inform R about the Poppler libraries in /usr/local/lib:

    echo "export R_LD_LIBRARY_PATH=\$R_LD_LIBRARY_PATH:/usr/local/lib" >> .bashrc
    
  4. Compile the pdftools R-package inside R-shell:

    install.packages("pdftools")
    
  5. Test it from R-shell with any pdf-file

    > pdftools::pdf_data(pdf="/usr/share/cups/data/default.pdf")
    [1]]
    [1] width  height x      y      space  text  
    <0 rows> (or 0-length row.names)
    

Note: I tested this method on my clean Ubuntu 18.04 LTS VM with both R 3.4 and 3.5.2 from R-shell and from RStudio.