qpdf icon indicating copy to clipboard operation
qpdf copied to clipboard

How to Deploy ?

Open harleyham opened this issue 2 years ago • 2 comments

I've had success using it within QT Creator, both in DEBUG and RELEASE.

But when trying to DEPLOY, that is, using it outside the QT environment, my program run ok, but when it calls to show the PDF, the program gives a CRASH.

Where should the RESOURCES be placed, along with the .EXE or in another directory?

harleyham avatar Feb 21 '22 01:02 harleyham

I have this problem too.

When I build on release exe and run it on my pc (that I develope on it - qt 5.12.11 windows 10) , It run ok and opens pdf files.

Even I move my release folder to any where on my pc, it work fine.

But when I move release folder to other pc, that is not installed qt, when my code run this line , m_pPdfWidget = new QPdfWidget(this); it is crashed. note: all qt dll are copied beside my exe and I copy plugins folders beside my exe.

also I have this log in event viewer:

Faulting application name: pdfviewer.exe, version: 0.0.0.0, time stamp: 0x62268388
Faulting module name: Qt5Core.dll, version: 5.12.11.0, time stamp: 0x60a3b4e6
Exception code: 0xc0000409
Fault offset: 0x00000000000285a8
Faulting process id: 0x2f3c
Faulting application start time: 0x01d8327c85727bbb
Faulting application path: C:\Users\Ehsan\Downloads\Compressed\DebugNodatlas\Release\pdfviewer.exe
Faulting module path: C:\Users\Ehsan\Downloads\Compressed\DebugNodatlas\Release\Qt5Core.dll
Report Id: 3d679cc2-8051-4ad0-ae0c-8e7d3292122a
Faulting package full name: 
Faulting package-relative application ID: 

ehsanr1366 avatar Mar 08 '22 00:03 ehsanr1366

The resources (which contain the pdf.js viewer) are compiled into the binary executable, as for the rest since the viewer is based on QtWebEngine one must follow the Qt guide to deploy WebEngine based applications: https://doc.qt.io/qt-5/qtwebengine-deploying.html

Archie3d avatar Mar 08 '22 21:03 Archie3d