added PDF/A-1b compliancy to all PDF export functions

for more details about this look at: https://www.kdab.com/creating-pdfa-documents-qt/
This commit is contained in:
Tobias Falk
2023-06-27 22:57:26 +02:00
committed by Chris Hennes
parent ba1171f7c1
commit 529f9401f7
6 changed files with 14 additions and 0 deletions

View File

@@ -707,6 +707,8 @@ PyObject* Application::sExport(PyObject * /*self*/, PyObject *args)
if (view3d)
view3d->viewAll();
QPrinter printer(QPrinter::ScreenResolution);
// setPdfVersion sets the printied PDF Version to comply with PDF/A-1b, more details under: https://www.kdab.com/creating-pdfa-documents-qt/
printer.setPdfVersion(QPagedPaintDevice::PdfVersion_A1b);
printer.setOutputFormat(QPrinter::PdfFormat);
printer.setOutputFileName(fileName);
view->print(&printer);