summaryrefslogtreecommitdiffstats
path: root/src/plugins/imageformats/pdf
Commit message (Collapse)AuthorAgeFilesLines
* Remove the rest of qmake based configurationMichal Klocek2021-10-141-13/+0
| | | | | | | | | | The only not cover part in cmake port are: * ios builds for qtpdf * qt static dependecies for qpdf Pick-to: 6.2 Change-Id: Iefe624c35d847b4a9c3cd970192487340b1657f9 Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* Add QtPdf to cmake buildMichal Klocek2021-08-174-405/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Port QtPdf to Qt6: * QtPdf,QtPdfWidgets,QtPdfQuick libs * QtPdfQuickPlugin, QtPdfPlugin (imageformat) plugins * widget and quick examples * qtpdf tests To fit gn cmake integration and new repo layout code is a bit reshuffled. Compared to qmke build following features are not ported yet: * ios fat libs * qtbase 3rdparty static dependencies WebEngine build can be skipped with setting QT_FEATURE_qtwebengine_build=OFF Note this patch needs follow up for 6.2 branch to disable qtpdf builds by default, since this should not part of qt 6.2 release. Pick-to: 6.2 Task-number: QTBUG-95353 Change-Id: I4dd9f3934bdd478fb6d2fa686074a24d91f09953 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* PDF: Load the PDF when jumping to the image otherwise it will failAndy Shaw2020-09-231-1/+1
| | | | | | | | | If the PDF is not loaded before it jumps to the image then it fails to jump to the specified page and ends up showing the first one. Pick-to: 5.15 Change-Id: I6061431e1fd9b743afaca3df0aec03dc6a1144bf Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Fix prl generation in sub modules of webengine repoMichal Klocek2020-07-231-2/+4
| | | | | | | | | | | | | | | QtPdf and QtWebEngine builds are producing few libraries in one build. This creates some corner cases like prl file generation. Paths in prl files are replaced on installation with sed. Unfortunately this will not work well if we build libraries which depends on not yet installed libs, since prl files reused by build are not processed by sed. Add workaround in this case so all depend libs are aware of their static dependencies and generate correct prl files. Task-number: QTBUG-85616 Change-Id: I0dbeb96bccbc4865dd52dea7c5d619f8cda1a596 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Remove deprecated function name()Jan Arve Sæther2020-03-092-6/+0
| | | | | | | It seems that it has been deprecated since 5.13 Change-Id: I68bf10b068bedddbfc3b3f0a112f5ab5291bd5d7 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* QPdfDocument and QPdfIOHandler: add scale and clip featuresShawn Rutledge2020-01-301-2/+8
| | | | | | | | Like some other image plugins, the PDF plugin now supports ImageOption::ScaledClipRect and ScaledSize. Change-Id: Ie7278752e49c885cc4580f30af1ec5e6310f8334 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Add a QImageIOHandler to render PDF with QtQuick ImageShawn Rutledge2019-11-255-0/+416
Now you can use Image in QML to display the first page of a PDF file by default. (The implementation is very similar to the handler plugin in the QtSVG module.) To display other pages, you can set the new currentFrame property that is being added to Image in 5.14. QPdfIOHandler uses its own instance of QPdfDocument to do the rendering. An instance will be created each time the image needs to read a frame from the file (on creation; each time the currentFrame property is changed; each time sourceSize is changed to require a different resolution rendering). This approach is not as efficient as it would be to share the QPdfDocument instance among multiple Images that are rendering different pages at the same time, as well as sharing with the QML Document declaration that we plan to add. However, if you set asynchronous: true, each Image will render its page from the PDF in its own thread. PDFium is not thread-safe, so sharing the QPdfDocument among multiple threads is not safe. It may be possible to make it safe by having a dedicated PDF-rendering thread, but that is not yet done in this patch. Change-Id: I7a1f8cd7bd5b8f93d45fa9350752b2d9356b04fe Reviewed-by: Michal Klocek <michal.klocek@qt.io>