mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-10-05 10:34:13 +02:00
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user