Description: Print Dialog: list of available paper size is unsorted list (no logic at all) and contains a duplicate A4 paper size Steps to Reproduce: 1. Open Writer 2. Pick some (virtual) printer like Microsoft XPS Printer 3. Expand drop down of the available paper sizes Actual Results: No logic: it's isn't sorted in name (like A4) or Dimensions Expected Results: I would sort the labeled paper sizes by Name; and below it the unnamed paper size by size (width, in case of portrait orientation) Reproducible: Always User Profile Reset: No Additional Info: Version: 7.5.0.0.alpha0+ (x64) / LibreOffice Community Build ID: 349e3af0c5dd5ed495ed61aab526f63c16f0e215 CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: Skia/Raster; VCL: win Locale: nl-NL (nl_NL); UI: en-US Calc: CL threaded
Repro Version: 7.5.0.0.alpha0+ (x64) / LibreOffice Community Build ID: bfb0dbee201a69c26293947c78356f320ff62a0b CPU threads: 4; OS: Windows 10.0 Build 19044; UI render: Skia/Vulkan; VCL: win Locale: es-ES (es_ES); UI: en-US Calc: CL threaded
(In reply to Telesto from comment #0) > I would sort the labeled paper sizes by Name; and below it the unnamed paper > size by size (width, in case of portrait orientation) The function PrintDialog::setPaperSizes() iterates over printer data and adds the paper size with proper names to the list (not all sizes can be assigned to a name). The sequence seems to be defined by the printer. Sorting by name is likely not an improvement, see https://opengrok.libreoffice.org/xref/core/vcl/inc/print.hrc (eg. 16k, A0..10, Arch A..E, B4..6, etc.).
Created attachment 182895 [details] Paper sizes returned by MSO for "XPS Document Writer" We discussed the topic in the design meeting. The sorting probably comes from the printer target, for example spreads FAX A0..6 across the options. Alphabetical sorting likely fails as U.S. sizes [1] uses Ledger, Tabloid, Legal, Letter with Quarto, Government, Demitab... etc. Consequently we could resolve the ticket as NOB (my take) or predefine a sort order that would be applied to the list. Second part of the report are the duplicates, which I can confirm for the "Microsoft XPS Document Writer" on Windows. But no other printer and of course not on Linux. MSO has different names for the paper types although it apparently has the same size. [1] https://en.wikipedia.org/wiki/Paper_size#North_American_paper_sizes
I can see some seemingly-duplicated entries in the paper size dropdown for an Epson WF-7720, e.g.: - A3 297mm × 420mm - A3 297mm × 420mm - A4 210mm × 297mm - A4 210mm × 297mm But if I use the same printer in Ubuntu's system print dialog, I can see them labelled as: - A3 - A3 (Borderless) - A4 - A4 (Borderless) So I think it might be that LO does not display some of the differentiating metadata? Which would make this an enhancement request. Telesto, can you see if a different app shows a distinction between the duplicated paper sizes? Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community Build ID: 83b1f6b58a30bdb589e9ce73deef39f021aebde1 CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3 Locale: en-AU (en_AU.UTF-8); UI: en-US Calc: threaded
Created attachment 187109 [details] Screencast List of Paper Sizes (In reply to Stéphane Guillou (stragu) from comment #4) > I can see some seemingly-duplicated entries in the paper size dropdown for > an Epson WF-7720, e.g.: > > - A3 297mm × 420mm > - A3 297mm × 420mm > - A4 210mm × 297mm > - A4 210mm × 297mm > > But if I use the same printer in Ubuntu's system print dialog, I can see > them labelled as: > > - A3 > - A3 (Borderless) > - A4 > - A4 (Borderless) > > So I think it might be that LO does not display some of the differentiating > metadata? Which would make this an enhancement request. > Telesto, can you see if a different app shows a distinction between the > duplicated paper sizes? A nice observation :-). Surely something to investigate. However not exactly what I had in mind here. The initial point: there listing of paper size is rather erratic. I would - for example - group all ISO-216 paper size, and put those in order. Now everything is scattered the list without clear pattern of arrangement. Envelope sizes are also belonging together
Created attachment 187110 [details] Screencast of the XPS printer own list of supported paper sizes The screen shows: A) Arrangement: ordered list (compared unordered in LibreOffice) B) Labeling: all paper sizes have a name in for the XPS printer itself. However LibreOffice is mishmash labeling by name, and (fall-back) dimensions. LibreOffice appears to use an internal list of paper dimensions and labels. And attempts to match those with the Printer Support paper sizes. This instead of the paper sizes + labels from the printer driver itself. The Print Preview in Chromium does list the printer supported paper sizes including their names. So it appears to be possible to extract labels + and sizes from the driver (and maybe even the order in which they are listed).