Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
PDF file export
sashapont last edited by sashapont
How is possible to export to pdf file with QPdfWriter- QTextDocument document which many pages and devede on pages pdf?
Something like this:
QPdfWriter pdfWriter(filePath); QPainter painter(&pdfWriter); textDocument->drawContents(&painter);
should do the trick.
Hope it helps
sashapont last edited by
It is good decision, but I try to export long table and it is not fit in one page :(((( And many rows are cut...
You should then maybe adapt the handling of the table to fit on pages to print.
A Former User last edited by
TEHb last edited by
Maybe try Lime Report ? Dev's support always online.
Lime Report is multi-platform and fully supported report engine library, report generator, report designer, report writer, reporting tool and reporting solution written in C++ based on Qt cross-platform application and UI framework. Lime Report is the best choice if you are looking for a Qt report engine, Qt report tool, Qt report library, Qt reporting tool, C++ reporting library for Qt or a Qt reporting library or simply a printing tool that generates PDF document from Qt using an XML template.
Alex last edited by
@sashapont The best way is to use report generators.
Consider CuteReport. It has pagination, item splitting, text flow, automatic table of contents and a lot of other handy features.
It is provided under both GPL/LGPL and proprietary Enterprise version.
Take a look: