From 0bb0ea225f29a3f8132b6775b281413e2cce82bf Mon Sep 17 00:00:00 2001 From: ispyisail Date: Mon, 5 Oct 2026 20:18:26 +1300 Subject: [PATCH] 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 --- sources/scripting/liveserver.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/sources/scripting/liveserver.cpp b/sources/scripting/liveserver.cpp index 1939b61a0..1fbbba119 100644 --- a/sources/scripting/liveserver.cpp +++ b/sources/scripting/liveserver.cpp @@ -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);