Code Monkey home page Code Monkey logo

go-pdfium-render's Introduction

go-pdfium-render

A golang libary that uses to cgo/pdfium to render pdfs to images.

Why pdfium? Because it is the best in class and because it has a BSD style license, also there will be continued development on pdfium as long as chrome is around. [0]

Install

Pdfium binaries needs to be present on your system and pkg-config should be able to find it.

I wrote my own .pc file.

prefix=/opt/pdfium
libdir=/opt/pdfium/lib
includedir=/opt/pdfium/include

Name: pdfium
Description: pdfium
Version: 3580
Requires:

Libs: -L${libdir} -lpdfium
Cflags: -I${includedir}

Resources

[0] https://tinyurl.com/yd5fb2rz (PDF rendering engine performance and fidelity comparison)
[2] https://pdfium.googlesource.com/pdfium/+/HEAD/docs/getting-started.md
[3] https://karthikkaranth.me/blog/calling-c-code-from-go/
[4] https://github.com/arrieta/golang-cpp-basic-example
[5] https://groups.google.com/forum/#!topic/pdfium/r6KCGo6q7Fo
[6] https://github.com/cgilling/build-pdfium
[7] http://cdn01.foxitsoftware.com/pub/foxit/manual/enu/FoxitPDF_SDK20_Guide.pdf
[8] https://github.com/bblanchon/pdfium-binaries
[9] https://tinyurl.com/y8s3aen5 (libvips)

go-pdfium-render's People

Contributors

brunsgaard avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

go-pdfium-render's Issues

License

Hi!

would it be possible to add a LICENSE file to this repository or state the license this code is published under somewhere in the README?
Unfortunately the license checker we use flags this dependency since no compatible license was found.

Kind regards

Dockerize

Hi,

I see some good work you've did here. I think dockerizing this app and setting it with HTTP requests would be very beneficial for everyone in regards to PDF to Image conversions.

Can you share the complete build process here for ubuntu 16.04? I'm not very familiar with pc files and not very sure how important is it to achieve successful build for this app. I can help dockerizing it if need so.

Thanks

Empty png files

Hi

First at all, many thanks for sharing your code! That was quite helpful. I wonder though: Did you ever notice that iterating over pages of a PDF file will produce empty PNG files? I do not know why, seems to be quite random, but using it on larger PDFs it will generate a lot of empty images.

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.