Qt invoked printer dialog has wrong page sizes when running in Citrix environment

Viewed 61

I have a Python application running locally on Windows as well as from a Citrix environment. There are numerous printers connected to the local machine via software or network.

When opening a print dialog from a local application instance, the available page sizes are correct. When opening a print dialog from a Citrix application instance, the same printers are available but their page sizes are wrong.

To debug this I wrote the following Python snippet which lists the printer names and their supported page sizes:

from PyQt5.QtPrintSupport import *
for printer_info in QPrinterInfo.availablePrinters():
  print(printer_info.printerName())
  print(sorted([ps.name() for ps in printer_info.supportedPageSizes()]))
  print("="*42)

There are 8 printers connected:

  • Adobe PDF
  • Microsoft Print to PDF
  • PDF24
  • Network printer #1
  • Network printer #2
  • Network printer #3
  • Network printer #4
  • Send To OneNote 2016

When running locally, their lists of page sizes are as follows:

  • Adobe PDF: unique list of 38 page sizes
  • Microsoft Print to PDF: unique list of 10 page sizes
  • PDF24: unique list of 75 page sizes
  • Network printer #1: list of 41 page sizes
  • Network printer #2: identical to Network printer #1
  • Network printer #3: identical to Network printer #1
  • Network printer #4: unique list of 23 page sizes
  • Send To OneNote 2016: unique list of 10 page sizes

But when running the same script on the Citrix instance of the application it looks like this:

  • Adobe PDF: list of 94 page sizes
  • Microsoft Print to PDF: unique list of 10 page sizes, identical to local instance
  • PDF24: identical to Adobe PDF
  • Network printer #1: identical to Adobe PDF
  • Network printer #2: identical to Adobe PDF
  • Network printer #3: identical to Adobe PDF
  • Network printer #4: identical to Adobe PDF
  • Send To OneNote 2016: identical to Adobe PDF

So not only are all printers pretending to support the exact same page sizes, the list of page sizes does not correspond to any previously known lists. It is also missing several page sizes the printers are actually supporting.

The made-up list of 94 page sizes is this (we are in a German environment):

['10×11', '10×14', '11×17', '12×11', '15×11', '6 3/4 Umschlag', '9×11', 'A2', 'A3', 'A3 Extra',
 'A3 Extra Quer', 'A3 Gedreht', 'A3 Quer', 'A4', 'A4 Extra', 'A4 Gedreht', 'A4 Klein',
 'A4 Plus', 'A4 Quer', 'A5', 'A5 Extra', 'A5 Gedreht', 'A5 Quer', 'A6', 'A6 Gedreht',
 'B4 (ISO)', 'B4 (JIS) Gedreht', 'B5 (ISO) Extra', 'B5 (JIS)', 'B5 (JIS) Gedreht', 'B5 (JIS) Quer',
 'B6 (JIS)', 'B6 (JIS) Gedreht', 'C-Blatt', 'D-Blatt', 'E-Blatt', 'Executive', 'Folie',
 'German Legal Endlospapier', 'German Std Endlospapier', 'Jap. Doppelpostkarte',
 'Jap. Doppelpostkarte Gedreht', 'Jap. Postkarte', 'Jap. Postkarte Gedreht', 'Ledger',
 'Legal', 'Letter', 'Letter Gedreht', 'Letter Plus', 'Letter klein', 'Notiz',
 'PRC Umschlag 1', 'PRC Umschlag 1 Gedreht', 'PRC Umschlag 10', 'PRC Umschlag 10 Gedreht',
 'PRC Umschlag 2', 'PRC Umschlag 2 Gedreht', 'PRC Umschlag 3', 'PRC Umschlag 3 Gedreht',
 'PRC Umschlag 4', 'PRC Umschlag 4 Gedreht', 'PRC Umschlag 5', 'PRC Umschlag 5 Gedreht',
 'PRC Umschlag 6', 'PRC Umschlag 6 Gedreht', 'PRC Umschlag 7', 'PRC Umschlag 7 Gedreht',
 'PRC Umschlag 8', 'PRC Umschlag 8 Gedreht', 'PRC Umschlag 9', 'PRC Umschlag 9 Gedreht',
 'Quarto', 'Statement', 'Super A', 'Super B', 'Tabloid', 'US Standardendlospapier',
 'Umschlag', 'Umschlag 10', 'Umschlag 11', 'Umschlag 12', 'Umschlag 14', 'Umschlag 9',
 'Umschlag B4', 'Umschlag B5', 'Umschlag B6', 'Umschlag C3', 'Umschlag C4', 'Umschlag C5',
 'Umschlag C6', 'Umschlag C65', 'Umschlag DL', 'Umschlag Invite', 'Umschlag Monarch']

Is this a Qt bug or could we be missing something in our code?

According to our IT department, the local printers are available to the application instance on Citrix like any local printer.

0 Answers
Related