Coder Social home page Coder Social logo

pdf_parser_c's Introduction

This program extract pdf file, save data to json file to use later. It use poppler as PDF parser.

Following steps of setup instructions is for reference, adjust yourself with your Linux distro and folder structure to not mess up the source code directory.

PDF Implementation Reference

Step 1:

  • checkout pdf_reader source code

Step 2:

  • install poppler-data and poppler at freedesktop git
    • checkout poppler-data
    • install poppler-data
    • checkout poppler
    • Due to bug pdftotext only outputs first page content with -bbox-layout option, apply patch to fix: git apply poppler.patch, poppler.patch is in pdf_reader checkout folder
    • run cmake using following configuration: cmake poppler_checkout_directory -DCMAKE_BUILD_TYPE=Release -DENABLE_XPDF_HEADERS=ON
    • (optional) install packages: sudo apt install libfreetype6-dev libfontconfig1-dev libnss3-dev libjpeg-dev libopenjp2-7-dev or config to disable all of it. You can use cmake-gui and disable all additional features easily
    • make test and make install

Step 3:

  • checkout, config, make and install nlohmann/json

Step 4:

  • config and make pdf_reader

Done!

Run with

LD_LIBRARY_PATH=/usr/local/lib64 pdf_reader file.pdf

Or in Ubuntu (look at poppler install output for more detail)

LD_LIBRARY_PATH=/usr/local/lib pdf_reader file.pdf

pdf_parser_c's People

Contributors

blackthunder0812 avatar robinson0812 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.