fix(print): send Windows plots to the chosen printer, name the default, report failures

On Windows a plot with no printer chosen went to the PDF application's
bare "print" verb — whatever that application considered its default —
and a viewer without a "printto" verb (Edge, store readers) silently
dropped the printer the dialog had chosen. The dialog also never named the
system default, and a failed printer enumeration left only "Default" and
"PDF" with the reason written to a console nobody sees.

- The default printer is looked up by name (GetDefaultPrinterW) both for
  the dialog's "System default printer (…)" entry and before every job.
- A pure route decision (plan_print_route) resolves "Default" to that
  name and uses the PDF application only when it registered a "printto"
  verb for .pdf (AssocQueryStringW); otherwise the job goes straight to
  the spooler through the existing GDI path. The report says which:
  "Sent to printer: NAME (direct print | via the PDF application)".
- list_printers reports the system's own error; the plot dialog shows it
  under the printer row and the command line warns once. A desktop without
  CUPS is an empty list, not an error.
- PRINTERS command: default printer, listed printers (or the error) and,
  on Windows, the print route — a report to paste into an issue.
- Properties… on the Default entry opens that printer's preferences sheet.
- GDI path: the driver's dmSize is kept (its private data lives behind
  it), the print raster is no longer memoised for the session, and a
  spooled temporary PDF is removed.

Tests: route planning (named / blank / no default / printto or not), the
PRINTERS command; the two Windows-only GDI tests pass the resolved name.

Co-Authored-By: Claude Opus 5 <[email protected]>
This commit is contained in:
PanosandClaude Opus 5 committed 2026-09-18 15:49:27 +03:00
1 parent 2b38f798c0
commit c36ae08fd0
29 files changed
+592 -112

No files matched your search

+9
View File
@@ -5111,6 +5111,15 @@ plot =
.system-default-printer = طابعة النظام الافتراضية
.what-to-plot = ما المراد طباعته
.x-mm = X (مم)
.default-printer-name = الطابعة الافتراضية: __ocs_fmt_0__
.default-printer-none-reported-by-the-system = الطابعة الافتراضية: لم يبلّغ النظام عن أي طابعة
.printers-none-listed-by-the-system = الطابعات: لم يسرد النظام أي طابعة
.printers-count = الطابعات (__ocs_fmt_0__):
.could-not-list-printers-error = تعذّر سرد الطابعات: __ocs_fmt_0__
.plots-go-through-the-pdf-application-command = تمر المخططات عبر تطبيق PDF: __ocs_fmt_0__
.plots-go-straight-to-the-printer-no-pdf-application-registers-a-print-verb = تذهب المخططات مباشرة إلى الطابعة (لا يسجل أي تطبيق PDF أمر طباعة).
.via-the-pdf-application = عبر تطبيق PDF
.direct-print = طباعة مباشرة
.y-mm = Y (مم)
manage =
+9
View File
@@ -5099,6 +5099,15 @@ plot =
.system-default-printer = Системен принтер по подразбиране
.what-to-plot = Какво да се плотира
.x-mm = X (мм)
.default-printer-name = Принтер по подразбиране: __ocs_fmt_0__
.default-printer-none-reported-by-the-system = Принтер по подразбиране: системата не съобщава за такъв
.printers-none-listed-by-the-system = Принтери: системата не изброява нито един
.printers-count = Принтери (__ocs_fmt_0__):
.could-not-list-printers-error = Принтерите не могат да бъдат изброени: __ocs_fmt_0__
.plots-go-through-the-pdf-application-command = Печатът минава през PDF приложението: __ocs_fmt_0__
.plots-go-straight-to-the-printer-no-pdf-application-registers-a-print-verb = Печатът отива директно към принтера (никое PDF приложение не регистрира команда за печат).
.via-the-pdf-application = чрез PDF приложението
.direct-print = директен печат
.y-mm = Y (мм)
manage =
+9
View File
@@ -5096,6 +5096,15 @@ plot =
.system-default-printer = Výchozí tiskárna systému
.what-to-plot = Co fabulovat
.x-mm = X (mm)
.default-printer-name = Výchozí tiskárna: __ocs_fmt_0__
.default-printer-none-reported-by-the-system = Výchozí tiskárna: systém žádnou nehlásí
.printers-none-listed-by-the-system = Tiskárny: systém žádné neuvádí
.printers-count = Tiskárny (__ocs_fmt_0__):
.could-not-list-printers-error = Nelze vypsat tiskárny: __ocs_fmt_0__
.plots-go-through-the-pdf-application-command = Tisk prochází aplikací PDF: __ocs_fmt_0__
.plots-go-straight-to-the-printer-no-pdf-application-registers-a-print-verb = Tisk jde přímo na tiskárnu (žádná aplikace PDF neregistruje příkaz tisku).
.via-the-pdf-application = přes aplikaci PDF
.direct-print = přímý tisk
.y-mm = Y (mm)
manage =
+9
View File
@@ -5097,6 +5097,15 @@ plot =
.system-default-printer = Systemstandarddrucker
.what-to-plot = Was zu plotten
.x-mm = X (mm)
.default-printer-name = Standarddrucker: __ocs_fmt_0__
.default-printer-none-reported-by-the-system = Standarddrucker: vom System keiner gemeldet
.printers-none-listed-by-the-system = Drucker: vom System keiner aufgeführt
.printers-count = Drucker (__ocs_fmt_0__):
.could-not-list-printers-error = Drucker konnten nicht aufgelistet werden: __ocs_fmt_0__
.plots-go-through-the-pdf-application-command = Plots laufen über die PDF-Anwendung: __ocs_fmt_0__
.plots-go-straight-to-the-printer-no-pdf-application-registers-a-print-verb = Plots gehen direkt an den Drucker (keine PDF-Anwendung registriert einen Druckbefehl).
.via-the-pdf-application = über die PDF-Anwendung
.direct-print = Direktdruck
.y-mm = Y (mm)
manage =
+9
View File
@@ -5099,6 +5099,15 @@ plot =
.system-default-printer = Προεπιλεγμένος εκτυπωτής συστήματος
.what-to-plot = Τι θα εκτυπωθεί
.x-mm = X (mm)
.default-printer-name = Προεπιλεγμένος εκτυπωτής: __ocs_fmt_0__
.default-printer-none-reported-by-the-system = Προεπιλεγμένος εκτυπωτής: το σύστημα δεν αναφέρει κανέναν
.printers-none-listed-by-the-system = Εκτυπωτές: το σύστημα δεν αναφέρει κανέναν
.printers-count = Εκτυπωτές (__ocs_fmt_0__):
.could-not-list-printers-error = Δεν ήταν δυνατή η λίστα εκτυπωτών: __ocs_fmt_0__
.plots-go-through-the-pdf-application-command = Οι εκτυπώσεις περνούν από την εφαρμογή PDF: __ocs_fmt_0__
.plots-go-straight-to-the-printer-no-pdf-application-registers-a-print-verb = Οι εκτυπώσεις πάνε απευθείας στον εκτυπωτή (καμία εφαρμογή PDF δεν δηλώνει εντολή εκτύπωσης).
.via-the-pdf-application = μέσω της εφαρμογής PDF
.direct-print = απευθείας εκτύπωση
.y-mm = Y (mm)
manage =
+9
View File
@@ -5100,6 +5100,15 @@ plot =
.system-default-printer = System default printer
.what-to-plot = What to plot
.x-mm = X (mm)
.default-printer-name = Default printer: __ocs_fmt_0__
.default-printer-none-reported-by-the-system = Default printer: none reported by the system
.printers-none-listed-by-the-system = Printers: none listed by the system
.printers-count = Printers (__ocs_fmt_0__):
.could-not-list-printers-error = Could not list printers: __ocs_fmt_0__
.plots-go-through-the-pdf-application-command = Plots go through the PDF application: __ocs_fmt_0__
.plots-go-straight-to-the-printer-no-pdf-application-registers-a-print-verb = Plots go straight to the printer (no PDF application registers a print verb).
.via-the-pdf-application = via the PDF application
.direct-print = direct print
.y-mm = Y (mm)
manage =
+9
View File
@@ -5099,6 +5099,15 @@ plot =
.system-default-printer = Impresora predeterminada del sistema
.what-to-plot = Qué trazar
.x-mm = X (mm)
.default-printer-name = Impresora predeterminada: __ocs_fmt_0__
.default-printer-none-reported-by-the-system = Impresora predeterminada: el sistema no informa ninguna
.printers-none-listed-by-the-system = Impresoras: el sistema no lista ninguna
.printers-count = Impresoras (__ocs_fmt_0__):
.could-not-list-printers-error = No se pudieron listar las impresoras: __ocs_fmt_0__
.plots-go-through-the-pdf-application-command = Los trazados pasan por la aplicación PDF: __ocs_fmt_0__
.plots-go-straight-to-the-printer-no-pdf-application-registers-a-print-verb = Los trazados van directamente a la impresora (ninguna aplicación PDF registra un comando de impresión).
.via-the-pdf-application = a través de la aplicación PDF
.direct-print = impresión directa
.y-mm = Y (mm)
manage =
+9
View File
@@ -5098,6 +5098,15 @@ plot =
.system-default-printer = Järjestelmän oletustulostin
.what-to-plot = Mitä piirtää
.x-mm = X (mm)
.default-printer-name = Oletustulostin: __ocs_fmt_0__
.default-printer-none-reported-by-the-system = Oletustulostin: järjestelmä ei ilmoita yhtään
.printers-none-listed-by-the-system = Tulostimet: järjestelmä ei luettele yhtään
.printers-count = Tulostimet (__ocs_fmt_0__):
.could-not-list-printers-error = Tulostimia ei voitu luetella: __ocs_fmt_0__
.plots-go-through-the-pdf-application-command = Tulosteet kulkevat PDF-sovelluksen kautta: __ocs_fmt_0__
.plots-go-straight-to-the-printer-no-pdf-application-registers-a-print-verb = Tulosteet menevät suoraan tulostimelle (mikään PDF-sovellus ei rekisteröi tulostuskomentoa).
.via-the-pdf-application = PDF-sovelluksen kautta
.direct-print = suoratulostus
.y-mm = Y (mm)
manage =
+9
View File
@@ -5099,6 +5099,15 @@ plot =
.system-default-printer = Imprimante système par défaut
.what-to-plot = Quoi faire?
.x-mm = X (mm)
.default-printer-name = Imprimante par défaut : __ocs_fmt_0__
.default-printer-none-reported-by-the-system = Imprimante par défaut : aucune signalée par le système
.printers-none-listed-by-the-system = Imprimantes : aucune répertoriée par le système
.printers-count = Imprimantes (__ocs_fmt_0__) :
.could-not-list-printers-error = Impossible de lister les imprimantes : __ocs_fmt_0__
.plots-go-through-the-pdf-application-command = Les tracés passent par l'application PDF : __ocs_fmt_0__
.plots-go-straight-to-the-printer-no-pdf-application-registers-a-print-verb = Les tracés vont directement à l'imprimante (aucune application PDF n'enregistre de commande d'impression).
.via-the-pdf-application = via l'application PDF
.direct-print = impression directe
.y-mm = Y (mm)
manage =
+9
View File
@@ -5087,6 +5087,15 @@ plot =
.system-default-printer = सिस्टम डिफ़ॉल्ट प्रिंटर
.what-to-plot = क्या प्लॉट करना है
.x-mm = एक्स (मिमी)
.default-printer-name = डिफ़ॉल्ट प्रिंटर: __ocs_fmt_0__
.default-printer-none-reported-by-the-system = डिफ़ॉल्ट प्रिंटर: सिस्टम ने कोई नहीं बताया
.printers-none-listed-by-the-system = प्रिंटर: सिस्टम ने कोई सूचीबद्ध नहीं किया
.printers-count = प्रिंटर (__ocs_fmt_0__):
.could-not-list-printers-error = प्रिंटर सूचीबद्ध नहीं किए जा सके: __ocs_fmt_0__
.plots-go-through-the-pdf-application-command = प्लॉट PDF एप्लिकेशन के माध्यम से जाते हैं: __ocs_fmt_0__
.plots-go-straight-to-the-printer-no-pdf-application-registers-a-print-verb = प्लॉट सीधे प्रिंटर पर जाते हैं (कोई PDF एप्लिकेशन प्रिंट कमांड पंजीकृत नहीं करता)।
.via-the-pdf-application = PDF एप्लिकेशन के माध्यम से
.direct-print = सीधी प्रिंटिंग
.y-mm = Y (मिमी)
manage =
+9
View File
@@ -5098,6 +5098,15 @@ plot =
.system-default-printer = Rendszer alapértelmezett nyomtató
.what-to-plot = Mit kell kitalálni
.x-mm = X (mm)
.default-printer-name = Alapértelmezett nyomtató: __ocs_fmt_0__
.default-printer-none-reported-by-the-system = Alapértelmezett nyomtató: a rendszer nem jelez egyet sem
.printers-none-listed-by-the-system = Nyomtatók: a rendszer nem sorol fel egyet sem
.printers-count = Nyomtatók (__ocs_fmt_0__):
.could-not-list-printers-error = A nyomtatók nem listázhatók: __ocs_fmt_0__
.plots-go-through-the-pdf-application-command = A nyomtatás a PDF-alkalmazáson keresztül megy: __ocs_fmt_0__
.plots-go-straight-to-the-printer-no-pdf-application-registers-a-print-verb = A nyomtatás közvetlenül a nyomtatóra megy (egy PDF-alkalmazás sem regisztrál nyomtatási parancsot).
.via-the-pdf-application = a PDF-alkalmazáson keresztül
.direct-print = közvetlen nyomtatás
.y-mm = Y (mm)
manage =
+9
View File
@@ -5098,6 +5098,15 @@ plot =
.system-default-printer = Stampante predefinita del sistema
.what-to-plot = Cosa tracciare
.x-mm = X (mm)
.default-printer-name = Stampante predefinita: __ocs_fmt_0__
.default-printer-none-reported-by-the-system = Stampante predefinita: nessuna segnalata dal sistema
.printers-none-listed-by-the-system = Stampanti: nessuna elencata dal sistema
.printers-count = Stampanti (__ocs_fmt_0__):
.could-not-list-printers-error = Impossibile elencare le stampanti: __ocs_fmt_0__
.plots-go-through-the-pdf-application-command = Le stampe passano dall'applicazione PDF: __ocs_fmt_0__
.plots-go-straight-to-the-printer-no-pdf-application-registers-a-print-verb = Le stampe vanno direttamente alla stampante (nessuna applicazione PDF registra un comando di stampa).
.via-the-pdf-application = tramite l'applicazione PDF
.direct-print = stampa diretta
.y-mm = Y (mm)
manage =
+9
View File
@@ -5087,6 +5087,15 @@ plot =
.system-default-printer = システムの既定プリンター
.what-to-plot = 印刷対象
.x-mm = X(mm)
.default-printer-name = 既定のプリンター: __ocs_fmt_0__
.default-printer-none-reported-by-the-system = 既定のプリンター: システムから報告なし
.printers-none-listed-by-the-system = プリンター: システムに一覧なし
.printers-count = プリンター(__ocs_fmt_0__):
.could-not-list-printers-error = プリンターを一覧できませんでした: __ocs_fmt_0__
.plots-go-through-the-pdf-application-command = 印刷は PDF アプリケーション経由です: __ocs_fmt_0__
.plots-go-straight-to-the-printer-no-pdf-application-registers-a-print-verb = 印刷はプリンターへ直接送られます(印刷コマンドを登録した PDF アプリケーションがありません)。
.via-the-pdf-application = PDF アプリケーション経由
.direct-print = 直接印刷
.y-mm = Y(mm)
manage =
+9
View File
@@ -5098,6 +5098,15 @@ plot =
.system-default-printer = 시스템 기본 프린터
.what-to-plot = 무엇을 플롯할 것인가
.x-mm = X (mm)
.default-printer-name = 기본 프린터: __ocs_fmt_0__
.default-printer-none-reported-by-the-system = 기본 프린터: 시스템이 보고하지 않음
.printers-none-listed-by-the-system = 프린터: 시스템에 나열된 항목 없음
.printers-count = 프린터 (__ocs_fmt_0__):
.could-not-list-printers-error = 프린터 목록을 가져올 수 없습니다: __ocs_fmt_0__
.plots-go-through-the-pdf-application-command = 출력은 PDF 응용 프로그램을 거칩니다: __ocs_fmt_0__
.plots-go-straight-to-the-printer-no-pdf-application-registers-a-print-verb = 출력이 프린터로 직접 전송됩니다 (인쇄 명령을 등록한 PDF 응용 프로그램이 없음).
.via-the-pdf-application = PDF 응용 프로그램 경유
.direct-print = 직접 인쇄
.y-mm = Y (mm)
manage =
+9
View File
@@ -5097,6 +5097,15 @@ plot =
.system-default-printer = Standaardprinter van het systeem
.what-to-plot = Wat te plannen
.x-mm = X (mm)
.default-printer-name = Standaardprinter: __ocs_fmt_0__
.default-printer-none-reported-by-the-system = Standaardprinter: geen gemeld door het systeem
.printers-none-listed-by-the-system = Printers: geen vermeld door het systeem
.printers-count = Printers (__ocs_fmt_0__):
.could-not-list-printers-error = Kon printers niet weergeven: __ocs_fmt_0__
.plots-go-through-the-pdf-application-command = Plots gaan via de PDF-toepassing: __ocs_fmt_0__
.plots-go-straight-to-the-printer-no-pdf-application-registers-a-print-verb = Plots gaan rechtstreeks naar de printer (geen PDF-toepassing registreert een afdrukopdracht).
.via-the-pdf-application = via de PDF-toepassing
.direct-print = rechtstreeks afdrukken
.y-mm = Y (mm)
manage =
+9
View File
@@ -5098,6 +5098,15 @@ plot =
.system-default-printer = Domyślna drukarka systemowa
.what-to-plot = Co nakreślić
.x-mm = X (mm)
.default-printer-name = Drukarka domyślna: __ocs_fmt_0__
.default-printer-none-reported-by-the-system = Drukarka domyślna: system nie zgłasza żadnej
.printers-none-listed-by-the-system = Drukarki: system nie wymienia żadnej
.printers-count = Drukarki (__ocs_fmt_0__):
.could-not-list-printers-error = Nie można wyświetlić listy drukarek: __ocs_fmt_0__
.plots-go-through-the-pdf-application-command = Wydruki przechodzą przez aplikację PDF: __ocs_fmt_0__
.plots-go-straight-to-the-printer-no-pdf-application-registers-a-print-verb = Wydruki trafiają bezpośrednio do drukarki (żadna aplikacja PDF nie rejestruje polecenia drukowania).
.via-the-pdf-application = przez aplikację PDF
.direct-print = wydruk bezpośredni
.y-mm = Y (mm)
manage =
+9
View File
@@ -5099,6 +5099,15 @@ plot =
.system-default-printer = Impressora padrão do sistema
.what-to-plot = O que plotar
.x-mm = X (mm)
.default-printer-name = Impressora padrão: __ocs_fmt_0__
.default-printer-none-reported-by-the-system = Impressora padrão: nenhuma informada pelo sistema
.printers-none-listed-by-the-system = Impressoras: nenhuma listada pelo sistema
.printers-count = Impressoras (__ocs_fmt_0__):
.could-not-list-printers-error = Não foi possível listar as impressoras: __ocs_fmt_0__
.plots-go-through-the-pdf-application-command = As plotagens passam pelo aplicativo de PDF: __ocs_fmt_0__
.plots-go-straight-to-the-printer-no-pdf-application-registers-a-print-verb = As plotagens vão direto para a impressora (nenhum aplicativo de PDF registra um comando de impressão).
.via-the-pdf-application = pelo aplicativo de PDF
.direct-print = impressão direta
.y-mm = Y (mm)
manage =
+9
View File
@@ -5100,6 +5100,15 @@ plot =
.system-default-printer = Системный принтер по умолчанию
.what-to-plot = Что спланировать
.x-mm = X (мм)
.default-printer-name = Принтер по умолчанию: __ocs_fmt_0__
.default-printer-none-reported-by-the-system = Принтер по умолчанию: система не сообщает ни об одном
.printers-none-listed-by-the-system = Принтеры: система не перечисляет ни одного
.printers-count = Принтеры (__ocs_fmt_0__):
.could-not-list-printers-error = Не удалось получить список принтеров: __ocs_fmt_0__
.plots-go-through-the-pdf-application-command = Печать идёт через приложение PDF: __ocs_fmt_0__
.plots-go-straight-to-the-printer-no-pdf-application-registers-a-print-verb = Печать идёт напрямую на принтер (ни одно приложение PDF не регистрирует команду печати).
.via-the-pdf-application = через приложение PDF
.direct-print = прямая печать
.y-mm = Y (мм)
manage =
+9
View File
@@ -5039,6 +5039,15 @@ plot =
.system-default-printer = Varsayılan sistem yazıcısı
.what-to-plot = Yazdırılacak Alan
.x-mm = X (mm)
.default-printer-name = Varsayılan yazıcı: __ocs_fmt_0__
.default-printer-none-reported-by-the-system = Varsayılan yazıcı: sistem hiçbirini bildirmiyor
.printers-none-listed-by-the-system = Yazıcılar: sistem hiçbirini listelemiyor
.printers-count = Yazıcılar (__ocs_fmt_0__):
.could-not-list-printers-error = Yazıcılar listelenemedi: __ocs_fmt_0__
.plots-go-through-the-pdf-application-command = Çizimler PDF uygulaması üzerinden gider: __ocs_fmt_0__
.plots-go-straight-to-the-printer-no-pdf-application-registers-a-print-verb = Çizimler doğrudan yazıcıya gider (hiçbir PDF uygulaması yazdırma komutu kaydetmiyor).
.via-the-pdf-application = PDF uygulaması üzerinden
.direct-print = doğrudan yazdırma
.y-mm = Y (mm)
manage =
+9
View File
@@ -5082,6 +5082,15 @@ plot =
.system-default-printer = 系统默认打印机
.what-to-plot = 打印内容
.x-mm = X (毫米)
.default-printer-name = 默认打印机:__ocs_fmt_0__
.default-printer-none-reported-by-the-system = 默认打印机:系统未报告
.printers-none-listed-by-the-system = 打印机:系统未列出任何打印机
.printers-count = 打印机(__ocs_fmt_0__):
.could-not-list-printers-error = 无法列出打印机:__ocs_fmt_0__
.plots-go-through-the-pdf-application-command = 打印通过 PDF 应用程序进行:__ocs_fmt_0__
.plots-go-straight-to-the-printer-no-pdf-application-registers-a-print-verb = 打印直接发送到打印机(没有 PDF 应用程序注册打印命令)。
.via-the-pdf-application = 通过 PDF 应用程序
.direct-print = 直接打印
.y-mm = Y (毫米)
manage =
+9
View File
@@ -5094,6 +5094,15 @@ plot =
.system-default-printer = 系統預設印表機
.what-to-plot = 列印內容
.x-mm = X (毫米)
.default-printer-name = 預設印表機:__ocs_fmt_0__
.default-printer-none-reported-by-the-system = 預設印表機:系統未回報
.printers-none-listed-by-the-system = 印表機:系統未列出任何印表機
.printers-count = 印表機(__ocs_fmt_0__):
.could-not-list-printers-error = 無法列出印表機:__ocs_fmt_0__
.plots-go-through-the-pdf-application-command = 列印透過 PDF 應用程式進行:__ocs_fmt_0__
.plots-go-straight-to-the-printer-no-pdf-application-registers-a-print-verb = 列印直接送到印表機(沒有 PDF 應用程式註冊列印命令)。
.via-the-pdf-application = 透過 PDF 應用程式
.direct-print = 直接列印
.y-mm = Y (毫米)
manage =