Hi!
On 12 March 2018 at 20:43, Dan Sinclair <
dsin...@chromium.org> wrote:
> I've been putting some thought into the PDFium public/ API and, before
> wandering down any one path, I'd like to hear how folks outside of Chrome
> are integrating with PDFium.
As well as what people people have mentioned in this thread, there's
some other open source projects I'm aware of at least:
https://github.com/KDE/okular/tree/pdfium_generator/generators/pdfium
https://github.com/paulovap/qtpdfium
http://code.qt.io/cgit/qt-labs/qtpdf.git/
> In Chrome we, basically, end up with a C++ wrapper on top of the PDFium C
> API. The wrapper is a nicer interface to PDFium for our purposes. Are other
> groups integrating PDFium using the C API directly, building a C++ layer on
> top or, doing something else? If we had a C++ API instead of a C API would
> that be an issue? (The core PDFium will always be C++, I'm just talking
> about the external interface in public/)
All the projects I'm aware of that use pdfium are in c++ (including
our applications), and there's a lot of duplication of effort in
wrapping the C API, so IMHO this makes a lot of sense.
It also just feels wrong to have c++ on both ends (internally and in
the application using pdfium), but being limited to a C API in
between. :-)
As for bindings for other languages; there's a ton of c++ libraries
out there, so I assume there's some solution for those languages to
have bindings for c++ APIs.
> One other large change I'd like to see is using UTF-8 strings instead of
> UTF16-LE. My understanding is that UTF16-LE is easier to work with on
> Windows due to it matching the native format, are there other benefits on
> keeping it instead of using UTF-8?
I'm not familiar enough with other frameworks, but at least Qt also
uses UTF16 internally for performance reasons (the string handling is
also one of the few parts of Qt that has hand-written assembly for
this reason). So at least when integrating with a Qt application there
would be a slight performance decrease, but I doubt it matters for 99%
of the cases.
What does pdfium use internally, and what does chromium use internally?
--
Martin Sandsmark
Chief Technical Officer
+47 980 33 988
https://remarkable.com
Pilestredet 75c, 0354 Oslo - Norway