All Projects → Archie3d → Qpdf

Archie3d / Qpdf

Licence: lgpl-2.1
PDF viewer widget for Qt

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Qpdf

Pdfh5
web/h5/移动端PDF预览插件
Stars: ✭ 423 (+281.08%)
Mutual labels:  pdf, pdf-viewer
Pdf2htmlex
Convert PDF to HTML without losing text or format.
Stars: ✭ 472 (+325.23%)
Mutual labels:  pdf, pdf-viewer
Pdfvuer
A PDF viewer for Vue using Mozilla's PDF.js
Stars: ✭ 443 (+299.1%)
Mutual labels:  pdf, pdf-viewer
Pdf Flipbook
Browse PDF document like a book turning its pages
Stars: ✭ 279 (+151.35%)
Mutual labels:  pdf, pdf-viewer
Beamerpresenter
Simple dual screen pdf presentation software
Stars: ✭ 30 (-72.97%)
Mutual labels:  pdf-viewer, qt5
Xournalpp
Xournal++ is a handwriting notetaking software with PDF annotation support. Written in C++ with GTK3, supporting Linux (e.g. Ubuntu, Debian, Arch, SUSE), macOS and Windows 10. Supports pen input from devices such as Wacom Tablets.
Stars: ✭ 5,353 (+4722.52%)
Mutual labels:  pdf, pdf-viewer
React Pdf
Display PDFs in your React app as easily as if they were images.
Stars: ✭ 5,320 (+4692.79%)
Mutual labels:  pdf, pdf-viewer
Pdfview Android
Small Android library to show PDF files
Stars: ✭ 132 (+18.92%)
Mutual labels:  pdf, pdf-viewer
Buka
Buka is a modern software that helps you manage your ebook at ease.
Stars: ✭ 896 (+707.21%)
Mutual labels:  pdf, pdf-viewer
Sumatrapdf
SumatraPDF reader
Stars: ✭ 7,462 (+6622.52%)
Mutual labels:  pdf, pdf-viewer
React Native Pdfview
📚 PDF viewer for React Native
Stars: ✭ 198 (+78.38%)
Mutual labels:  pdf, pdf-viewer
Jfbview
PDF and image viewer for the Linux framebuffer.
Stars: ✭ 78 (-29.73%)
Mutual labels:  pdf, pdf-viewer
Dspdfviewer
Dual-Screen PDF Viewer for latex-beamer
Stars: ✭ 184 (+65.77%)
Mutual labels:  pdf, qt5
Document Viewer
Document Viewer is a highly customizable document viewer for Android.
Stars: ✭ 415 (+273.87%)
Mutual labels:  pdf, pdf-viewer
Cordova Plugin Document Viewer
A Document Viewer cordova/phonegap plugin for iOS, Android and Windows
Stars: ✭ 168 (+51.35%)
Mutual labels:  pdf, pdf-viewer
React Pdf Highlighter
Set of React components for PDF annotation
Stars: ✭ 448 (+303.6%)
Mutual labels:  pdf, pdf-viewer
Vue Pdf
vue.js pdf viewer
Stars: ✭ 1,700 (+1431.53%)
Mutual labels:  pdf, pdf-viewer
React Pdf Js
A React component to wrap PDF.js
Stars: ✭ 489 (+340.54%)
Mutual labels:  pdf, pdf-viewer
Ng2 Pdf Viewer
📄 PDF Viewer Component for Angular 5+
Stars: ✭ 997 (+798.2%)
Mutual labels:  pdf, pdf-viewer
Flutter plugin pdf viewer
A flutter plugin for handling PDF files. Works on both Android & iOS
Stars: ✭ 81 (-27.03%)
Mutual labels:  pdf, pdf-viewer

QPdf

PDF viewer widget for Qt 5.

This is a wrapper of pdf.js JavaScript PDF renderer using Qt WebEngine.

Screenshot

This qmake-based project defines two build targets: qpdf shared library, and an example PDF viewer (pdfviewer) based on qpdf library. Should yoo want to integrate a PDF view into your project, you need to take qpdf library only, you do not need pdfviewer (though you may use it as inspirational example for your project). So you may copy qpdflib into your project and build it as a shared library to be linked with your code.

How to compile

  • Make sure you have Qt 5.9.x or later installed. Earlier Qt versions are not supported.
  • Open qpdf.pro project file in QtCreator
  • Build and run

Open PDF files

qpdf library offers two ways to open PDF files:

loadData method serializes PDF data as base64 string and injects it into JavaScript environment. This may fails however when loading huge PDF files.

loadFile can load PDFs of any size, however the method is blocked by default due to the cross-origin security restriction, since it uses WebEngine's load URL method. In order to make this method work, you have to disable web security by passing --disable-web-security argument to your QApplication instance (see how its done in pdfviwer example).

Debugging

If something goes wrong, as sometimes it does, you may use Chromium debug console to assess the situation:

  • Define QTWEBENGINE_REMOTE_DEBUGGING environment variable to activate WebEngine debug server, e.g. QTWEBENGINE_REMOTE_DEBUGGING=0.0.0.0:9999
  • Launch your qpdf-based application
  • Open Chrome or Chromium web browser and navigate to http://localhost:9999
  • Select the running application link in the browser and you will be presented with a familiar web page inspection console.

Qt Quick Compiler Issue

This project includes JavaScript *.js files as resources. Qt Creator may try to add them to QML resources instead, which makes the web engine unable to load *.js from normal resources. This happens on Windows in Release builds automatically (but not in Debug for some reason). Make sure to disable Qt Quick Compiler in your project build settings: Disable Qt Quick

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].