Re: Printing A0 to PDF crashes librecad on windows
Posted by
LordOfBikes on
Aug 13, 2014; 10:05pm
URL: https://forum.librecad.org/Printing-A0-to-PDF-crashes-librecad-on-windows-tp5710273p5710303.html
Dongxu,
I think I've fixed "Export as PDF" with my latest
commits.
Qt itself can handle export to PDF, the problem was
QPrinterDialog. I found it in the Qt source codes. The Windows and QSX version of
QPrinterDialog returns
Rejected if the format is not equal to
QPrinter::NativeFormat. So printing was abandoned. It worked on Linux because of native OS support for
Print to PDF.
I generally tested the code on Windows, I exported an A0 drawing with test code, but have to check the commited version on Windows tomorrow.
If this works on Windows, this could be the solution for the threads original issue too. When export to PDF within LC works, it is not necessary to print on a virtual PDF printer like PDF creator or FreePDF which could also have been the cause of the exception.
Armin
investing less than half an hour into Search function can save hours or days of waiting for a solution