Live mode print: draw at 96 dpi, as the PDF export does

At the printer's own resolution (600-1200 dpi) symbols and texts were
replayed many times too big next to the wires and grid. Seen on a test
print to PDF; the same page now matches qet_export's PDF.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
ispyisail
2026-10-05 20:18:26 +13:00
parent 0df8ca5b3c
commit 0bb0ea225f
+5 -2
View File
@@ -738,8 +738,11 @@ QJsonObject LiveServer::print(const QJsonObject &request)
if (fi.exists()) return failure(QStringLiteral("%1 already exists; printing never replaces a file").arg(file));
}
QPrinter printer = file.isEmpty() ? QPrinter(info, QPrinter::HighResolution)
: QPrinter(QPrinter::HighResolution);
QPrinter printer = file.isEmpty() ? QPrinter(info) : QPrinter();
//96 dpi, as the PDF export draws: symbols are replayed at the
//device's resolution, so at a printer's 600-1200 dpi they came out
//many times too big next to the wires (seen on a test print)
printer.setResolution(96);
if (!file.isEmpty()) {
printer.setOutputFormat(QPrinter::PdfFormat);
printer.setOutputFileName(file);