Poppler Qt6 24.11.0
|
The Poppler Qt6 interface library, libpoppler-qt6, is a library that allows Qt6 programmers to easily load and render PDF files. The Poppler Qt6 interface library uses poppler internally to do its job, but the Qt6 programmer will never have to worry about poppler internals.
The Poppler Qt6 interface library is quite stable and working.
Examples programs can be found in the qt6/test directory. The Poppler Qt6 interface library is also used in the KDE's document viewer Okular. The source files for Okular's PDF plugin (Poppler-based) can be found on the git server of the KDE project, under this URL.
Programmer who would like to use the Poppler Qt6 interface library simply need to add the following line to their C++ source files:
For using the Qt6 interface on Android, there is an additional step - you must place the following font files in the assets/share/fonts directory of the Android APK:
These are used as substitute fonts for the base-14 fonts, and this step is required in order to reliably display documents with unembedded fonts. You can easily find these font files included within GhostScript.
A PDF document can then be loaded as follows:
Pages can be rendered to QImages with the following commands:
Finally, don't forget to destroy the document: