Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Xpra trunk does not support landscape printing on OSX #995

Closed
totaam opened this issue Oct 8, 2015 · 72 comments
Closed

Xpra trunk does not support landscape printing on OSX #995

totaam opened this issue Oct 8, 2015 · 72 comments

Comments

@totaam
Copy link
Collaborator

totaam commented Oct 8, 2015

Issue migrated from trac ticket # 995

component: printing | priority: critical | resolution: fixed

2015-10-08 22:42:04: pvenkateswaralu created the issue


With the following versions -
Client --- MacOSX 10.6.8 --- 0.16.0 r10655
Server --- Fedora 21 --- 0.16.0 r10673

I tried to print a gmail attachment in landscape orientation, with size=US Letter. But it still printed the file in portrait, and from almost the middle of the page (the top half portion of the page was left blank). And if the images are big in size (physically), part of it is ripped off/goes out of margins on the right side.

Here's an image of the printed file (.xlsx) captured from my phone.

[[Image(landscaped_image.png)]]

Here are client/server logs with -d printing

-Client Logs:*

2015-10-08 14:18:55,423 do_send_printers() found printers={u'_10_0_11_62': {'printer-is-shared': False, 'printer-info': u'10.0.11.62', 'printer-state-message': u'Data file sent successfully', 'printer-type': 10489924, 'printer-make-and-model': u'Generic PostScript Printer', 'printer-state-reasons': [u'none'], 'printer-uri-supported': u'ipp://localhost:631/printers/_10_0_11_62', 'printer-state': 3, 'printer-location': u'', 'device-uri': u'lpd://10.0.11.62/'}}
2015-10-08 14:18:55,424 do_send_printers() device-uri(_10_0_11_62)=lpd://10.0.11.62/
2015-10-08 14:18:55,425 do_send_printers() exported printers unchanged: {'_10_0_11_62': {'printer-info': u'10.0.11.62', 'mimetypes': ['application/pdf', 'application/postscript'], 'device-uri': u'lpd://10.0.11.62/'}}
2015-10-08 14:19:36,598 ignoring token for clipboard proxy name 'PRIMARY' (no proxy)
2015-10-08 14:19:49,804 ignoring token for clipboard proxy name 'PRIMARY' (no proxy)
2015-10-08 14:19:50,061 received file: ['4ac7540d63071eccf61f8239dced62cfd7c335b6', 'application/pdf', True, True, 82653, '82653 bytes', {'copies': '1', 'sha1': '8da2205002185d4fa423db329e788ba6c8e8adb2', 'options': {'PageSize': 'Letter', 'time-at-processing': '1444339189', 'manualfeed': 'off', 'edgetoedge': 'yes', 'number-up': '1', 'borderless': 'on', 'manualduplex': 'off', 'ret': 'notset', 'job-uuid': 'urn:uuid:ff6ddd85-73f4-3c46-5676-8ef88d7da4cf', 'Duplex': 'None', 'time-at-creation': '1444339189', 'joboffset': 'on', 'lowsupplies': 'continue', 'job-originating-host-name': 'localhost', 'overridea4withletter': 'yes', 'Resolution': '300dpi'}, 'printer': '_10_0_11_62', 'title': 'ACFrOgDGprsbfutYXfCPNznH...84ui3eb17pi43t1n5qkr41l'}]
2015-10-08 14:19:50,062 sha1 digest: 8da2205002185d4fa423db329e788ba6c8e8adb2 - expected: 8da2205002185d4fa423db329e788ba6c8e8adb2
2015-10-08 14:19:50.062 xpra[67689:6203] *** __NSAutoreleaseNoPool(): Object 0x14e9e2a0 of class NSCFArray autoreleased with no pool in place - just leaking
2015-10-08 14:19:50.065 xpra[67689:6203] *** __NSAutoreleaseNoPool(): Object 0x3064090 of class NSCFString autoreleased with no pool in place - just leaking
2015-10-08 14:19:50.066 xpra[67689:6203] *** __NSAutoreleaseNoPool(): Object 0x3064060 of class NSCFArray autoreleased with no pool in place - just leaking
2015-10-08 14:19:50,067 cannot save file as /Users/maint/Downloads/4ac7540d63071eccf61f8239dced62cfd7c335b6.pdf: file already exists
2015-10-08 14:19:50,067 downloaded 82653 bytes to application/pdf file for printing:
2015-10-08 14:19:50,067  /Users/maint/Downloads/4ac7540d63071eccf61f8239dced62cfd7c335b6-1.pdf
2015-10-08 14:19:50,068 safe print options({'copies': '1', 'sha1': '8da2205002185d4fa423db329e788ba6c8e8adb2', 'options': {'PageSize': 'Letter', 'time-at-processing': '1444339189', 'manualfeed': 'off', 'edgetoedge': 'yes', 'number-up': '1', 'borderless': 'on', 'manualduplex': 'off', 'ret': 'notset', 'job-uuid': 'urn:uuid:ff6ddd85-73f4-3c46-5676-8ef88d7da4cf', 'Duplex': 'None', 'time-at-creation': '1444339189', 'joboffset': 'on', 'lowsupplies': 'continue', 'job-originating-host-name': 'localhost', 'overridea4withletter': 'yes', 'Resolution': '300dpi'}, 'printer': '_10_0_11_62', 'title': 'ACFrOgDGprsbfutYXfCPNznH...84ui3eb17pi43t1n5qkr41l'}) = {'Resolution': '300dpi', 'PageSize': 'Letter'}
2015-10-08 14:19:50,069 pycups.get_printers()={u'_10_0_11_62': {'printer-is-shared': False, 'printer-info': u'10.0.11.62', 'printer-state-message': u'Data file sent successfully', 'printer-type': 10489924, 'printer-make-and-model': u'Generic PostScript Printer', 'printer-state-reasons': [u'none'], 'printer-uri-supported': u'ipp://localhost:631/printers/_10_0_11_62', 'printer-state': 3, 'printer-location': u'', 'device-uri': u'lpd://10.0.11.62/'}}
2015-10-08 14:19:50,070 pycups.get_printers()={u'_10_0_11_62': {'printer-is-shared': False, 'printer-info': u'10.0.11.62', 'printer-state-message': u'Data file sent successfully', 'printer-type': 10489924, 'printer-make-and-model': u'Generic PostScript Printer', 'printer-state-reasons': [u'none'], 'printer-uri-supported': u'ipp://localhost:631/printers/_10_0_11_62', 'printer-state': 3, 'printer-location': u'', 'device-uri': u'lpd://10.0.11.62/'}}
2015-10-08 14:19:50,070 pycups.print_files('_10_0_11_62', [u'/Users/maint/Downloads/4ac7540d63071eccf61f8239dced62cfd7c335b6-1.pdf'], 'ACFrOgDGprsbfutYXfCPNznH...84ui3eb17pi43t1n5qkr41l', {'Resolution': '300dpi', 'PageSize': 'Letter'})
2015-10-08 14:19:50,081 pycups.print_files('_10_0_11_62', [u'/Users/maint/Downloads/4ac7540d63071eccf61f8239dced62cfd7c335b6-1.pdf'], 'ACFrOgDGprsbfutYXfCPNznH...84ui3eb17pi43t1n5qkr41l', {'Resolution': '300dpi', 'PageSize': 'Letter'})=354
2015-10-08 14:19:50,082 printing /Users/maint/Downloads/4ac7540d63071eccf61f8239dced62cfd7c335b6-1.pdf, job=354
2015-10-08 14:19:50,085 pycups.printing_finished(354)=False
2015-10-08 14:19:50,085 printing_finished(354)=False
2015-10-08 14:19:54,923 check_printers() printers_modified_callback=<bound method XpraClient.send_printers of gtk2.client>
2015-10-08 14:19:55,425 pycups.get_printers()={u'_10_0_11_62': {'printer-is-shared': False, 'printer-info': u'10.0.11.62', 'printer-state-message': u'Data file sent successfully', 'printer-type': 10489924, 'printer-make-and-model': u'Generic PostScript Printer', 'printer-state-reasons': [u'none'], 'printer-uri-supported': u'ipp://localhost:631/printers/_10_0_11_62', 'printer-state': 3, 'printer-location': u'', 'device-uri': u'lpd://10.0.11.62/'}}
2015-10-08 14:19:55,426 do_send_printers() found printers={u'_10_0_11_62': {'printer-is-shared': False, 'printer-info': u'10.0.11.62', 'printer-state-message': u'Data file sent successfully', 'printer-type': 10489924, 'printer-make-and-model': u'Generic PostScript Printer', 'printer-state-reasons': [u'none'], 'printer-uri-supported': u'ipp://localhost:631/printers/_10_0_11_62', 'printer-state': 3, 'printer-location': u'', 'device-uri': u'lpd://10.0.11.62/'}}
2015-10-08 14:19:55,426 do_send_printers() device-uri(_10_0_11_62)=lpd://10.0.11.62/
2015-10-08 14:19:55,426 do_send_printers() exported printers unchanged: {'_10_0_11_62': {'printer-info': u'10.0.11.62', 'mimetypes': ['application/pdf', 'application/postscript'], 'device-uri': u'lpd://10.0.11.62/'}}
2015-10-08 14:20:00,086 pycups.printing_finished(354)=True
2015-10-08 14:20:00,086 printing_finished(354)=True

-Server Logs:*

[24433:24490:1008/141913:ERROR:channel.cc(300)] RawChannel read error (connection broken)
2015-10-08 14:19:49,961 New unix-domain connection received on /home/maint/.xpra/Fedora21-Server-289-13
2015-10-08 14:19:49,987 Python/GObject/Print client version 0.16.0-[r10673](../commit/65a3865650d8b61f5156583c65edd62f413086a6)
2015-10-08 14:19:49,988  connected from 'Fedora21-Server-289' as 'root'
2015-10-08 14:19:49,994 process_print: ('4ac7540d63071eccf61f8239dced62cfd7c335b6', 'application/pdf', '82653 bytes', '4ac7540d63071eccf61f8239dced62cfd7c335b6', 'ACFrOgDGprsbfutYXfCPNznH...84ui3eb17pi43t1n5qkr41l', '_10_0_11_62', '1', 'edgetoedge=yes manualduplex=off overridea4withletter=yes manualfeed=off number-up=1 joboffset=on PageSize=Letter Duplex=None Resolution=300dpi lowsupplies=continue borderless=on ret=notset job-uuid=urn:uuid:ff6ddd85-73f4-3c46-5676-8ef88d7da4cf job-originating-host-name=localhost time-at-creation=1444339189 time-at-processing=1444339189')
2015-10-08 14:19:49,995 process_print: got 82653 bytes for file 4ac7540d63071eccf61f8239dced62cfd7c335b6
2015-10-08 14:19:49,996 sha1 digest: 8da2205002185d4fa423db329e788ba6c8e8adb2
2015-10-08 14:19:49,997 parsed printer options: {'sha1': '8da2205002185d4fa423db329e788ba6c8e8adb2', 'printer': '_10_0_11_62', 'options': {'time-at-creation': '1444339189', 'PageSize': 'Letter', 'time-at-processing': '1444339189', 'manualfeed': 'off', 'edgetoedge': 'yes', 'number-up': '1', 'borderless': 'on', 'manualduplex': 'off', 'ret': 'notset', 'job-uuid': 'urn:uuid:ff6ddd85-73f4-3c46-5676-8ef88d7da4cf', 'Duplex': 'None', 'lowsupplies': 'continue', 'overridea4withletter': 'yes', 'joboffset': 'on', 'Resolution': '300dpi', 'job-originating-host-name': 'localhost'}, 'copies': '1', 'title': 'ACFrOgDGprsbfutYXfCPNznH...84ui3eb17pi43t1n5qkr41l'}
2015-10-08 14:19:49,997 not sending to ServerSource(Protocol(unix-domain socket:/home/maint/.xpra/Fedora21-Server-289-13)) (wanted uuid=4ac7540d63071eccf61f8239dced62cfd7c335b6)
2015-10-08 14:19:49,998 sending file to ServerSource(Protocol(tcp socket: 10.0.32.148:2200 <- 10.0.70.57:56909)) for printing on _10_0_11_62
2015-10-08 14:19:49,998 send_file('4ac7540d63071eccf61f8239dced62cfd7c335b6', 'application/pdf', '82653 bytes', True, True, {'sha1': '8da2205002185d4fa423db329e788ba6c8e8adb2', 'printer': '_10_0_11_62', 'options': {'time-at-creation': '1444339189', 'PageSize': 'Letter', 'time-at-processing': '1444339189', 'manualfeed': 'off', 'edgetoedge': 'yes', 'number-up': '1', 'borderless': 'on', 'manualduplex': 'off', 'ret': 'notset', 'job-uuid': 'urn:uuid:ff6ddd85-73f4-3c46-5676-8ef88d7da4cf', 'Duplex': 'None', 'lowsupplies': 'continue', 'overridea4withletter': 'yes', 'joboffset': 'on', 'Resolution': '300dpi', 'job-originating-host-name': 'localhost'}, 'copies': '1', 'title': 'ACFrOgDGprsbfutYXfCPNznH...84ui3eb17pi43t1n5qkr41l'})
2015-10-08 14:19:49,999 file 4ac7540d63071eccf61f8239dced62cfd7c335b6 (80KB) sent to 1 client
2015-10-08 14:19:50,000 client Protocol(unix-domain socket:/home/maint/.xpra/Fedora21-Server-289-13) has requested disconnection: done (detaching)
2015-10-08 14:19:50,001 Disconnecting client '/home/maint/.xpra/Fedora21-Server-289-13':
2015-10-08 14:19:50,002  client request

Let me know if any other debugging flags work better for you.

Here's xpra info gathered during the entire session ---> landscape_printing_issue.txt

I tried it with different types of files, and none of them print good with orientation set to landscape.

Files such as .doc, .pdf print properly irrespective of orientation = portrait/landscape, because they are automatically printed as portraits (checked with local fedora machine).

PS: I must mention to you again that printing worked absolutely fine in these versions
client --- 0.15.6 10632 --- MacOSX-10.6.8
Server --- 0.16.x OR 0.15.x --- Fedora 21

@totaam
Copy link
Collaborator Author

totaam commented Oct 8, 2015

2015-10-08 22:42:41: pvenkateswaralu uploaded file landscape_printing_issue.txt (116.1 KiB)

@totaam
Copy link
Collaborator Author

totaam commented Oct 8, 2015

2015-10-08 22:47:28: pvenkateswaralu commented


I am sorry for the insanely large image uploaded. Please download it instead of viewing it here to get a clear picture.

@totaam
Copy link
Collaborator Author

totaam commented Oct 9, 2015

2015-10-09 12:51:11: antoine uploaded file landscaped_image.png (277.6 KiB)

replacing image with the correct mimetype and a more manageable size
landscaped_image.png

@totaam
Copy link
Collaborator Author

totaam commented Oct 9, 2015

2015-10-09 13:14:47: antoine changed owner from antoine to pvenkateswaralu

@totaam
Copy link
Collaborator Author

totaam commented Oct 9, 2015

2015-10-09 13:14:47: antoine commented


Please replace the google drive document with something that is more permanent and versionned, and more simple to read.
You can do tables with WikiFormatting and avoid repeating the same text.
Why is the "Source of Documents" relevant here? Only "Yahoo Email" does something slightly different (print gibberish), which is a different problem altogether. The source of the documents should not be relevant to xpra, only the way we interact with the printing system (browser or plugin or whatever).

What does "Must print in landscape" mean? (that the "portrait" option is not shown maybe?)
Do you get similar behaviour using desktop applications like libreoffice or gedit? Or printing to PDF then printing that from a PDF viewer?

Please include the full server printing log, which will include the setup of the virtual printer using lpadmin.

It looks to me like the PDF step probably uses the correct landscape orientation but that we then lose this information when sending it to the client, then what you get is "landscape printed as portrait".

You can confirm this by running the client with:

XPRA_DELETE_PRINTER_FILE=0 xpra ...

And then attaching the PDF file shown in the logs to this ticket.
ie: from the logs above, this would be:

downloaded 82653 bytes to application/pdf file for printing:
 /Users/maint/Downloads/4ac7540d63071eccf61f8239dced62cfd7c335b6-1.pdf

If it is in landscape mode, then we have to hope that the information is mistakenly dropped somewhere.
Please include the server's cups server log and xpraforwarder log, on Fedora you should be able to grab these with journalctl -f | egrep -i "cups|xpra" whilst you print.

@totaam
Copy link
Collaborator Author

totaam commented Oct 12, 2015

2015-10-12 20:44:04: pvenkateswaralu commented


Replying to [comment:2 antoine]:

-Tested with:*
-Client --- MacOSX 10.6.8 --- 0.16.0 r10786*
-*Server --- Fedora 21 --- 0.16.0 r10786**[[BR]]
[[BR]]

Please replace the google drive document with something that is more permanent and versionned, and more simple to read.[[BR]]

You can do tables with WikiFormatting and avoid repeating the same text.
[[BR]]

Why is the "Source of Documents" relevant here? Only "Yahoo Email" does something slightly different (print gibberish), which is a different problem altogether. The source of the documents should not be relevant to xpra, only the way we interact with the printing system (browser or plugin or whatever).
The "Source of Documents" is irrelevant. It was just for our documentation purpose. Thought it would be useful to you in some form. Sorry for the confusion. "Yahoo Email" prints gibberish. But that's how it behaves with any local browser. Its the problem Yahoo itself I suppose.
[[BR]]

What does "Must print in landscape" mean? (that the "portrait" option is not shown maybe?) [[BR]]

-Yes, certain files like .ppt, .xlsx usually print only in landscape. The "portrait" option is shown, but by default, it prints in landscape (tested with local fedora machine).*
[[BR]]

Do you get similar behaviour using desktop applications like libreoffice or gedit? Or printing to PDF then printing that from a PDF viewer?[[BR]]

-I tried it with gedit, and it prints files in "landscape" as expected.*
[[BR]]

Please include the full server printing log, which will include the setup of the virtual printer using lpadmin.

It looks to me like the PDF step probably uses the correct landscape orientation but that we then lose this information when sending it to the client, then what you get is "landscape printed as portrait".

You can confirm this by running the client with:

XPRA_DELETE_PRINTER_FILE=0 xpra ...

And then attaching the PDF file shown in the logs to this ticket.
ie: from the logs above, this would be:

downloaded 82653 bytes to application/pdf file for printing:
 /Users/maint/Downloads/4ac7540d63071eccf61f8239dced62cfd7c335b6-1.pdf

If it is in landscape mode, then we have to hope that the information is mistakenly dropped somewhere.
Please include the server's cups server log and xpraforwarder log, on Fedora you should be able to grab these with journalctl -f | egrep -i "cups|xpra" whilst you print.
[[BR]]

-Here's the full server printing log:*

[maint@Fedora21-Server-289 ~]$ xpra start :13 --bind-tcp=10.0.32.148:2200 --daemon=no --start-child=xterm --start-new-commands=yes --start-child=chromium-browser --printing=yes -d printing
2015-10-12 12:20:58,877 Warning: failed to load the mdns avahi publisher: No module named avahi
2015-10-12 12:20:58,877  either fix your installation or use the 'mdns=no' option

X.Org X Server 1.16.3
Release Date: 2014-12-20
X Protocol Version 11, Revision 0
Build Operating System:  3.17.8-300.bz1178975.fc21.x86_64 
Current Operating System: Linux Fedora21-Server-289 4.1.6-100.fc21.x86_64 #1 SMP Mon Aug 17 22:20:37 UTC 2015 x86_64
Kernel command line: BOOT_IMAGE=/vmlinuz-4.1.6-100.fc21.x86_64 root=UUID=5e9dc737-8e34-4c44-91cd-0f008ce31842 ro nomodeset libahci.ignore_sss=1 raid=noautodetect ipv6.disable=1 LANG=en_US.UTF-8
Build Date: 31 January 2015  11:23:27PM
Build ID: xorg-x11-server 1.16.3-2.fc21 
Current version of pixman: 0.32.6
	Before reporting problems, check http://wiki.x.org
	to make sure that you have the latest version.
Markers: (--) probed, (**) from config file, (==) default setting,
	(++) from command line, (!!) notice, (II) informational,
	(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(++) Log file: "/home/maint/.xpra/Xorg.:13.log", Time: Mon Oct 12 12:20:58 2015
(++) Using config file: "/etc/xpra/xorg.conf"
(==) Using config directory: "/etc/X11/xorg.conf.d"
(==) Using system config directory "/usr/share/X11/xorg.conf.d"
2015-10-12 12:20:59,493 pycups settings: DEFAULT_CUPS_DBUS=1, CUPS_DBUS=True, POLLING_DELAY=60
2015-10-12 12:20:59,493 pycups settings: PRINTER_PREFIX=, ADD_LOCAL_PRINTERS=False
2015-10-12 12:20:59,493 pycups settings: ALLOW=maint
2015-10-12 12:20:59,493 pycups settings: FORWARDER_TMPDIR=/tmp
2015-10-12 12:20:59,493 get_printer_definitions() UNPROBED_PRINTER_DEFS={}, GENERIC=True
2015-10-12 12:20:59,494 get_lpinfo_drv(Generic PostScript Printer) command=['/usr/sbin/lpinfo', '--make-and-model', 'Generic PostScript Printer', '-m']
2015-10-12 12:20:59,521 lpinfo out=drv:///sample.drv/generic.ppd Generic PostScript Printer\n
2015-10-12 12:20:59,522 lpinfo err=
2015-10-12 12:20:59,522 get_lpinfo_drv(Generic PDF Printer) command=['/usr/sbin/lpinfo', '--make-and-model', 'Generic PDF Printer', '-m']
2015-10-12 12:20:59,543 lpinfo out=lsb/usr/cupsfilters/Generic-PDF_Printer-PDF.ppd Generic PDF Printer\n
2015-10-12 12:20:59,543 lpinfo err=
2015-10-12 12:20:59,544 pycups settings: PRINTER_DEF={'application/postscript': ['-m', 'drv:///sample.drv/generic.ppd'], 'application/pdf': ['-P', '/usr/share/ppd/cupsfilters/Generic-PDF_Printer-PDF.ppd']}
2015-10-12 12:20:59,545 SELinux is present
2015-10-12 12:20:59,545 SELinux enforce=0
2015-10-12 12:20:59,546 SELinux is present but not in enforcing mode
2015-10-12 12:20:59,844 pulseaudio server started with pid 4555
2015-10-12 12:20:59,846 using notification forwarder: DBUS-NotificationsForwarder(org.freedesktop.Notifications)
2015-10-12 12:20:59,865 started command 'xterm' with pid 4559
2015-10-12 12:20:59,873 started command 'chromium-browser' with pid 4562
2015-10-12 12:20:59,873 xpra server version 0.16.0-[r10786](../commit/0a91bd9b65266c567e71e600180662098c0752d1)
2015-10-12 12:20:59,873 running with pid 4514
xterm: cannot load font '-misc-fixed-medium-r-semicondensed--13-120-75-75-c-60-iso10646-1'
[1:1:1012/122059:ERROR:image_metadata_extractor.cc(111)] Couldn't load libexif.
E: [pulseaudio] pid.c: Daemon already running.
2015-10-12 12:21:00,123 xpra is ready.
[4628:4628:1012/122100:ERROR:sandbox_linux.cc(340)] InitializeSandbox() called with multiple threads in process gpu-process
[4562:4562:1012/122100:ERROR:url_pattern_set.cc(240)] Invalid url pattern: chrome://print/*
2015-10-12 12:21:01,124 Warning: pulseaudio has terminated shortly after startup.
2015-10-12 12:21:01,124  pulseaudio is limited to a single instance per user account,
2015-10-12 12:21:01,124  and one may be running already for user 'maint'
2015-10-12 12:21:01,124  to avoid this warning, either fix the pulseaudio command line
2015-10-12 12:21:01,124  or use the 'pulseaudio=no' option
2015-10-12 12:21:22,835 New tcp connection received from 10.0.70.57:58520
2015-10-12 12:21:24,305 Handshake complete; enabling connection
2015-10-12 12:21:24,323 Python/Gtk2 Mac OSX client version 0.16.0-[r10786](../commit/0a91bd9b65266c567e71e600180662098c0752d1)
2015-10-12 12:21:24,323  connected from 'TestBotBestBot.local' as 'maint'
2015-10-12 12:21:24,324  using h264 as primary encoding also available:
2015-10-12 12:21:24,324   vp9, vp8, png, png/P, png/L, webp, rgb24, jpeg, rgb32
2015-10-12 12:21:24,325  client root window size is 1920x1080 with 1 displays:
2015-10-12 12:21:24,325   testbotbestbot.local (677x381 mm - DPI: 72x72)
2015-10-12 12:21:24,325     monitor 1
2015-10-12 12:21:24,331 server virtual display now set to 1920x1080
2015-10-12 12:21:24,333 setting keyboard layout to 'us'
2015-10-12 12:21:24,410 DPI set to 72 x 72
2015-10-12 12:21:25,122 using pulseaudio device:
2015-10-12 12:21:25,122  'Monitor of Dummy Output'
2015-10-12 12:21:25,422 set_printers({'_10_0_11_62': {'printer-info': '10.0.11.62', 'mimetypes': ('application/pdf', 'application/postscript'), 'device-uri': 'lpd://10.0.11.62/'}}, , , ) for X11ServerSource(Protocol(tcp socket: 10.0.32.148:2200 <- 10.0.70.57:58520))
2015-10-12 12:21:25,424 add_printer('_10_0_11_62', {'printer-info': '10.0.11.62', 'mimetypes': ('application/pdf', 'application/postscript'), 'device-uri': 'lpd://10.0.11.62/'}, '10.0.11.62', 'on TestBotBestBot.local (via xpra)', {'socket-path': '/home/maint/.xpra/Fedora21-Server-289-13', 'remote-printer': '_10_0_11_62', 'remote-device-uri': 'lpd://10.0.11.62/', 'socket-dir': '/home/maint/.xpra', 'source': '4ac7540d63071eccf61f8239dced62cfd7c335b6', 'display': ':13'}, <function printer_added at 0x7f292f5d8de8>)
2015-10-12 12:21:25,424 using printer definition '['-P', '/usr/share/ppd/cupsfilters/Generic-PDF_Printer-PDF.ppd']' for application/pdf
2015-10-12 12:21:25,424 pycups_printing adding printer: ['-p', '_10_0_11_62', '-E', '-v', 'xpraforwarder:/tmp?mimetype=application%2Fpdf&socket-path=%2Fhome%2Fmaint%2F.xpra%2FFedora21-Server-289-13&remote-printer=_10_0_11_62&remote-device-uri=lpd%3A%2F%2F10.0.11.62%2F&socket-dir=%2Fhome%2Fmaint%2F.xpra&source=4ac7540d63071eccf61f8239dced62cfd7c335b6&display=%3A13', '-D', '10.0.11.62', '-L', 'on TestBotBestBot.local (via xpra)', '-o', 'printer-is-shared=false', '-u', 'allow:maint', '-P', '/usr/share/ppd/cupsfilters/Generic-PDF_Printer-PDF.ppd']
2015-10-12 12:21:25,425 exec_lpadmin(['-p', '_10_0_11_62', '-E', '-v', 'xpraforwarder:/tmp?mimetype=application%2Fpdf&socket-path=%2Fhome%2Fmaint%2F.xpra%2FFedora21-Server-289-13&remote-printer=_10_0_11_62&remote-device-uri=lpd%3A%2F%2F10.0.11.62%2F&socket-dir=%2Fhome%2Fmaint%2F.xpra&source=4ac7540d63071eccf61f8239dced62cfd7c335b6&display=%3A13', '-D', '10.0.11.62', '-L', 'on TestBotBestBot.local (via xpra)', '-o', 'printer-is-shared=false', '-u', 'allow:maint', '-P', '/usr/share/ppd/cupsfilters/Generic-PDF_Printer-PDF.ppd']) command=['/usr/sbin/lpadmin', '-p', '_10_0_11_62', '-E', '-v', 'xpraforwarder:/tmp?mimetype=application%2Fpdf&socket-path=%2Fhome%2Fmaint%2F.xpra%2FFedora21-Server-289-13&remote-printer=_10_0_11_62&remote-device-uri=lpd%3A%2F%2F10.0.11.62%2F&socket-dir=%2Fhome%2Fmaint%2F.xpra&source=4ac7540d63071eccf61f8239dced62cfd7c335b6&display=%3A13', '-D', '10.0.11.62', '-L', 'on TestBotBestBot.local (via xpra)', '-o', 'printer-is-shared=false', '-u', 'allow:maint', '-P', '/usr/share/ppd/cupsfilters/Generic-PDF_Printer-PDF.ppd']
2015-10-12 12:21:25,470 returncode(['/usr/sbin/lpadmin', '-p', '_10_0_11_62', '-E', '-v', 'xpraforwarder:/tmp?mimetype=application%2Fpdf&socket-path=%2Fhome%2Fmaint%2F.xpra%2FFedora21-Server-289-13&remote-printer=_10_0_11_62&remote-device-uri=lpd%3A%2F%2F10.0.11.62%2F&socket-dir=%2Fhome%2Fmaint%2F.xpra&source=4ac7540d63071eccf61f8239dced62cfd7c335b6&display=%3A13', '-D', '10.0.11.62', '-L', 'on TestBotBestBot.local (via xpra)', '-o', 'printer-is-shared=false', '-u', 'allow:maint', '-P', '/usr/share/ppd/cupsfilters/Generic-PDF_Printer-PDF.ppd'])=0
2015-10-12 12:21:25,470 the remote printer '_10_0_11_62' has been configured
2015-10-12 12:22:13,468 New unix-domain connection received on /home/maint/.xpra/Fedora21-Server-289-13
2015-10-12 12:22:13,469 New unix-domain connection received on /home/maint/.xpra/Fedora21-Server-289-13
2015-10-12 12:22:13,472 Connection lost
2015-10-12 12:22:13,483 processing info request from unix-domain socket:/home/maint/.xpra/Fedora21-Server-289-13
2015-10-12 12:22:13,807 Connection lost
2015-10-12 12:23:21,165 New unix-domain connection received on /home/maint/.xpra/Fedora21-Server-289-13
2015-10-12 12:23:21,190 Python/GObject/Print client version 0.16.0-[r10786](../commit/0a91bd9b65266c567e71e600180662098c0752d1)
2015-10-12 12:23:21,191  connected from 'Fedora21-Server-289' as 'root'
2015-10-12 12:23:21,196 process_print: ('4ac7540d63071eccf61f8239dced62cfd7c335b6', 'application/pdf', '82653 bytes', '4ac7540d63071eccf61f8239dced62cfd7c335b6', 'ACFrOgCRGYuEoHSGqFEbkYi7...c2llgppbjb37o2cu7suu57v', '_10_0_11_62', '1', 'edgetoedge=yes manualduplex=off overridea4withletter=yes manualfeed=off number-up=1 joboffset=on PageSize=Letter Duplex=None Resolution=300dpi lowsupplies=continue borderless=on ret=notset job-uuid=urn:uuid:6d231c54-f675-3f0c-6ffb-c38e24260624 job-originating-host-name=localhost time-at-creation=1444677800 time-at-processing=1444677800')
2015-10-12 12:23:21,197 process_print: got 82653 bytes for file 4ac7540d63071eccf61f8239dced62cfd7c335b6
2015-10-12 12:23:21,198 sha1 digest: 5134a7a343bfd90046337161a8b031b88706de04
2015-10-12 12:23:21,198 parsed printer options: {'sha1': '5134a7a343bfd90046337161a8b031b88706de04', 'printer': '_10_0_11_62', 'options': {'time-at-creation': '1444677800', 'PageSize': 'Letter', 'time-at-processing': '1444677800', 'manualfeed': 'off', 'edgetoedge': 'yes', 'number-up': '1', 'borderless': 'on', 'manualduplex': 'off', 'ret': 'notset', 'job-uuid': 'urn:uuid:6d231c54-f675-3f0c-6ffb-c38e24260624', 'Duplex': 'None', 'lowsupplies': 'continue', 'overridea4withletter': 'yes', 'joboffset': 'on', 'Resolution': '300dpi', 'job-originating-host-name': 'localhost'}, 'copies': '1', 'title': 'ACFrOgCRGYuEoHSGqFEbkYi7...c2llgppbjb37o2cu7suu57v'}
2015-10-12 12:23:21,199 not sending to X11ServerSource(Protocol(unix-domain socket:/home/maint/.xpra/Fedora21-Server-289-13)) (wanted uuid=4ac7540d63071eccf61f8239dced62cfd7c335b6)
2015-10-12 12:23:21,199 sending file to X11ServerSource(Protocol(tcp socket: 10.0.32.148:2200 <- 10.0.70.57:58520)) for printing on _10_0_11_62
2015-10-12 12:23:21,199 send_file('4ac7540d63071eccf61f8239dced62cfd7c335b6', 'application/pdf', '82653 bytes', True, True, {'sha1': '5134a7a343bfd90046337161a8b031b88706de04', 'printer': '_10_0_11_62', 'options': {'time-at-creation': '1444677800', 'PageSize': 'Letter', 'time-at-processing': '1444677800', 'manualfeed': 'off', 'edgetoedge': 'yes', 'number-up': '1', 'borderless': 'on', 'manualduplex': 'off', 'ret': 'notset', 'job-uuid': 'urn:uuid:6d231c54-f675-3f0c-6ffb-c38e24260624', 'Duplex': 'None', 'lowsupplies': 'continue', 'overridea4withletter': 'yes', 'joboffset': 'on', 'Resolution': '300dpi', 'job-originating-host-name': 'localhost'}, 'copies': '1', 'title': 'ACFrOgCRGYuEoHSGqFEbkYi7...c2llgppbjb37o2cu7suu57v'})
2015-10-12 12:23:21,200 file 4ac7540d63071eccf61f8239dced62cfd7c335b6 (80KB) sent to 1 client
2015-10-12 12:23:21,200 client Protocol(unix-domain socket:/home/maint/.xpra/Fedora21-Server-289-13) has requested disconnection: done (detaching)
2015-10-12 12:23:21,201 Disconnecting client '/home/maint/.xpra/Fedora21-Server-289-13':
2015-10-12 12:23:21,201  client request

-Here's the complete client log launched with* XPRA_DELETE_PRINTER_FILE=0 xpra ...

TestBotBestBot:MacOS maint$ XPRA_DELETE_PRINTER_FILE=0 ./xpra attach tcp:10.0.32.148:2200 -d printing
2015-10-12 12:21:21,473 pycups settings: DEFAULT_CUPS_DBUS=0, CUPS_DBUS=False, POLLING_DELAY=60
2015-10-12 12:21:21,474 pycups settings: PRINTER_PREFIX=, ADD_LOCAL_PRINTERS=False
2015-10-12 12:21:21,474 pycups settings: ALLOW=maint
2015-10-12 12:21:21,474 pycups settings: FORWARDER_TMPDIR=/var/folders/OP/OPD6QPNpFsOIp4ufsC0Vnk+++TI/-Tmp-/
2015-10-12 12:21:21,568 xpra gtk2 client version 0.16.0-[r10786](../commit/0a91bd9b65266c567e71e600180662098c0752d1)
2015-10-12 12:21:22,755 OpenGL glEnablei is not available, disabling transparency
2015-10-12 12:21:22,777 OpenGL_accelerate module loaded
2015-10-12 12:21:22,852 Warning: OpenGL windows will be clamped to the maximum texture size 8192x8192
2015-10-12 12:21:22,852  for OpenGL 2.1 renderer 'NVIDIA GeForce 320M OpenGL Engine'
2015-10-12 12:21:23,815  using default keyboard settings
2015-10-12 12:21:24,316  desktop size is 1920x1080 with 1 screen(s):
2015-10-12 12:21:24,317   testbotbestbot.local (677x381 mm - DPI: 72x72)
2015-10-12 12:21:24,317     monitor 1
2015-10-12 12:21:24,442 server: Linux Fedora 21 Twenty One, Xpra version 0.16.0-[r10786](../commit/0a91bd9b65266c567e71e600180662098c0752d1)
2015-10-12 12:21:24,469 Attached to tcp:10.0.32.148:2200 (press Control-C to detach)

2015-10-12 12:21:25,471 init_printing=<function init_printing at 0x14ee4570>
2015-10-12 12:21:25,472 init_printing(<bound method XpraClient.send_printers of gtk2.client>) printers_modified_callback=None
2015-10-12 12:21:25,472 init_printing(<bound method XpraClient.send_printers of gtk2.client>) will use polling
2015-10-12 12:21:25,474 pycups.get_printers()={u'_10_0_11_62': {'printer-is-shared': False, 'printer-info': u'10.0.11.62', 'printer-state-message': u'Data file sent successfully', 'printer-type': 10489924, 'printer-make-and-model': u'Generic PostScript Printer', 'printer-state-reasons': [u'none'], 'printer-uri-supported': u'ipp://localhost:631/printers/_10_0_11_62', 'printer-state': 3, 'printer-location': u'', 'device-uri': u'lpd://10.0.11.62/'}}
2015-10-12 12:21:25,474 do_send_printers() found printers={u'_10_0_11_62': {'printer-is-shared': False, 'printer-info': u'10.0.11.62', 'printer-state-message': u'Data file sent successfully', 'printer-type': 10489924, 'printer-make-and-model': u'Generic PostScript Printer', 'printer-state-reasons': [u'none'], 'printer-uri-supported': u'ipp://localhost:631/printers/_10_0_11_62', 'printer-state': 3, 'printer-location': u'', 'device-uri': u'lpd://10.0.11.62/'}}
2015-10-12 12:21:25,474 do_send_printers() device-uri(_10_0_11_62)=lpd://10.0.11.62/
2015-10-12 12:21:25,474 do_send_printers() new printers: ['_10_0_11_62']
2015-10-12 12:21:25,475 do_send_printers() printers=['_10_0_11_62']
2015-10-12 12:21:25,475 do_send_printers() exported printers=_10_0_11_62
2015-10-12 12:21:26,911 sound-sink using audio codec: MPEG 1 Audio, Layer 3 (MP3)
2015-10-12 12:22:25,473 check_printers() printers_modified_callback=<bound method XpraClient.send_printers of gtk2.client>
2015-10-12 12:22:25,975 pycups.get_printers()={u'_10_0_11_62': {'printer-is-shared': False, 'printer-info': u'10.0.11.62', 'printer-state-message': u'Data file sent successfully', 'printer-type': 10489924, 'printer-make-and-model': u'Generic PostScript Printer', 'printer-state-reasons': [u'none'], 'printer-uri-supported': u'ipp://localhost:631/printers/_10_0_11_62', 'printer-state': 3, 'printer-location': u'', 'device-uri': u'lpd://10.0.11.62/'}}
2015-10-12 12:22:25,975 do_send_printers() found printers={u'_10_0_11_62': {'printer-is-shared': False, 'printer-info': u'10.0.11.62', 'printer-state-message': u'Data file sent successfully', 'printer-type': 10489924, 'printer-make-and-model': u'Generic PostScript Printer', 'printer-state-reasons': [u'none'], 'printer-uri-supported': u'ipp://localhost:631/printers/_10_0_11_62', 'printer-state': 3, 'printer-location': u'', 'device-uri': u'lpd://10.0.11.62/'}}
2015-10-12 12:22:25,975 do_send_printers() device-uri(_10_0_11_62)=lpd://10.0.11.62/
2015-10-12 12:22:25,975 do_send_printers() exported printers unchanged: {'_10_0_11_62': {'printer-info': u'10.0.11.62', 'mimetypes': ['application/pdf', 'application/postscript'], 'device-uri': u'lpd://10.0.11.62/'}}
2015-10-12 12:23:21,257 received file: ['4ac7540d63071eccf61f8239dced62cfd7c335b6', 'application/pdf', True, True, 82653, '82653 bytes', {'copies': '1', 'sha1': '5134a7a343bfd90046337161a8b031b88706de04', 'options': {'PageSize': 'Letter', 'time-at-processing': '1444677800', 'manualfeed': 'off', 'edgetoedge': 'yes', 'number-up': '1', 'borderless': 'on', 'manualduplex': 'off', 'ret': 'notset', 'job-uuid': 'urn:uuid:6d231c54-f675-3f0c-6ffb-c38e24260624', 'Duplex': 'None', 'time-at-creation': '1444677800', 'joboffset': 'on', 'lowsupplies': 'continue', 'job-originating-host-name': 'localhost', 'overridea4withletter': 'yes', 'Resolution': '300dpi'}, 'printer': '_10_0_11_62', 'title': 'ACFrOgCRGYuEoHSGqFEbkYi7...c2llgppbjb37o2cu7suu57v'}]
2015-10-12 12:23:21,258 sha1 digest: 5134a7a343bfd90046337161a8b031b88706de04 - expected: 5134a7a343bfd90046337161a8b031b88706de04
2015-10-12 12:23:21.258 xpra[70172:6203] *** __NSAutoreleaseNoPool(): Object 0x23e167a0 of class NSCFArray autoreleased with no pool in place - just leaking
2015-10-12 12:23:21.261 xpra[70172:6203] *** __NSAutoreleaseNoPool(): Object 0x14f4a620 of class NSCFString autoreleased with no pool in place - just leaking
2015-10-12 12:23:21.262 xpra[70172:6203] *** __NSAutoreleaseNoPool(): Object 0x14ff15e0 of class NSCFArray autoreleased with no pool in place - just leaking
2015-10-12 12:23:21,263 cannot save file as /Users/maint/Downloads/4ac7540d63071eccf61f8239dced62cfd7c335b6.pdf: file already exists
2015-10-12 12:23:21,264 cannot save file as /Users/maint/Downloads/4ac7540d63071eccf61f8239dced62cfd7c335b6-1.pdf: file already exists
2015-10-12 12:23:21,264 cannot save file as /Users/maint/Downloads/4ac7540d63071eccf61f8239dced62cfd7c335b6-2.pdf: file already exists
2015-10-12 12:23:21,264 cannot save file as /Users/maint/Downloads/4ac7540d63071eccf61f8239dced62cfd7c335b6-3.pdf: file already exists
2015-10-12 12:23:21,264 cannot save file as /Users/maint/Downloads/4ac7540d63071eccf61f8239dced62cfd7c335b6-4.pdf: file already exists
2015-10-12 12:23:21,264 cannot save file as /Users/maint/Downloads/4ac7540d63071eccf61f8239dced62cfd7c335b6-5.pdf: file already exists
2015-10-12 12:23:21,265 cannot save file as /Users/maint/Downloads/4ac7540d63071eccf61f8239dced62cfd7c335b6-6.pdf: file already exists
2015-10-12 12:23:21,265 cannot save file as /Users/maint/Downloads/4ac7540d63071eccf61f8239dced62cfd7c335b6-7.pdf: file already exists
2015-10-12 12:23:21,265 downloaded 82653 bytes to application/pdf file for printing:
2015-10-12 12:23:21,265  /Users/maint/Downloads/4ac7540d63071eccf61f8239dced62cfd7c335b6-8.pdf
2015-10-12 12:23:21,266 safe print options({'copies': '1', 'sha1': '5134a7a343bfd90046337161a8b031b88706de04', 'options': {'PageSize': 'Letter', 'time-at-processing': '1444677800', 'manualfeed': 'off', 'edgetoedge': 'yes', 'number-up': '1', 'borderless': 'on', 'manualduplex': 'off', 'ret': 'notset', 'job-uuid': 'urn:uuid:6d231c54-f675-3f0c-6ffb-c38e24260624', 'Duplex': 'None', 'time-at-creation': '1444677800', 'joboffset': 'on', 'lowsupplies': 'continue', 'job-originating-host-name': 'localhost', 'overridea4withletter': 'yes', 'Resolution': '300dpi'}, 'printer': '_10_0_11_62', 'title': 'ACFrOgCRGYuEoHSGqFEbkYi7...c2llgppbjb37o2cu7suu57v'}) = {'Resolution': '300dpi', 'PageSize': 'Letter'}
2015-10-12 12:23:21,266 pycups.get_printers()={u'_10_0_11_62': {'printer-is-shared': False, 'printer-info': u'10.0.11.62', 'printer-state-message': u'Data file sent successfully', 'printer-type': 10489924, 'printer-make-and-model': u'Generic PostScript Printer', 'printer-state-reasons': [u'none'], 'printer-uri-supported': u'ipp://localhost:631/printers/_10_0_11_62', 'printer-state': 3, 'printer-location': u'', 'device-uri': u'lpd://10.0.11.62/'}}
2015-10-12 12:23:21,267 pycups.get_printers()={u'_10_0_11_62': {'printer-is-shared': False, 'printer-info': u'10.0.11.62', 'printer-state-message': u'Data file sent successfully', 'printer-type': 10489924, 'printer-make-and-model': u'Generic PostScript Printer', 'printer-state-reasons': [u'none'], 'printer-uri-supported': u'ipp://localhost:631/printers/_10_0_11_62', 'printer-state': 3, 'printer-location': u'', 'device-uri': u'lpd://10.0.11.62/'}}
2015-10-12 12:23:21,268 pycups.print_files('_10_0_11_62', [u'/Users/maint/Downloads/4ac7540d63071eccf61f8239dced62cfd7c335b6-8.pdf'], 'ACFrOgCRGYuEoHSGqFEbkYi7...c2llgppbjb37o2cu7suu57v', {'Resolution': '300dpi', 'PageSize': 'Letter'})
2015-10-12 12:23:21,282 pycups.print_files('_10_0_11_62', [u'/Users/maint/Downloads/4ac7540d63071eccf61f8239dced62cfd7c335b6-8.pdf'], 'ACFrOgCRGYuEoHSGqFEbkYi7...c2llgppbjb37o2cu7suu57v', {'Resolution': '300dpi', 'PageSize': 'Letter'})=371
2015-10-12 12:23:21,283 printing /Users/maint/Downloads/4ac7540d63071eccf61f8239dced62cfd7c335b6-8.pdf, job=371
2015-10-12 12:23:21,293 pycups.printing_finished(371)=False
2015-10-12 12:23:21,293 printing_finished(371)=False
2015-10-12 12:23:25,474 check_printers() printers_modified_callback=<bound method XpraClient.send_printers of gtk2.client>
2015-10-12 12:23:25,976 pycups.get_printers()={u'_10_0_11_62': {'printer-is-shared': False, 'printer-info': u'10.0.11.62', 'printer-state-message': u'Data file sent successfully', 'printer-type': 10489924, 'printer-make-and-model': u'Generic PostScript Printer', 'printer-state-reasons': [u'none'], 'printer-uri-supported': u'ipp://localhost:631/printers/_10_0_11_62', 'printer-state': 3, 'printer-location': u'', 'device-uri': u'lpd://10.0.11.62/'}}
2015-10-12 12:23:25,976 do_send_printers() found printers={u'_10_0_11_62': {'printer-is-shared': False, 'printer-info': u'10.0.11.62', 'printer-state-message': u'Data file sent successfully', 'printer-type': 10489924, 'printer-make-and-model': u'Generic PostScript Printer', 'printer-state-reasons': [u'none'], 'printer-uri-supported': u'ipp://localhost:631/printers/_10_0_11_62', 'printer-state': 3, 'printer-location': u'', 'device-uri': u'lpd://10.0.11.62/'}}
2015-10-12 12:23:25,976 do_send_printers() device-uri(_10_0_11_62)=lpd://10.0.11.62/
2015-10-12 12:23:25,976 do_send_printers() exported printers unchanged: {'_10_0_11_62': {'printer-info': u'10.0.11.62', 'mimetypes': ['application/pdf', 'application/postscript'], 'device-uri': u'lpd://10.0.11.62/'}}
2015-10-12 12:23:31,297 pycups.printing_finished(371)=True
2015-10-12 12:23:31,297 printing_finished(371)=True
2015-10-12 12:24:25,475 check_printers() printers_modified_callback=<bound method XpraClient.send_printers of gtk2.client>
2015-10-12 12:24:25,977 pycups.get_printers()={u'_10_0_11_62': {'printer-is-shared': False, 'printer-info': u'10.0.11.62', 'printer-state-message': u'Data file sent successfully', 'printer-type': 10489924, 'printer-make-and-model': u'Generic PostScript Printer', 'printer-state-reasons': [u'none'], 'printer-uri-supported': u'ipp://localhost:631/printers/_10_0_11_62', 'printer-state': 3, 'printer-location': u'', 'device-uri': u'lpd://10.0.11.62/'}}
2015-10-12 12:24:25,978 do_send_printers() found printers={u'_10_0_11_62': {'printer-is-shared': False, 'printer-info': u'10.0.11.62', 'printer-state-message': u'Data file sent successfully', 'printer-type': 10489924, 'printer-make-and-model': u'Generic PostScript Printer', 'printer-state-reasons': [u'none'], 'printer-uri-supported': u'ipp://localhost:631/printers/_10_0_11_62', 'printer-state': 3, 'printer-location': u'', 'device-uri': u'lpd://10.0.11.62/'}}
2015-10-12 12:24:25,978 do_send_printers() device-uri(_10_0_11_62)=lpd://10.0.11.62/
2015-10-12 12:24:25,978 do_send_printers() exported printers unchanged: {'_10_0_11_62': {'printer-info': u'10.0.11.62', 'mimetypes': ['application/pdf', 'application/postscript'], 'device-uri': u'lpd://10.0.11.62/'}}
2015-10-12 12:25:25,477 check_printers() printers_modified_callback=<bound method XpraClient.send_printers of gtk2.client>
2015-10-12 12:25:25,979 pycups.get_printers()={u'_10_0_11_62': {'printer-is-shared': False, 'printer-info': u'10.0.11.62', 'printer-state-message': u'Data file sent successfully', 'printer-type': 10489924, 'printer-make-and-model': u'Generic PostScript Printer', 'printer-state-reasons': [u'none'], 'printer-uri-supported': u'ipp://localhost:631/printers/_10_0_11_62', 'printer-state': 3, 'printer-location': u'', 'device-uri': u'lpd://10.0.11.62/'}}
2015-10-12 12:25:25,979 do_send_printers() found printers={u'_10_0_11_62': {'printer-is-shared': False, 'printer-info': u'10.0.11.62', 'printer-state-message': u'Data file sent successfully', 'printer-type': 10489924, 'printer-make-and-model': u'Generic PostScript Printer', 'printer-state-reasons': [u'none'], 'printer-uri-supported': u'ipp://localhost:631/printers/_10_0_11_62', 'printer-state': 3, 'printer-location': u'', 'device-uri': u'lpd://10.0.11.62/'}}
2015-10-12 12:25:25,979 do_send_printers() device-uri(_10_0_11_62)=lpd://10.0.11.62/
2015-10-12 12:25:25,980 do_send_printers() exported printers unchanged: {'_10_0_11_62': {'printer-info': u'10.0.11.62', 'mimetypes': ['application/pdf', 'application/postscript'], 'device-uri': u'lpd://10.0.11.62/'}}

-And, here's the server's cups server log and xpraforwarder log, grabbed with* journalctl -f | egrep -i "cups|xpra"

[maint@Fedora21-Server-289 ~]$ journalctl -f | egrep -i "cups|xpra"
Oct 12 12:23:20 Fedora21-Server-289 xpraforwarder[5048]: '/usr/lib/cups/backend/xpraforwarder' '259' 'maint' 'ACFrOgCRGYuEoHSGqFEbkYi7...c2llgppbjb37o2cu7suu57v' '1' 'edgetoedge=yes manualduplex=off overridea4withletter=yes manualfeed=off number-up=1 joboffset=on PageSize=Letter Duplex=None Resolution=300dpi lowsupplies=continue borderless=on ret=notset job-uuid=urn:uuid:6d231c54-f675-3f0c-6ffb-c38e24260624 job-originating-host-name=localhost time-at-creation=1444677800 time-at-processing=1444677800'
Oct 12 12:23:20 Fedora21-Server-289 xpraforwarder[5048]: version 0.16.0, username: maint, title: ACFrOgCRGYuEoHSGqFEbkYi7...c2llgppbjb37o2cu7suu57v, filename: -, job_id: 259
Oct 12 12:23:20 Fedora21-Server-289 xpraforwarder[5048]: urlparse(xpraforwarder:/tmp?mimetype=application%2Fpdf&socket-path=%2Fhome%2Fmaint%2F.xpra%2FFedora21-Server-289-13&remote-printer=_10_0_11_62&remote-device-uri=lpd%3A%2F%2F10.0.11.62%2F&socket-dir=%2Fhome%2Fmaint%2F.xpra&source=4ac7540d63071eccf61f8239dced62cfd7c335b6&display=%3A13)=ParseResult(scheme='xpraforwarder', netloc=*, path='/tmp', params=*, query='mimetype=application%2Fpdf&socket-path=%2Fhome%2Fmaint%2F.xpra%2FFedora21-Server-289-13&remote-printer=_10_0_11_62&remote-device-uri=lpd%3A%2F%2F10.0.11.62%2F&socket-dir=%2Fhome%2Fmaint%2F.xpra&source=4ac7540d63071eccf61f8239dced62cfd7c335b6&display=%3A13', fragment='')
Oct 12 12:23:20 Fedora21-Server-289 xpraforwarder[5048]: attributes(mimetype=application%2Fpdf&socket-path=%2Fhome%2Fmaint%2F.xpra%2FFedora21-Server-289-13&remote-printer=_10_0_11_62&remote-device-uri=lpd%3A%2F%2F10.0.11.62%2F&socket-dir=%2Fhome%2Fmaint%2F.xpra&source=4ac7540d63071eccf61f8239dced62cfd7c335b6&display=%3A13)={'mimetype': ['application/pdf'], 'socket-path': ['/home/maint/.xpra/Fedora21-Server-289-13'], 'remote-printer': ['_10_0_11_62'], 'remote-device-uri': ['lpd://10.0.11.62/'], 'socket-dir': ['/home/maint/.xpra'], 'source': ['4ac7540d63071eccf61f8239dced62cfd7c335b6'], 'display': [':13']}
Oct 12 12:23:20 Fedora21-Server-289 xpraforwarder[5048]: xpra display: :13, socket-path: /home/maint/.xpra/Fedora21-Server-289-13
Oct 12 12:23:20 Fedora21-Server-289 xpraforwarder[5048]: running: ['xpra', 'print', 'socket:/home/maint/.xpra/Fedora21-Server-289-13', '-', 'application/pdf', '4ac7540d63071eccf61f8239dced62cfd7c335b6', 'ACFrOgCRGYuEoHSGqFEbkYi7...c2llgppbjb37o2cu7suu57v', '_10_0_11_62', '1', 'edgetoedge=yes manualduplex=off overridea4withletter=yes manualfeed=off number-up=1 joboffset=on PageSize=Letter Duplex=None Resolution=300dpi lowsupplies=continue borderless=on ret=notset job-uuid=urn:uuid:6d231c54-f675-3f0c-6ffb-c38e24260624 job-originating-host-name=localhost time-at-creation=1444677800 time-at-processing=1444677800']
Oct 12 12:23:21 Fedora21-Server-289 xpraforwarder[5048]: returncode(['xpra', 'print', 'socket:/home/maint/.xpra/Fedora21-Server-289-13', '-', 'application/pdf', '4ac7540d63071eccf61f8239dced62cfd7c335b6', 'ACFrOgCRGYuEoHSGqFEbkYi7...c2llgppbjb37o2cu7suu57v', '_10_0_11_62', '1', 'edgetoedge=yes manualduplex=off overridea4withletter=yes manualfeed=off number-up=1 joboffset=on PageSize=Letter Duplex=None Resolution=300dpi lowsupplies=continue borderless=on ret=notset job-uuid=urn:uuid:6d231c54-f675-3f0c-6ffb-c38e24260624 job-originating-host-name=localhost time-at-creation=1444677800 time-at-processing=1444677800'])=0
Oct 12 12:23:21 Fedora21-Server-289 xpraforwarder[5048]: stdout=
Oct 12 12:23:21 Fedora21-Server-289 xpraforwarder[5048]: stderr=2015-10-12 12:23:21,202 server requested disconnect: client request
Oct 12 12:23:22 Fedora21-Server-289 systemd[1]: Started CUPS Printing Service.
Oct 12 12:23:22 Fedora21-Server-289 systemd[1]: Started CUPS Printing Service.

@totaam
Copy link
Collaborator Author

totaam commented Oct 12, 2015

2015-10-12 23:47:27: pvenkateswaralu changed owner from pvenkateswaralu to antoine

@totaam
Copy link
Collaborator Author

totaam commented Oct 13, 2015

2015-10-13 01:44:19: antoine changed owner from antoine to pvenkateswaralu

@totaam
Copy link
Collaborator Author

totaam commented Oct 13, 2015

2015-10-13 01:44:19: antoine commented


As I asked before:
[[BR]]

Please replace the google drive document with something that is more permanent and versionned, and more simple to read.
[[BR]]

The point of running with XPRA_DELETE_PRINTER_FILE=0 is to capture the file and attach it to this ticket. See comment:2.

@totaam
Copy link
Collaborator Author

totaam commented Oct 13, 2015

2015-10-13 18:08:08: pvenkateswaralu uploaded file 4ac7540d63071eccf61f8239dced62cfd7c335b6-1.pdf (80.7 KiB)

@totaam
Copy link
Collaborator Author

totaam commented Oct 13, 2015

2015-10-13 19:15:11: pvenkateswaralu changed owner from pvenkateswaralu to antoine

@totaam
Copy link
Collaborator Author

totaam commented Oct 13, 2015

2015-10-13 19:15:11: pvenkateswaralu commented


Please replace the google drive document with something that is more permanent and versionned, and more simple to read.
[[BR]]
Please ignore the above google drive document and consider the file attached: [/raw-attachment/ticket/995/ticket995-Xpra-PrintTest.pdf]

[[BR]]

The point of running with XPRA_DELETE_PRINTER_FILE=0 is to capture the file and attach it to this ticket. See comment:2.
[[BR]]
Please see [/attachment/ticket/995/4ac7540d63071eccf61f8239dced62cfd7c335b6-1.pdf]

@totaam
Copy link
Collaborator Author

totaam commented Oct 13, 2015

2015-10-13 19:15:42: pvenkateswaralu uploaded file ticket995-Xpra-PrintTest.pdf (47.3 KiB)

@totaam
Copy link
Collaborator Author

totaam commented Oct 14, 2015

2015-10-14 11:39:44: antoine changed owner from antoine to pvenkateswaralu

@totaam
Copy link
Collaborator Author

totaam commented Oct 14, 2015

2015-10-14 11:39:44: antoine edited the issue description

@totaam
Copy link
Collaborator Author

totaam commented Oct 14, 2015

2015-10-14 11:39:44: antoine commented


I have removed the google drive link and added direct links to the documents in the comments above. (see wikiformatting on how to do that, use the preview button to test).

There's still some duplication in that PDF document:

  • all tests were done with "US Letter" page size (and I'm not sure that makes any difference anyway),
  • portrait printing (the default) always worked,
    So both are redundant for each row and should only be state once somewhere, if at all.

And there seems to be only two types of failures to print in landscape:

  • the first two row which state the same thing: Does not support landscape printing. The printed file is left aligned, i.e., it prints the file in landscape, but portion of the fil on the left side is cut off if the files are physically large in size. - do we have a picture of this output? Was the fix on the client or server? (finding a combination that works is good, but you then need to narrow it down further)
  • the last three rows which all state the same thing Does not support landscape printing. When tried to print in landscape, the file gets printed from almost the middle of the page, and in portrait. Also, the file does not automatically fit to page, so, sometimes part of the right portion is cut off. Works as expected on local fedora machine. - I assume that this is [/attachment/ticket/995/landscaped_image.png this picture], right? Have you tried older clients with the same server versions? (in particular, a client that is known to print landscape OK from the previous test)

If properly narrowed down, this data could probably fit in a tiny wiki table (assuming a table is even needed), removing the need to download a PDF to understand the point of this ticket.

In comment:3 I see * 'I tried it with gedit, and it prints files in "landscape" as expected.' *, was this through xpra? Which versions?


Now, on to the bug proper: the temporary PDF file ([/attachment/ticket/995/4ac7540d63071eccf61f8239dced62cfd7c335b6-1.pdf]) looks fine to me, it is already in landscape mode when it comes out of the print filters which is what we want.
If I send it to my printer from the PDF viewer plugin, it looks OK too. I get the same result if I just print it using lpr.

So for some reason, the client is trying to print it in landscape mode.

Looking at the server log:

parsed printer options: {'sha1': '5134a7a343bfd90046337161a8b031b88706de04', 'printer': '_10_0_11_62', \
    'options': {'time-at-creation': '1444677800', 'PageSize': 'Letter', 'time-at-processing': '1444677800', 'manualfeed': 'off', \
      'edgetoedge': 'yes', 'number-up': '1', 'borderless': 'on', 'manualduplex': 'off', 'ret': 'notset', \
      'job-uuid': 'urn:uuid:6d231c54-f675-3f0c-6ffb-c38e24260624', 'Duplex': 'None', 'lowsupplies': 'continue', \
      'overridea4withletter': 'yes', 'joboffset': 'on', 'Resolution': '300dpi', 'job-originating-host-name': 'localhost'}, \
    'copies': '1', 'title': 'ACFrOgCRGYuEoHSGqFEbkYi7...c2llgppbjb37o2cu7suu57v'}

Which can also be seen later in the client log:

safe print options({'copies': '1', ... }) = {'Resolution': '300dpi', 'PageSize': 'Letter'}

Is your printer configured to print in landscape orientation by default?
Have you tried printing that PDF file directly?
You can also try printing it using the same code xpra uses:

xpra/platform/printing.py PRINTERNAME PATHTOYOURPDFFILE

Where the PRINTERNAME to use can be identified by just running:

xpra/platform/printing.py

(this also works fine for me with the example PDF)
This tool also works on MS Windows where it is just called Print.exe in Xpra's application folder.
On OSX, look for the Xpra.app/Contents/Helpers/Print tool, which should work the same as the Linux one (pycups based).
There is no validation of any kind, if the arguments are not correct then you will just get errors.

As of r10838, you can just use:

xpra/platform/printing.py PATHTOYOURPDFFILE

And it will choose the first printer if there is more than one available.

Note: we may want to include some of the options? things like edgetoedge, borderless can probably be forwarded safely.

@totaam
Copy link
Collaborator Author

totaam commented Oct 15, 2015

2015-10-15 00:36:06: pvenkateswaralu uploaded file landscaped_image(.xlsx).png (239.7 KiB)

landscaped_image(.xlsx).png

@totaam
Copy link
Collaborator Author

totaam commented Oct 15, 2015

2015-10-15 01:45:02: pvenkateswaralu commented


Eliminating the need to create a table, I am giving the details the of printed files right here.

I tested the landscape printing on various client/server combinations considering both xpra-trunk and earlier versions (0.15.5, 0.15.6, 0.15.7)

Note: "Portrait" printing works fine in all the cases.

The landscaped prints looked like given below for the versions---

  • Xpra-Trunk ---> [/attachment/ticket/995/landscaped_image.png]

  • For older versions, i.e., with the below combinations, the landscaped prints looked absolutely fine, except for one file which is a .xlsx file (other .xlsx files printed fine, so I'm not really sure if this is an issue or not). Here's the link to it ---> [/attachment/ticket/995/landscaped_image(.xlsx).png]

    client 0.15.5 10506
    server 0.15.5 r10436, r10445, r10456, r10513

    client 0.15.6 10632
    server 0.15.6 r10656, r10666, r10673

    client 0.15.7 10824
    server 0.15.6 r10656, r10666, r10673

In comment:3 I see * 'I tried it with gedit, and it prints files in "landscape" as expected.' *, was this through xpra? Which versions?
Yes, it was through xpra. I tried it both on xpra-trunk (Client -- MacOSX 10.6.8 -- 0.16.0 r10786
Server -- Fedora 21 -- 0.16.0 r10786) and older versions (Client --- MacOSX 10.6.8 --- 0.15.7 10824 Server -- Fedora 21 -- 0.15.6 r10673). It printed fine in both the cases.

...

Is your printer configured to print in landscape orientation by default?
No, I must specify whether I want to print in landscape/portrait in the settings window. By default, the orientation is set to portrait. File types such as .xlsx, and .ppt are configured to print in landscape by default (the same is the case in local browser as well).

...

I tried printing it using the code xpra/platform/printing.py PATHTOYOURPDFFILE along with Alex, and this is what I got:

* Cups-PDF                         : {'printer-is-shared': False, 'printer-info': u'Cups-PDF', 'printer-state-message': u'', 'printer-type': 2101276, 'printer-make-and-model': u'Generic PDF Printer', 'printer-state-reasons': [u'none'], 'printer-uri-supported': u'ipp://localhost:631/printers/Cups-PDF', 'printer-state': 3, 'printer-location': u'on localhost.localdomain (via xpra)', 'device-uri': u'xpraforwarder:/tmp?mimetype=application%2Fpdf&socket-path=%2Fhome%2Fmaint%2F.xpra%2FFedora21-Server-289-13&remote-printer=Cups-PDF&remote-device-uri=cups-pdf%3A%2F&socket-dir=%2Fhome%2Fmaint%2F.xpra&source=2f70af283e746eb7962b9b7b323802d12be2ea14&display=%3A13'}
* Foxit-PhantomPDF-Printer         : {'printer-is-shared': False, 'printer-info': u'Foxit PhantomPDF Printer,Foxit PhantomPDF Printer Driver', 'printer-state-message': u'', 'printer-type': 2101276, 'printer-make-and-model': u'Generic PDF Printer', 'printer-state-reasons': [u'none'], 'printer-uri-supported': u'ipp://localhost:631/printers/Foxit-PhantomPDF-Printer', 'printer-state': 3, 'printer-location': u'on solidus (via xpra)', 'device-uri': u'xpraforwarder:/tmp?mimetype=application%2Fpdf&socket-path=%2Fhome%2Fmaint%2F.xpra%2FFedora21-Server-289-13&remote-printer=Foxit+PhantomPDF+Printer&remote-device-uri=None&socket-dir=%2Fhome%2Fmaint%2F.xpra&source=da39a3ee5e6b4b0d3255bfef95601890afd80709&display=%3A13'}
* HP-LaserJet-CM1415fnw            : {'printer-is-shared': False, 'printer-info': u'HP LaserJet CM1415fnw', 'printer-state-message': u'', 'printer-type': 2101276, 'printer-make-and-model': u'Generic PDF Printer', 'printer-state-reasons': [u'none'], 'printer-uri-supported': u'ipp://localhost:631/printers/HP-LaserJet-CM1415fnw', 'printer-state': 3, 'printer-location': u'on localhost.localdomain (via xpra)', 'device-uri': u'xpraforwarder:/tmp?mimetype=application%2Fpdf&socket-path=%2Fhome%2Fmaint%2F.xpra%2FFedora21-Server-289-13&remote-printer=HP-LaserJet-CM1415fnw&remote-device-uri=socket%3A%2F%2F10.0.11.62&socket-dir=%2Fhome%2Fmaint%2F.xpra&source=2f70af283e746eb7962b9b7b323802d12be2ea14&display=%3A13'}
* OfficePrinter-HP-LaserJet-CM1415fnw : {'printer-is-shared': False, 'printer-info': u'OfficePrinter (HP LaserJet CM1415fnw),HP LaserJet Professional CM1410 Series PCL 6', 'printer-state-message': u'', 'printer-type': 2101276, 'printer-make-and-model': u'Generic PDF Printer', 'printer-state-reasons': [u'none'], 'printer-uri-supported': u'ipp://localhost:631/printers/OfficePrinter-HP-LaserJet-CM1415fnw', 'printer-state': 3, 'printer-location': u'on solidus (via xpra)', 'device-uri': u'xpraforwarder:/tmp?mimetype=application%2Fpdf&socket-path=%2Fhome%2Fmaint%2F.xpra%2FFedora21-Server-289-13&remote-printer=OfficePrinter+%28HP+LaserJet+CM1415fnw%29&remote-device-uri=None&socket-dir=%2Fhome%2Fmaint%2F.xpra&source=da39a3ee5e6b4b0d3255bfef95601890afd80709&display=%3A13'}
* Printer-Behind-Jose-10.0.11.62   : {'printer-is-shared': False, 'printer-info': u'Printer-Behind-Jose-10.0.11.62,HP LaserJet Pro CM1415 MFP PCL6 Class Driver', 'printer-state-message': u'', 'printer-type': 2101276, 'printer-make-and-model': u'Generic PDF Printer', 'printer-state-reasons': [u'none'], 'printer-uri-supported': u'ipp://localhost:631/printers/Printer-Behind-Jose-10.0.11.62', 'printer-state': 3, 'printer-location': u'on solidus (via xpra)', 'device-uri': u'xpraforwarder:/tmp?mimetype=application%2Fpdf&socket-path=%2Fhome%2Fmaint%2F.xpra%2FFedora21-Server-289-13&remote-printer=Printer-Behind-Jose-10.0.11.62&remote-device-uri=None&socket-dir=%2Fhome%2Fmaint%2F.xpra&source=da39a3ee5e6b4b0d3255bfef95601890afd80709&display=%3A13'}
* _10_0_11_62                      : {'printer-is-shared': False, 'printer-info': u'10.0.11.62', 'printer-state-message': u'', 'printer-type': 2101276, 'printer-make-and-model': u'Generic PDF Printer', 'printer-state-reasons': [u'none'], 'printer-uri-supported': u'ipp://localhost:631/printers/_10_0_11_62', 'printer-state': 3, 'printer-location': u'on TestBotBestBot.local (via xpra)', 'device-uri': u'xpraforwarder:/tmp?mimetype=application%2Fpdf&socket-path=%2Fhome%2Fmaint%2F.xpra%2FFedora21-Server-289-13&remote-printer=_10_0_11_62&remote-device-uri=lpd%3A%2F%2F10.0.11.62%2F&socket-dir=%2Fhome%2Fmaint%2F.xpra&source=4ac7540d63071eccf61f8239dced62cfd7c335b6&display=%3A13'}
* _10_0_11_62_use_this             : {'printer-is-shared': False, 'printer-info': u'10.0.11.62-use this', 'printer-state-message': u'', 'printer-type': 2101276, 'printer-make-and-model': u'Generic PDF Printer', 'printer-state-reasons': [u'none'], 'printer-uri-supported': u'ipp://localhost:631/printers/_10_0_11_62_use_this', 'printer-state': 3, 'printer-location': u'on TestBotBestBot.local (via xpra)', 'device-uri': u'xpraforwarder:/tmp?mimetype=application%2Fpdf&socket-path=%2Fhome%2Fmaint%2F.xpra%2FFedora21-Server-289-13&remote-printer=_10_0_11_62_use_this&remote-device-uri=lpd%3A%2F%2F10.0.11.62%2F&socket-dir=%2Fhome%2Fmaint%2F.xpra&source=4ac7540d63071eccf61f8239dced62cfd7c335b6&display=%3A13'}
[maint@Fedora21-Server-289 platform]$

@totaam
Copy link
Collaborator Author

totaam commented Oct 15, 2015

2015-10-15 05:53:56: antoine commented


For older versions, i.e., with the below combinations, the landscaped prints looked absolutely fine, except for one file which is a .xlsx file...
[[BR]]
Lower priority than the rest of this ticket, but the advice applies to all printing bugs: if there are differences, you need to identify where they come from. Comparing the temporary PDF file is a good start.

[[BR]]

In comment:3 I see 'I tried it with gedit, and it prints files in "landscape" as expected.' , was this through xpra? Which versions?
Yes, it was through xpra. ... It printed fine in both the cases.
[[BR]]
Similar to the advice above: have you tried looking at the PDF file that got generated for this print job?
Is the orientation the same as the one you are having problem with?

[[BR]]

Have you tried printing that PDF file directly?
?
You can try from a pdf viewer, local browser, lpr, etc.

[[BR]]

I tried printing it using the code xpra/platform/printing.py PATHTOYOURPDFFILE along with Alex, and this is what I got:
[[BR]]

  • your client is not up to date, I did say: As of r10838, you can just use...
  • you are not including the command that you actually used

@totaam
Copy link
Collaborator Author

totaam commented Oct 19, 2015

2015-10-19 19:16:24: pvenkateswaralu changed owner from pvenkateswaralu to antoine

@totaam
Copy link
Collaborator Author

totaam commented Oct 19, 2015

2015-10-19 19:16:24: pvenkateswaralu commented


In comment:3 I see 'I tried it with gedit, and it prints files in "landscape" as expected.' , was this through xpra? Which versions?
Yes, it was through xpra. ... It printed fine in both the cases.
[[BR]]
Similar to the advice above: have you tried looking at the PDF file that got generated for this print job?
Is the orientation the same as the one you are having problem with?
[[BR]]
Yes, the orientation is the same.

[[BR]]

Have you tried printing that PDF file directly?
?
You can try from a pdf viewer, local browser, lpr, etc.
[[BR]]
Yes, I used Adobe Reader and printed that PDF file. It printed in landscape as expected.

[[BR]]

I tried printing it using the code xpra/platform/printing.py PATHTOYOURPDFFILE along with Alex, and this is what I got:
[[BR]]

  • your client is not up to date, I did say: As of r10838, you can just use...
  • you are not including the command that you actually used
    [[BR]]
    The command I used is:
python /usr/lib64/python2.7/site-packages/xpra/platform/printing.py \
    /Users/maint/Downloads/4ac7540d63071eccf61f8239dced62cfd7c335b6-1.pdf

@totaam
Copy link
Collaborator Author

totaam commented Oct 19, 2015

2015-10-19 23:28:43: pvenkateswaralu changed title from Xpra trunk does not support landscape printing to Xpra trunk does not support landscape printing on OSX

@totaam
Copy link
Collaborator Author

totaam commented Oct 19, 2015

2015-10-19 23:28:43: pvenkateswaralu commented


I tested landscape printing with Xpra-Trunk on other Client OS, such as Fedora 21 and Windows. It seems to work fine there. So, the issue is only with Mac OSX.

@totaam
Copy link
Collaborator Author

totaam commented Oct 20, 2015

2015-10-20 12:43:24: antoine changed owner from antoine to pvenkateswaralu

@totaam
Copy link
Collaborator Author

totaam commented Oct 20, 2015

2015-10-20 12:43:24: antoine commented


I tested landscape printing with Xpra-Trunk on other Client OS, such as Fedora 21 and Windows. It seems to work fine there. So, the issue is only with Mac OSX.
[[BR]]
What is the version of OSX, version of cups? etc..
Have you tried newer or older versions of OSX?
Have you tried different printers to see if the problem is limited to this hardware / driver combination?
Have you tried using the Xpra.app/Contents/Helpers/Print tool directly on that system?

Note: as of r10921, we can tweak the default printer options with the client environment variable XPRA_DEFAULT_CUPS_OPTIONS which defaults to orientation-requested=3,fit-to-page=True. Maybe this will help? At least I don't think it does any harm, but since we are now modifying the orientation setting, this will need to be checked with many more cups OS / drivers / printer combinations: checking that this hasn't caused regressions for those that worked previously in particular. (if so, we could consider making the default cups options different for osx - or for whatever printer / cups version is affected)
For example:

XPRA_DEFAULT_CUPS_OPTIONS=orientation-requested=6 xpra attach ...

Should print everything upside down. For more details on the cups print options see Command-Line Printing and Options.

In comment:9, your command does not specify the printer you want to use, see comment:7 which explains in detail what to do, both for newer versions of the code (which do not require a printer name) and for older versions of the code (which do require one - and you may want to specify one anyway to make sure it comes out where you expect).


Links that may be useful if we need to change the code:

@totaam
Copy link
Collaborator Author

totaam commented Oct 20, 2015

2015-10-20 12:44:13: antoine changed priority from major to minor

@totaam
Copy link
Collaborator Author

totaam commented Oct 20, 2015

2015-10-20 12:44:13: antoine changed component from android to printing

@totaam
Copy link
Collaborator Author

totaam commented Oct 26, 2015

2015-10-26 19:15:51: pvenkateswaralu changed owner from pvenkateswaralu to antoine

@totaam
Copy link
Collaborator Author

totaam commented Oct 26, 2015

2015-10-26 19:15:51: pvenkateswaralu commented


I tested landscape printing with Xpra-Trunk on other Client OS, such as Fedora 21 and Windows. It seems to work fine there. So, the issue is only with Mac OSX.
[[BR]]
What is the version of OSX, version of cups? etc..
[[BR]]
OSX version - 10.6.8 Version of Cups - 1.4.7


Have you tried newer or older versions of OSX?
[[BR]]
Yes, I tried with OSX 10.6.8 and 10.10.4, Cups-Version: 1.4.7 and 2.0.0 respectively. Landscape printing behaves the same way in both OSX versions.


Have you tried different printers to see if the problem is limited to this hardware / driver combination?
[[BR]]
There are 2 printers in the office. Tried on both. And it works the same way on both. So I'm guessing the problem is not restricted to this particular hardware/driver combination.


Have you tried using the Xpra.app/Contents/Helpers/Print tool directly on that system?
[[BR]]
Yes, I did. I printed using the command

./Desktop/xpra-trunk/16.0-[r10885](../commit/50791d1d3afb48c6b7f0ff28a791b4956c8d837c)/Xpra.app/Contents/Helpers/Print _10_0_11_62_use_this /Users/maint/Downloads/4ac7540d63071eccf61f8239dced62cfd7c335b6.pdf

And it prints similar to [/attachment/ticket/995/landscaped_image.png this picture]


Note: as of r10921, we can tweak the default printer options with the client environment variable XPRA_DEFAULT_CUPS_OPTIONS which defaults to orientation-requested=3,fit-to-page=True. Maybe this will help? At least I don't think it does any harm, but since we are now modifying the orientation setting, this will need to be checked with many more cups OS / drivers / printer combinations: checking that this hasn't caused regressions for those that worked previously in particular. (if so, we could consider making the default cups options different for osx - or for whatever printer / cups version is affected)
For example:

XPRA_DEFAULT_CUPS_OPTIONS=orientation-requested=6 xpra attach ...

Should print everything upside down. For more details on the cups print options see Command-Line Printing and Options.
[[BR]]
I tested printing with Client--OSX10.6.8--16.0r10990/16.0r11015 and Server--Fedora21--16.0r10972
With these versions, the file did not get printed at all. And here are the Client-Server Logs:

Client Log: XPRA_DELETE_PRINTER_FILE=0 XPRA_DEFAULT_CUPS_OPTIONS=orientation-requested=3 ./xpra attach tcp:10.0.32.148:2200 -d printing
Edit: moved to [/attachment/ticket/995/client-print-error.log]

Server Log:
Edit: moved to [/attachment/ticket/995/server-print-noerror.log]

[[BR]]
Please let me know if you want me to create a new ticket for this one.


In comment:9, your command does not specify the printer you want to use, see comment:7 which explains in detail what to do, both for newer versions of the code (which do not require a printer name) and for older versions of the code (which do require one - and you may want to specify one anyway to make sure it comes out where you expect).
[[BR]]
When I specified the PRINTERNAME and printed using this command python /usr/lib64/python2.7/site-packages/xpra/platform/printing.py _10_0_11_62_use_this /Users/maint/Downloads/4ac7540d63071eccf61f8239dced62cfd7c335b6.pdf This is the log I got:

Traceback (most recent call last):
  File "/usr/lib64/python2.7/site-packages/xpra/platform/printing.py", line 102, in <module>
    main()
  File "/usr/lib64/python2.7/site-packages/xpra/platform/printing.py", line 96, in main
    print_files(printer, sys.argv[2:], "Print Command", {})
  File "/usr/lib64/python2.7/site-packages/xpra/platform/pycups_printing.py", line 325, in print_files
    assert printpid>0, "printing failed and returned job id %s" % printpid
AssertionError: printing failed and returned job id 0
[maint@Fedora21-Server-289 ~]$

@totaam
Copy link
Collaborator Author

totaam commented Oct 27, 2015

2015-10-27 04:47:55: antoine uploaded file client-print-error.log (8.5 KiB)

moving log to attachment

@totaam
Copy link
Collaborator Author

totaam commented Nov 5, 2015

2015-11-05 12:57:37: antoine commented


Please learn to use the tracker's comment system, I have had to edit every response you made on this ticket:

  • do not reply and quote large amounts of text, we can see it just above - stick to the essential - especially when:
  • do not mess up indentation which misplaces quotes and responses, makes it very hard to see who said what when
  • if something is not relevant (say XPRA_SIMULATE_PRINT_FAILURE) then don't use it, it just confuses things
  • use the preview button and make sure things look ok before posting

I am really struggling to make sense of this ticket.


When I tried to print that pdf file on the client-side with .. the file got printed in Portrait itself in all the cases.
This statement is a little bit ambiguous: I believe that the PDF used was in landscape orientation already, right? (like this one: [/raw-attachment/ticket/995/4ac7540d63071eccf61f8239dced62cfd7c335b6-1.pdf])
No, the PDF files that are being generated are all in portrait irrespective of what value you specify in XPRA_DEFAULT_CUPS_OPTIONS=orientation-requested=x.
[[BR]]
Let's clarify a few things:

  • when we want to print in landscape orientation, we make the PDF rotated 90 degrees so that when we print it in portrait orientation on the client (we always print in portrait orientation client side) it will come out in "landscape" orientation - a PDF viewer should show it in portrait orientation but with the contents rotated 90 degrees. (see your first example PDF attached to this ticket)
  • the XPRA_DEFAULT_CUPS_OPTIONS is a client switch (see comment:12) which is applied when submitting jobs to the local printing system - yet you seem to be expecting it to have an effect on the PDF conversion filters, which run on the server side (also, you're not including the full command lines, so it's impossible to even try to reproduce what you did) - it was added to try to force the printing in portrait mode (and to be able to test different settings)

Why have you switched from printing the calendar to printing a picture? Does it make any difference? (it confuses me for sure)
As I said above, the calendar is in "landscape" orientation already (or "rotated 90 degrees"), the [/attachment/ticket/995/995_fileThatGotGenerated.pdf picture] is not. (note: this filename is nor particularly helpful to identify what we are meant to be looking at). Why is that? What changed and when?


I downgraded the server version to r10972 and with this, I was able to change orientations, page size, etc in the printer-selector-settings-window.
But with server revision r11058, the behavior is still the same. I can't change orientations, page size, etc. I haven't tested with server revisions between 10972-11058 though. Please let me know if I have to narrow it down further to find out in which revision this problem started.
[[BR]]
Sounds like this should not be too hard to bisect then.

Note: from the screenshot attached, it looks to me like the printer dialog should allow you to select orientation: the popup window is shown with the 4 options.
If you are saying that it is impossible to select those options using the mouse using an OSX client, then this has absolutely nothing to do with printing, this would be a window focus bug, reproducible with many other dialogs - which may well have have been reported before.
You should be able to confirm that by using the keyboard to activate those options.

You should also be able to connect two clients at the same time with sharing enabled, then you could use a Windows or Linux client to access the orientation dialog (that's assuming that the bug is OSX specific), confirm that landscape printing works on OSX then open a new bug about the popup menu not working (or re-open/add to an existing ticket, if appropriate).
If you are still having problems with landscape printing on OSX, try the printing tool on the client, feeding it the PDF as generated. (the one that should be rotated 90 degrees) Then if that still doesn't work, try to use the XPRA_DEFAULT_CUPS_OPTIONS to see if you can force any orientation at all (or even other options).

@totaam
Copy link
Collaborator Author

totaam commented Nov 11, 2015

2015-11-11 00:48:04: pvenkateswaralu commented


I'm sorry for the mess. I will try to explain the issue as best as I can and keep it as short as possible.[[BR]]

As of Client-16.0-r11176-OSX10.6.8 and Server-16.0-r11160-Fedora21
[[BR]]

  • It is true that the OSX client did not allow me to select orientation in the printer dialog (and I will either open a new ticket or add to an existing ticket about the popup menu not working).

  • So I tried to connect two clients at the same time with sharing enabled (Fedora 21 and OSX) : Fedora21 to access the orientation dialog and OSX to perform the print. By doing this, the PDF generated looked like [/attachment/ticket/995/4ac7540d63071eccf61f8239dced62cfd7c335b6-1.pdf this] which is rotated 90 degrees. But the actual print looked like this

  • Feeding the PDF as generated (the one that is rotated 90 degrees) to the printing tool on the client using ./Desktop/xpra-trunk/16.0-[r11176](../commit/0b6dd77c94baf53f258d985597427c9d4a8c4a28).app/Contents/Helpers/Print _10_0_11_62 /Users/maint/Downloads/4ac7540d63071eccf61f8239dced62cfd7c335b6.pdf prints similar to this picture

  • Trying to force the orientation using XPRA_DEFAULT_CUPS_OPTIONS also results in the same. PDF generated is rotated 90 degrees, and the actual print is from the middle of the page -> like this

@totaam
Copy link
Collaborator Author

totaam commented Nov 11, 2015

2015-11-11 01:40:17: antoine commented


Trying to force the orientation using XPRA_DEFAULT_CUPS_OPTIONS also results in the same. PDF generated is rotated 90 degrees, and the actual print is from the middle of the page -> like this
[[BR]]
Just to be clear: XPRA_DEFAULT_CUPS_OPTIONS has no effect whatsoever on the PDF generated, this is a client print job control option. See the last two line from comment:19, which uses bold font for highlighting this.

OSX uses the same printing system as Fedora (cups).
Using the print tool directly, please try different OSX machines and different versions of OSX to see if they are all affected or just some.

Note: for following the debugging instructions below, you may also need to remove the postscript-printer and/or pdf-printer which may have been added to /etc/xpra/xpra.conf during installation. (but not on OSX, where there is no such file).

It may also be worth testing the server with:

XPRA_PRINTERS_GENERIC=0 xpra start ..

Which may generate a PDF that looks the same, but is slightly different (maybe the metadata carries the orientation?) as it should end up using the "old" cups-pdf method. (can be confirmed by looking at the printing debug log, when the printer is added and configured).

r11196 also makes it possible to specify which mimetypes will be handled by the print filters, maybe restricting to postscript rather than PDF can workaround this issue? (in which case we could quite easily make this per-platform) Hopefully without too much quality degradation or regressions.
ie:

XPRA_PRINTING_MIMETYPES=application/postscript xpra start ...

@totaam
Copy link
Collaborator Author

totaam commented Nov 20, 2015

2015-11-20 06:02:48: antoine commented


As for the dialog not being accessible, maybe this is fixed? - see #770#comment:29

@totaam
Copy link
Collaborator Author

totaam commented Dec 5, 2015

2015-12-05 10:56:39: antoine changed priority from minor to major

@totaam
Copy link
Collaborator Author

totaam commented Dec 5, 2015

2015-12-05 10:56:39: antoine commented


Raising: time to close all 0.16 tickets, one way or another.

@totaam
Copy link
Collaborator Author

totaam commented Dec 19, 2015

2015-12-19 08:22:39: antoine changed priority from major to critical

@totaam
Copy link
Collaborator Author

totaam commented Dec 19, 2015

2015-12-19 08:22:39: antoine changed owner from pvenkateswaralu to afarr

@totaam
Copy link
Collaborator Author

totaam commented Dec 19, 2015

2015-12-19 08:22:39: antoine commented


@afarr: can we close this for the 0.16 release?

@totaam
Copy link
Collaborator Author

totaam commented Dec 22, 2015

2015-12-22 01:28:05: afarr uploaded file 0d6e0381698caeab50a41782fd9926b89542c346-1.pdf (468.6 KiB)

landscape as landscape locally saved print pdf

@totaam
Copy link
Collaborator Author

totaam commented Dec 22, 2015

2015-12-22 01:56:43: afarr commented


So... made the mistake of getting ambitious and trying to test with newly set up fedora 23 server. Fumbled with this and that, but was never able to get printing to work (for now I'm assuming that I'm just missing a new fedora 23 detail).

Timeliness failure disclosure out of the way — I'm afraid the "landscape printed as portrait" theory you mentioned above does still seem to be happening. (Not sure if it ever got truly confirmed, maybe I should have tried my hand with this ticket earlier.)

Going back to my old ways... tested with 0.16.0 r11304 osx client against 0.16.0 r11366 fedora 21 server.

Printing the arbitrarily chosen lawn gnome at http://www.privacysurgeon.org/blog/wp-content/uploads/2013/04/Garden-gnomes-e1365011986402.jpg in landscape mode... using firefox, I essentially get the landscape image printed horizontally across the middle of a page formatted in a portrait format ("landscape printed as portrait", I presume).

Meanwhile, with XPRA_DELETE_PRINTER_FILE=0, I get a significantly more "landscape-y" pdf file not being deleted from the client (attached).

The server's cups and xforwarder logs for the print job are here:

Dec 21 17:39:06 jimador.spikes.eng systemd[1]: Started CUPS Printing Service.
Dec 21 17:39:06 jimador.spikes.eng systemd[1]: Started CUPS Printing Service.
Dec 21 17:39:06 jimador.spikes.eng xpraforwarder[6880]: '/usr/lib/cups/backend/xpraforwarder' '8' 'tlaloc' 'Garden-gnomes-e1365011986402.jpg (JPEG Image, 598 × 300 pixels)' '1' 'edgetoedge=yes manualduplex=off overridea4withletter=yes manualfeed=off number-up=1 joboffset=on Duplex=None Resolution=300dpi PageSize=Letter lowsupplies=continue borderless=on ret=notset job-uuid=urn:uuid:fc94d726-18b1-3e1e-42e1-5f9abcf17394 job-originating-host-name=localhost time-at-creation=1450748346 time-at-processing=1450748346'
Dec 21 17:39:06 jimador.spikes.eng xpraforwarder[6880]: version 0.16.0, username: tlaloc, title: Garden-gnomes-e1365011986402.jpg (JPEG Image, 598 × 300 pixels), filename: -, job_id: 8
Dec 21 17:39:06 jimador.spikes.eng xpraforwarder[6880]: urlparse(xpraforwarder:/tmp?mimetype=application%2Fpdf&socket-path=%2Fhome%2Ftlaloc%2F.xpra%2Fjimador.spikes.eng-13&remote-printer=_10_0_11_62&remote-device-uri=socket%3A%2F%2F10.0.11.62%2F&socket-dir=%2Fhome%2Ftlaloc%2F.xpra&source=0d6e0381698caeab50a41782fd9926b89542c346&display=%3A13)=ParseResult(scheme='xpraforwarder', netloc=*, path='/tmp', params=*, query='mimetype=application%2Fpdf&socket-path=%2Fhome%2Ftlaloc%2F.xpra%2Fjimador.spikes.eng-13&remote-printer=_10_0_11_62&remote-device-uri=socket%3A%2F%2F10.0.11.62%2F&socket-dir=%2Fhome%2Ftlaloc%2F.xpra&source=0d6e0381698caeab50a41782fd9926b89542c346&display=%3A13', fragment='')
Dec 21 17:39:06 jimador.spikes.eng xpraforwarder[6880]: attributes(mimetype=application%2Fpdf&socket-path=%2Fhome%2Ftlaloc%2F.xpra%2Fjimador.spikes.eng-13&remote-printer=_10_0_11_62&remote-device-uri=socket%3A%2F%2F10.0.11.62%2F&socket-dir=%2Fhome%2Ftlaloc%2F.xpra&source=0d6e0381698caeab50a41782fd9926b89542c346&display=%3A13)={'mimetype': ['application/pdf'], 'socket-path': ['/home/tlaloc/.xpra/jimador.spikes.eng-13'], 'remote-printer': ['_10_0_11_62'], 'remote-device-uri': ['socket://10.0.11.62/'], 'socket-dir': ['/home/tlaloc/.xpra'], 'source': ['0d6e0381698caeab50a41782fd9926b89542c346'], 'display': [':13']}
Dec 21 17:39:06 jimador.spikes.eng xpraforwarder[6880]: xpra display: :13, socket-path: /home/tlaloc/.xpra/jimador.spikes.eng-13
Dec 21 17:39:06 jimador.spikes.eng xpraforwarder[6880]: running: ['xpra', 'print', 'socket:/home/tlaloc/.xpra/jimador.spikes.eng-13', '-', 'application/pdf', '0d6e0381698caeab50a41782fd9926b89542c346', 'Garden-gnomes-e1365011986402.jpg (JPEG Image, 598\xc2\xa0\xc3\x97\xc2\xa0300 pixels)', '_10_0_11_62', '1', 'edgetoedge=yes manualduplex=off overridea4withletter=yes manualfeed=off number-up=1 joboffset=on Duplex=None Resolution=300dpi PageSize=Letter lowsupplies=continue borderless=on ret=notset job-uuid=urn:uuid:fc94d726-18b1-3e1e-42e1-5f9abcf17394 job-originating-host-name=localhost time-at-creation=1450748346 time-at-processing=1450748346']
Dec 21 17:39:07 jimador.spikes.eng xpraforwarder[6880]: returncode(['xpra', 'print', 'socket:/home/tlaloc/.xpra/jimador.spikes.eng-13', '-', 'application/pdf', '0d6e0381698caeab50a41782fd9926b89542c346', 'Garden-gnomes-e1365011986402.jpg (JPEG Image, 598\xc2\xa0\xc3\x97\xc2\xa0300 pixels)', '_10_0_11_62', '1', 'edgetoedge=yes manualduplex=off overridea4withletter=yes manualfeed=off number-up=1 joboffset=on Duplex=None Resolution=300dpi PageSize=Letter lowsupplies=continue borderless=on ret=notset job-uuid=urn:uuid:fc94d726-18b1-3e1e-42e1-5f9abcf17394 job-originating-host-name=localhost time-at-creation=1450748346 time-at-processing=1450748346'])=0
Dec 21 17:39:07 jimador.spikes.eng xpraforwarder[6880]: stdout=
Dec 21 17:39:07 jimador.spikes.eng xpraforwarder[6880]: stderr=2015-12-21 17:39:07,155 server requested disconnect: client request
Dec 21 17:39:08 jimador.spikes.eng systemd[1]: Started CUPS Printing Service.
Dec 21 17:39:08 jimador.spikes.eng systemd[1]: Started CUPS Printing Service.

@totaam
Copy link
Collaborator Author

totaam commented Dec 22, 2015

2015-12-22 07:54:23: antoine commented


..set up fedora 23 server. Fumbled with this and that, but was never able to get printing to work..
[[BR]]
It would be good to know what the problem is with Fedora 23 before the 0.16 release. Anything in the system log? Any errors in the xpra server's -d printing log?
Maybe a package dependency is missing? cups filters? selinux was disabled?


Since there is no mention of it, I assume that the printer dialog does let you select the orientation and that the problems related to this were just a different issue (see comment:22).


The attached gnome PDF looks like what you expected the printer to output on paper I presume?
So the server side is just fine, the problem only occurs when the OSX clients submit this PDF for printing, as it seems to get rotated again when it should not be.

As per comment:21, things left to try:

  • using a different PDF rendering setup via XPRA_PRINTERS_GENERIC (and verify it does get used)
  • using postscript
  • tweaking the locally submitted print job via XPRA_DEFAULT_CUPS_OPTIONS

Please also verify that other tools (PDF viewers? a local browser?) can print this file as-is. (my local Fedora desktop can, it looks fine)
Just to make it 100% clear: the PDF is rendered with the correct horizontal orientation already, simply printing this document in "regular" vertical orientation should give the expected output on paper. Why OSX insists on rotating it once more without us asking is what we're trying to figure out.

@totaam
Copy link
Collaborator Author

totaam commented Dec 29, 2015

2015-12-29 02:04:52: afarr commented


Ok... testing some more with osx 0.16.0 11503 client against 0.16.0 r11366 fedora 21 server (I'll do more testing to see if it's just that I've missed something with the fedora 23 server or if there is maybe an issue once I get a chance... I suspect I just missed something).

  • I tried with the XPRA_DEFAULT_CUPS_OPTIONS tweaks, but it kept coming out landscape as portrait.

  • I tried to print locally ($ XPRA_DEFAULT_CUPS_OPTIONS=orientation-requested=4 ./Print _10_0_11_62 /Users/Schadenfreude/Downloads/0d6e0381698caeab50a41782fd9926b89542c346-3.pdf, as well as without the default options, or with the default options=5) ... to no effect, still printed landscape as portrait.

  • I tried with XPRA_PRINTERS_GENERIC=0 xpra start ... - again, landscape as portrait.

  • I tried with XPRA_PRINTING_MIMETYPES=application/postscript xpra start ...... and it worked as expected/hoped?!?!

I'm not sure if you need logs, but I'll slap down some from the working option, just in case.

Server:

2015-12-28 17:40:23,542 set_printers({'_10_0_11_169': {'printer-info': '10.0.11.169', 'mimetypes': ('application/pdf', 'application/postscript'), 'device-uri': 'socket://10.0.11.169/'}, '_10_0_11_62': {'printer-info': '10.0.11.62', 'mimetypes': ('application/pdf', 'application/postscript'), 'device-uri': 'socket://10.0.11.62/'}}, , , ) for X11ServerSource(Protocol(tcp socket: 10.0.32.136:2200 <- 10.0.32.152:55311))
2015-12-28 17:40:23,543 add_printer('_10_0_11_169', {'printer-info': '10.0.11.169', 'mimetypes': ('application/pdf', 'application/postscript'), 'device-uri': 'socket://10.0.11.169/'}, '10.0.11.169', 'on Schadenfreude.local (via xpra)', {'socket-path': '/home/tlaloc/.xpra/jimador.spikes.eng-13', 'remote-printer': '_10_0_11_169', 'remote-device-uri': 'socket://10.0.11.169/', 'socket-dir': '/home/tlaloc/.xpra', 'source': '0d6e0381698caeab50a41782fd9926b89542c346', 'display': ':13'}, <function printer_added at 0x7fb014030a28>)
2015-12-28 17:40:23,544 using printer definition '['-m', 'drv:///sample.drv/generic.ppd']' for application/postscript
2015-12-28 17:40:23,545 pycups_printing adding printer: ['-p', '_10_0_11_169', '-E', '-v', 'xpraforwarder:/tmp?mimetype=application%2Fpostscript&socket-path=%2Fhome%2Ftlaloc%2F.xpra%2Fjimador.spikes.eng-13&remote-printer=_10_0_11_169&remote-device-uri=socket%3A%2F%2F10.0.11.169%2F&socket-dir=%2Fhome%2Ftlaloc%2F.xpra&source=0d6e0381698caeab50a41782fd9926b89542c346&display=%3A13', '-D', '10.0.11.169', '-L', 'on Schadenfreude.local (via xpra)', '-o', 'printer-is-shared=false', '-u', 'allow:tlaloc', '-m', 'drv:///sample.drv/generic.ppd']
2015-12-28 17:40:23,545 exec_lpadmin(['-p', '_10_0_11_169', '-E', '-v', 'xpraforwarder:/tmp?mimetype=application%2Fpostscript&socket-path=%2Fhome%2Ftlaloc%2F.xpra%2Fjimador.spikes.eng-13&remote-printer=_10_0_11_169&remote-device-uri=socket%3A%2F%2F10.0.11.169%2F&socket-dir=%2Fhome%2Ftlaloc%2F.xpra&source=0d6e0381698caeab50a41782fd9926b89542c346&display=%3A13', '-D', '10.0.11.169', '-L', 'on Schadenfreude.local (via xpra)', '-o', 'printer-is-shared=false', '-u', 'allow:tlaloc', '-m', 'drv:_sample.drv/generic.ppd']) command=['/usr/sbin/lpadmin', '-p', '_10_0_11_169', '-E', '-v', 'xpraforwarder:/tmp?mimetype=application%2Fpostscript&socket-path=%2Fhome%2Ftlaloc%2F.xpra%2Fjimador.spikes.eng-13&remote-printer=_10_0_11_169&remote-device-uri=socket%3A%2F%2F10.0.11.169%2F&socket-dir=%2Fhome%2Ftlaloc%2F.xpra&source=0d6e0381698caeab50a41782fd9926b89542c346&display=%3A13', '-D', '10.0.11.169', '-L', 'on Schadenfreude.local (via xpra)', '-o', 'printer-is-shared=false', '-u', 'allow:tlaloc', '-m', 'drv:/_sample.drv/generic.ppd']
2015-12-28 17:40:23,553 add_printer('_10_0_11_62', {'printer-info': '10.0.11.62', 'mimetypes': ('application/pdf', 'application/postscript'), 'device-uri': 'socket://10.0.11.62/'}, '10.0.11.62', 'on Schadenfreude.local (via xpra)', {'socket-path': '/home/tlaloc/.xpra/jimador.spikes.eng-13', 'remote-printer': '_10_0_11_62', 'remote-device-uri': 'socket://10.0.11.62/', 'socket-dir': '/home/tlaloc/.xpra', 'source': '0d6e0381698caeab50a41782fd9926b89542c346', 'display': ':13'}, <function printer_added at 0x7fb014030d70>)
2015-12-28 17:40:23,554 using printer definition '['-m', 'drv:///sample.drv/generic.ppd']' for application/postscript
2015-12-28 17:40:23,555 pycups_printing adding printer: ['-p', '_10_0_11_62', '-E', '-v', 'xpraforwarder:/tmp?mimetype=application%2Fpostscript&socket-path=%2Fhome%2Ftlaloc%2F.xpra%2Fjimador.spikes.eng-13&remote-printer=_10_0_11_62&remote-device-uri=socket%3A%2F%2F10.0.11.62%2F&socket-dir=%2Fhome%2Ftlaloc%2F.xpra&source=0d6e0381698caeab50a41782fd9926b89542c346&display=%3A13', '-D', '10.0.11.62', '-L', 'on Schadenfreude.local (via xpra)', '-o', 'printer-is-shared=false', '-u', 'allow:tlaloc', '-m', 'drv:///sample.drv/generic.ppd']
2015-12-28 17:40:23,555 exec_lpadmin(['-p', '_10_0_11_62', '-E', '-v', 'xpraforwarder:/tmp?mimetype=application%2Fpostscript&socket-path=%2Fhome%2Ftlaloc%2F.xpra%2Fjimador.spikes.eng-13&remote-printer=_10_0_11_62&remote-device-uri=socket%3A%2F%2F10.0.11.62%2F&socket-dir=%2Fhome%2Ftlaloc%2F.xpra&source=0d6e0381698caeab50a41782fd9926b89542c346&display=%3A13', '-D', '10.0.11.62', '-L', 'on Schadenfreude.local (via xpra)', '-o', 'printer-is-shared=false', '-u', 'allow:tlaloc', '-m', 'drv:_sample.drv/generic.ppd']) command=['/usr/sbin/lpadmin', '-p', '_10_0_11_62', '-E', '-v', 'xpraforwarder:/tmp?mimetype=application%2Fpostscript&socket-path=%2Fhome%2Ftlaloc%2F.xpra%2Fjimador.spikes.eng-13&remote-printer=_10_0_11_62&remote-device-uri=socket%3A%2F%2F10.0.11.62%2F&socket-dir=%2Fhome%2Ftlaloc%2F.xpra&source=0d6e0381698caeab50a41782fd9926b89542c346&display=%3A13', '-D', '10.0.11.62', '-L', 'on Schadenfreude.local (via xpra)', '-o', 'printer-is-shared=false', '-u', 'allow:tlaloc', '-m', 'drv:/_sample.drv/generic.ppd']
2015-12-28 17:40:23,644 returncode(['/usr/sbin/lpadmin', '-p', '_10_0_11_169', '-E', '-v', 'xpraforwarder:/tmp?mimetype=application%2Fpostscript&socket-path=%2Fhome%2Ftlaloc%2F.xpra%2Fjimador.spikes.eng-13&remote-printer=_10_0_11_169&remote-device-uri=socket%3A%2F%2F10.0.11.169%2F&socket-dir=%2Fhome%2Ftlaloc%2F.xpra&source=0d6e0381698caeab50a41782fd9926b89542c346&display=%3A13', '-D', '10.0.11.169', '-L', 'on Schadenfreude.local (via xpra)', '-o', 'printer-is-shared=false', '-u', 'allow:tlaloc', '-m', 'drv:///sample.drv/generic.ppd'])=0
2015-12-28 17:40:23,645 the remote printer '_10_0_11_169' has been configured
2015-12-28 17:40:23,690 returncode(['/usr/sbin/lpadmin', '-p', '_10_0_11_62', '-E', '-v', 'xpraforwarder:/tmp?mimetype=application%2Fpostscript&socket-path=%2Fhome%2Ftlaloc%2F.xpra%2Fjimador.spikes.eng-13&remote-printer=_10_0_11_62&remote-device-uri=socket%3A%2F%2F10.0.11.62%2F&socket-dir=%2Fhome%2Ftlaloc%2F.xpra&source=0d6e0381698caeab50a41782fd9926b89542c346&display=%3A13', '-D', '10.0.11.62', '-L', 'on Schadenfreude.local (via xpra)', '-o', 'printer-is-shared=false', '-u', 'allow:tlaloc', '-m', 'drv:///sample.drv/generic.ppd'])=0
2015-12-28 17:40:23,690 the remote printer '_10_0_11_62' has been configured
2015-12-28 17:41:01,606 New unix-domain connection received on /home/tlaloc/.xpra/jimador.spikes.eng-13
2015-12-28 17:41:03,183 Python/GObject/Print client version 0.16.0-[r11366](../commit/7e1714fd92e0544ce4ae0fd485574cc46e06d8b8)
2015-12-28 17:41:03,183  connected from 'jimador.spikes.eng' as 'root'
2015-12-28 17:41:03,188 process_print: ('0d6e0381698caeab50a41782fd9926b89542c346', 'application/postscript', '964762 bytes', '0d6e0381698caeab50a41782fd9926b89542c346', 'Garden-gnomes-e1365011986402.jpg (JPEG Image, 598\xc2\xa0\xc3\x97\xc2\xa0300 pixels)', '_10_0_11_62', '1', 'InputSlot=Default PageSize=Letter Duplex=None number-up=1 job-uuid=urn:uuid:fa3ed898-83b7-3323-4700-97f4c465efaa job-originating-host-name=localhost time-at-creation=1451353261 time-at-processing=1451353261')
2015-12-28 17:41:03,188 process_print: got 964762 bytes for file 0d6e0381698caeab50a41782fd9926b89542c346
2015-12-28 17:41:03,190 sha1 digest: 9df102156238f5e979b3158cd0a172da59326ef9
2015-12-28 17:41:03,191 parsed printer options: {'sha1': '9df102156238f5e979b3158cd0a172da59326ef9', 'printer': '_10_0_11_62', 'options': {'PageSize': 'Letter', 'time-at-processing': '1451353261', 'Duplex': 'None', 'number-up': '1', 'job-uuid': 'urn:uuid:fa3ed898-83b7-3323-4700-97f4c465efaa', 'InputSlot': 'Default', 'time-at-creation': '1451353261', 'job-originating-host-name': 'localhost'}, 'copies': '1', 'title': 'Garden-gnomes-e1365011986402.jpg (JPEG Image, 598\xc2\xa0\xc3\x97\xc2\xa0300 pixels)'}
2015-12-28 17:41:03,191 sending file to X11ServerSource(Protocol(tcp socket: 10.0.32.136:2200 <- 10.0.32.152:55311)) for printing on _10_0_11_62
2015-12-28 17:41:03,191 send_file('0d6e0381698caeab50a41782fd9926b89542c346', 'application/postscript', '964762 bytes', True, True, {'sha1': '9df102156238f5e979b3158cd0a172da59326ef9', 'printer': '_10_0_11_62', 'options': {'PageSize': 'Letter', 'time-at-processing': '1451353261', 'Duplex': 'None', 'number-up': '1', 'job-uuid': 'urn:uuid:fa3ed898-83b7-3323-4700-97f4c465efaa', 'InputSlot': 'Default', 'time-at-creation': '1451353261', 'job-originating-host-name': 'localhost'}, 'copies': '1', 'title': 'Garden-gnomes-e1365011986402.jpg (JPEG Image, 598\xc2\xa0\xc3\x97\xc2\xa0300 pixels)'})
2015-12-28 17:41:03,192 not sending to X11ServerSource(Protocol(unix-domain socket:/home/tlaloc/.xpra/jimador.spikes.eng-13)) (wanted uuid=0d6e0381698caeab50a41782fd9926b89542c346)
2015-12-28 17:41:03,195 file 0d6e0381698caeab50a41782fd9926b89542c346 (942KB) sent to 1 client
2015-12-28 17:41:03,195 client Protocol(unix-domain socket:/home/tlaloc/.xpra/jimador.spikes.eng-13) has requested disconnection: done (detaching)
2015-12-28 17:41:03,195 Disconnecting client '/home/tlaloc/.xpra/jimador.spikes.eng-13':
2015-12-28 17:41:03,196  client request

Client (note, it looks like the client is polling its printers once a minute, which I'll presume is expected, since I notice that the polling is set at 60, but I'll include a couple of iterations of that in logs as well:

2015-12-28 17:40:21,183 pycups settings: DEFAULT_CUPS_DBUS=0, CUPS_DBUS=False, POLLING_DELAY=60
2015-12-28 17:40:21,184 pycups settings: PRINTER_PREFIX=, ADD_LOCAL_PRINTERS=False
2015-12-28 17:40:21,184 pycups settings: ALLOW=Schadenfreude
2015-12-28 17:40:21,184 pycups settings: FORWARDER_TMPDIR=/var/folders/vg/81kvywt94r57d2ldnw7142pw0000gn/T/
2015-12-28 17:40:21,184 pycups settings: SKIPPED_PRINTERS=['Cups-PDF']
2015-12-28 17:40:21,184 DEFAULT_CUPS_OPTIONS={'orientation-requested': '4'}
2015-12-28 17:40:21,226 Xpra gtk2 client version 0.16.0-11503
2015-12-28 17:40:21,226  running on Mac OSX
2015-12-28 17:40:21,843 OpenGL_accelerate module loaded
2015-12-28 17:40:21,854 OpenGL enabled with Intel Iris OpenGL Engine
2015-12-28 17:40:21,872  using default keyboard settings
2015-12-28 17:40:22,158  desktop size is 2560x2490 with 1 screen:
2015-12-28 17:40:22,159   schadenfreude.local (903x878 mm - DPI: 72x72)
2015-12-28 17:40:22,159     monitor 1 1680x1050 at 880x1440 (592x370 mm - DPI: 72x72)
2015-12-28 17:40:22,159     monitor 2 2560x1440 (903x508 mm - DPI: 72x72)
2015-12-28 17:40:22,159  upscaled by 150%, virtual screen size: 1707x1660
2015-12-28 17:40:22,159   schadenfreude.local (903x878 mm - DPI: 48x48)
2015-12-28 17:40:22,159     monitor 1 1120x700 at 587x960 (592x370 mm - DPI: 48x48)
2015-12-28 17:40:22,159     monitor 2 1707x960 (903x508 mm - DPI: 48x48)
2015-12-28 17:40:22,283 Xpra X11 server version 0.16.0-[r11366](../commit/7e1714fd92e0544ce4ae0fd485574cc46e06d8b8)
2015-12-28 17:40:22,283  running on Linux Fedora 21 Twenty One
2015-12-28 17:40:22,296 Attached to tcp:10.0.32.136:2200 (press Control-C to detach)

2015-12-28 17:40:23,285 init_printing=<function init_printing at 0x671ccb0>
2015-12-28 17:40:23,286 init_printing(<bound method XpraClient.send_printers of gtk2.client>) printers_modified_callback=None
2015-12-28 17:40:23,286 init_printing(<bound method XpraClient.send_printers of gtk2.client>) will use polling
2015-12-28 17:40:23,287 pycups.get_all_printers()={u'_10_0_11_169': {'printer-is-shared': False, 'printer-info': u'10.0.11.169', 'printer-state-message': u'', 'printer-type': 77631500, 'printer-make-and-model': u'HP Color LaserJet Pro MFP M177', 'printer-state-reasons': [u'none'], 'printer-uri-supported': u'ipp://localhost:631/printers/_10_0_11_169', 'printer-state': 3, 'printer-location': u'somewhere-or-other', 'device-uri': u'socket://10.0.11.169/'}, u'_10_0_11_62': {'printer-is-shared': False, 'printer-info': u'10.0.11.62', 'printer-state-message': u'Waiting for printer to finish.', 'printer-type': 10522700, 'printer-make-and-model': u'HP LaserJet CM1410 Series', 'printer-state-reasons': [u'none'], 'printer-uri-supported': u'ipp://localhost:631/printers/_10_0_11_62', 'printer-state': 3, 'printer-location': u'moreXanderDome', 'device-uri': u'socket://10.0.11.62/'}}
2015-12-28 17:40:23,288 do_send_printers() found printers={u'_10_0_11_169': {'printer-is-shared': False, 'printer-info': u'10.0.11.169', 'printer-state-message': u'', 'printer-type': 77631500, 'printer-make-and-model': u'HP Color LaserJet Pro MFP M177', 'printer-state-reasons': [u'none'], 'printer-uri-supported': u'ipp://localhost:631/printers/_10_0_11_169', 'printer-state': 3, 'printer-location': u'somewhere-or-other', 'device-uri': u'socket://10.0.11.169/'}, u'_10_0_11_62': {'printer-is-shared': False, 'printer-info': u'10.0.11.62', 'printer-state-message': u'Waiting for printer to finish.', 'printer-type': 10522700, 'printer-make-and-model': u'HP LaserJet CM1410 Series', 'printer-state-reasons': [u'none'], 'printer-uri-supported': u'ipp://localhost:631/printers/_10_0_11_62', 'printer-state': 3, 'printer-location': u'moreXanderDome', 'device-uri': u'socket://10.0.11.62/'}}
2015-12-28 17:40:23,288 do_send_printers() device-uri(_10_0_11_169)=socket://10.0.11.169/
2015-12-28 17:40:23,288 do_send_printers() device-uri(_10_0_11_62)=socket://10.0.11.62/
2015-12-28 17:40:23,288 do_send_printers() new printers: ['_10_0_11_169', '_10_0_11_62']
2015-12-28 17:40:23,288 do_send_printers() printers=['_10_0_11_169', '_10_0_11_62']
2015-12-28 17:40:23,288 do_send_printers() exported printers=_10_0_11_169, _10_0_11_62
2015-12-28 17:40:23,845 sound output using audio codec: MPEG-1 Layer 3 (MP3)
2015-12-28 17:41:02,949 received file: ['0d6e0381698caeab50a41782fd9926b89542c346', 'application/postscript', True, True, 964762, '964762 bytes', {'copies': '1', 'sha1': '9df102156238f5e979b3158cd0a172da59326ef9', 'options': {'PageSize': 'Letter', 'time-at-processing': '1451353261', 'Duplex': 'None', 'number-up': '1', 'job-uuid': 'urn:uuid:fa3ed898-83b7-3323-4700-97f4c465efaa', 'InputSlot': 'Default', 'time-at-creation': '1451353261', 'job-originating-host-name': 'localhost'}, 'printer': '_10_0_11_62', 'title': 'Garden-gnomes-e1365011986402.jpg (JPEG Image, 598\xc2\xa0\xc3\x97\xc2\xa0300 pixels)'}]
2015-12-28 17:41:02,952 sha1 digest: 9df102156238f5e979b3158cd0a172da59326ef9 - expected: 9df102156238f5e979b3158cd0a172da59326ef9
2015-12-28 17:41:02,953 downloaded 964762 bytes to application/postscript file for printing:
2015-12-28 17:41:02,954  /Users/Schadenfreude/Downloads/0d6e0381698caeab50a41782fd9926b89542c346.ps
2015-12-28 17:41:02,954 safe print options({'copies': '1', 'sha1': '9df102156238f5e979b3158cd0a172da59326ef9', 'options': {'PageSize': 'Letter', 'time-at-processing': '1451353261', 'Duplex': 'None', 'number-up': '1', 'job-uuid': 'urn:uuid:fa3ed898-83b7-3323-4700-97f4c465efaa', 'InputSlot': 'Default', 'time-at-creation': '1451353261', 'job-originating-host-name': 'localhost'}, 'printer': '_10_0_11_62', 'title': 'Garden-gnomes-e1365011986402.jpg (JPEG Image, 598\xc2\xa0\xc3\x97\xc2\xa0300 pixels)'}) = {'PageSize': 'Letter'}
2015-12-28 17:41:02,954 pycups.get_all_printers()={u'_10_0_11_169': {'printer-is-shared': False, 'printer-info': u'10.0.11.169', 'printer-state-message': u'', 'printer-type': 77631500, 'printer-make-and-model': u'HP Color LaserJet Pro MFP M177', 'printer-state-reasons': [u'none'], 'printer-uri-supported': u'ipp://localhost:631/printers/_10_0_11_169', 'printer-state': 3, 'printer-location': u'somewhere-or-other', 'device-uri': u'socket://10.0.11.169/'}, u'_10_0_11_62': {'printer-is-shared': False, 'printer-info': u'10.0.11.62', 'printer-state-message': u'Waiting for printer to finish.', 'printer-type': 10522700, 'printer-make-and-model': u'HP LaserJet CM1410 Series', 'printer-state-reasons': [u'none'], 'printer-uri-supported': u'ipp://localhost:631/printers/_10_0_11_62', 'printer-state': 3, 'printer-location': u'moreXanderDome', 'device-uri': u'socket://10.0.11.62/'}}
2015-12-28 17:41:02,955 pycups.get_all_printers()={u'_10_0_11_169': {'printer-is-shared': False, 'printer-info': u'10.0.11.169', 'printer-state-message': u'', 'printer-type': 77631500, 'printer-make-and-model': u'HP Color LaserJet Pro MFP M177', 'printer-state-reasons': [u'none'], 'printer-uri-supported': u'ipp://localhost:631/printers/_10_0_11_169', 'printer-state': 3, 'printer-location': u'somewhere-or-other', 'device-uri': u'socket://10.0.11.169/'}, u'_10_0_11_62': {'printer-is-shared': False, 'printer-info': u'10.0.11.62', 'printer-state-message': u'Waiting for printer to finish.', 'printer-type': 10522700, 'printer-make-and-model': u'HP LaserJet CM1410 Series', 'printer-state-reasons': [u'none'], 'printer-uri-supported': u'ipp://localhost:631/printers/_10_0_11_62', 'printer-state': 3, 'printer-location': u'moreXanderDome', 'device-uri': u'socket://10.0.11.62/'}}
2015-12-28 17:41:02,956 pycups.print_files('_10_0_11_62', [u'/Users/Schadenfreude/Downloads/0d6e0381698caeab50a41782fd9926b89542c346.ps'], 'Garden-gnomes-e1365011986402.jpg (JPEG Image, 598\xc2\xa0\xc3\x97\xc2\xa0300 pixels)', {'PageSize': 'Letter'})
2015-12-28 17:41:02,979 pycups <cups.Connection object for /private/var/run/cupsd at 0x7d71c38>.printFiles('_10_0_11_62', [u'/Users/Schadenfreude/Downloads/0d6e0381698caeab50a41782fd9926b89542c346.ps'], 'Garden-gnomes-e1365011986402.jpg (JPEG Image, 598\xc2\xa0\xc3\x97\xc2\xa0300 pixels)', {'orientation-requested': '4', 'PageSize': 'Letter'})=40
2015-12-28 17:41:02,980 printing /Users/Schadenfreude/Downloads/0d6e0381698caeab50a41782fd9926b89542c346.ps, job=40
2015-12-28 17:41:03,002 pycups.printing_finished(40)=False
2015-12-28 17:41:03,002 printing_finished(40)=False
2015-12-28 17:41:13,006 pycups.printing_finished(40)=False
2015-12-28 17:41:13,006 printing_finished(40)=False
2015-12-28 17:41:23,009 pycups.printing_finished(40)=False
2015-12-28 17:41:23,010 printing_finished(40)=False
2015-12-28 17:41:23,288 check_printers() printers_modified_callback=<bound method XpraClient.send_printers of gtk2.client>
2015-12-28 17:41:23,790 pycups.get_all_printers()={u'_10_0_11_169': {'printer-is-shared': False, 'printer-info': u'10.0.11.169', 'printer-state-message': u'', 'printer-type': 77631500, 'printer-make-and-model': u'HP Color LaserJet Pro MFP M177', 'printer-state-reasons': [u'none'], 'printer-uri-supported': u'ipp://localhost:631/printers/_10_0_11_169', 'printer-state': 3, 'printer-location': u'somewhere-or-other', 'device-uri': u'socket://10.0.11.169/'}, u'_10_0_11_62': {'printer-is-shared': False, 'printer-info': u'10.0.11.62', 'printer-state-message': u'Waiting for printer to finish.', 'printer-type': 10522700, 'printer-make-and-model': u'HP LaserJet CM1410 Series', 'printer-state-reasons': [u'none'], 'printer-uri-supported': u'ipp://localhost:631/printers/_10_0_11_62', 'printer-state': 4, 'printer-location': u'moreXanderDome', 'device-uri': u'socket://10.0.11.62/'}}
2015-12-28 17:41:23,791 do_send_printers() found printers={u'_10_0_11_169': {'printer-is-shared': False, 'printer-info': u'10.0.11.169', 'printer-state-message': u'', 'printer-type': 77631500, 'printer-make-and-model': u'HP Color LaserJet Pro MFP M177', 'printer-state-reasons': [u'none'], 'printer-uri-supported': u'ipp://localhost:631/printers/_10_0_11_169', 'printer-state': 3, 'printer-location': u'somewhere-or-other', 'device-uri': u'socket://10.0.11.169/'}, u'_10_0_11_62': {'printer-is-shared': False, 'printer-info': u'10.0.11.62', 'printer-state-message': u'Waiting for printer to finish.', 'printer-type': 10522700, 'printer-make-and-model': u'HP LaserJet CM1410 Series', 'printer-state-reasons': [u'none'], 'printer-uri-supported': u'ipp://localhost:631/printers/_10_0_11_62', 'printer-state': 4, 'printer-location': u'moreXanderDome', 'device-uri': u'socket://10.0.11.62/'}}
2015-12-28 17:41:23,791 do_send_printers() device-uri(_10_0_11_169)=socket://10.0.11.169/
2015-12-28 17:41:23,791 do_send_printers() device-uri(_10_0_11_62)=socket://10.0.11.62/
2015-12-28 17:41:23,791 do_send_printers() exported printers unchanged: {'_10_0_11_169': {'printer-info': u'10.0.11.169', 'mimetypes': ['application/pdf', 'application/postscript'], 'device-uri': u'socket://10.0.11.169/'}, '_10_0_11_62': {'printer-info': u'10.0.11.62', 'mimetypes': ['application/pdf', 'application/postscript'], 'device-uri': u'socket://10.0.11.62/'}}
2015-12-28 17:41:33,008 pycups.printing_finished(40)=True
2015-12-28 17:41:33,009 printing_finished(40)=True
2015-12-28 17:42:23,290 check_printers() printers_modified_callback=<bound method XpraClient.send_printers of gtk2.client>
2015-12-28 17:42:23,791 pycups.get_all_printers()={u'_10_0_11_169': {'printer-is-shared': False, 'printer-info': u'10.0.11.169', 'printer-state-message': u'', 'printer-type': 77631500, 'printer-make-and-model': u'HP Color LaserJet Pro MFP M177', 'printer-state-reasons': [u'none'], 'printer-uri-supported': u'ipp://localhost:631/printers/_10_0_11_169', 'printer-state': 3, 'printer-location': u'somewhere-or-other', 'device-uri': u'socket://10.0.11.169/'}, u'_10_0_11_62': {'printer-is-shared': False, 'printer-info': u'10.0.11.62', 'printer-state-message': u'Waiting for printer to finish.', 'printer-type': 10522700, 'printer-make-and-model': u'HP LaserJet CM1410 Series', 'printer-state-reasons': [u'none'], 'printer-uri-supported': u'ipp://localhost:631/printers/_10_0_11_62', 'printer-state': 3, 'printer-location': u'moreXanderDome', 'device-uri': u'socket://10.0.11.62/'}}
2015-12-28 17:42:23,791 do_send_printers() found printers={u'_10_0_11_169': {'printer-is-shared': False, 'printer-info': u'10.0.11.169', 'printer-state-message': u'', 'printer-type': 77631500, 'printer-make-and-model': u'HP Color LaserJet Pro MFP M177', 'printer-state-reasons': [u'none'], 'printer-uri-supported': u'ipp://localhost:631/printers/_10_0_11_169', 'printer-state': 3, 'printer-location': u'somewhere-or-other', 'device-uri': u'socket://10.0.11.169/'}, u'_10_0_11_62': {'printer-is-shared': False, 'printer-info': u'10.0.11.62', 'printer-state-message': u'Waiting for printer to finish.', 'printer-type': 10522700, 'printer-make-and-model': u'HP LaserJet CM1410 Series', 'printer-state-reasons': [u'none'], 'printer-uri-supported': u'ipp://localhost:631/printers/_10_0_11_62', 'printer-state': 3, 'printer-location': u'moreXanderDome', 'device-uri': u'socket://10.0.11.62/'}}
2015-12-28 17:42:23,791 do_send_printers() device-uri(_10_0_11_169)=socket://10.0.11.169/
2015-12-28 17:42:23,791 do_send_printers() device-uri(_10_0_11_62)=socket://10.0.11.62/
2015-12-28 17:42:23,791 do_send_printers() exported printers unchanged: {'_10_0_11_169': {'printer-info': u'10.0.11.169', 'mimetypes': ['application/pdf', 'application/postscript'], 'device-uri': u'socket://10.0.11.169/'}, '_10_0_11_62': {'printer-info': u'10.0.11.62', 'mimetypes': ['application/pdf', 'application/postscript'], 'device-uri': u'socket://10.0.11.62/'}}
2015-12-28 17:43:23,291 check_printers() printers_modified_callback=<bound method XpraClient.send_printers of gtk2.client>
2015-12-28 17:43:23,794 pycups.get_all_printers()={u'_10_0_11_169': {'printer-is-shared': False, 'printer-info': u'10.0.11.169', 'printer-state-message': u'', 'printer-type': 77631500, 'printer-make-and-model': u'HP Color LaserJet Pro MFP M177', 'printer-state-reasons': [u'none'], 'printer-uri-supported': u'ipp://localhost:631/printers/_10_0_11_169', 'printer-state': 3, 'printer-location': u'somewhere-or-other', 'device-uri': u'socket://10.0.11.169/'}, u'_10_0_11_62': {'printer-is-shared': False, 'printer-info': u'10.0.11.62', 'printer-state-message': u'Waiting for printer to finish.', 'printer-type': 10522700, 'printer-make-and-model': u'HP LaserJet CM1410 Series', 'printer-state-reasons': [u'none'], 'printer-uri-supported': u'ipp://localhost:631/printers/_10_0_11_62', 'printer-state': 3, 'printer-location': u'moreXanderDome', 'device-uri': u'socket://10.0.11.62/'}}
2015-12-28 17:43:23,795 do_send_printers() found printers={u'_10_0_11_169': {'printer-is-shared': False, 'printer-info': u'10.0.11.169', 'printer-state-message': u'', 'printer-type': 77631500, 'printer-make-and-model': u'HP Color LaserJet Pro MFP M177', 'printer-state-reasons': [u'none'], 'printer-uri-supported': u'ipp://localhost:631/printers/_10_0_11_169', 'printer-state': 3, 'printer-location': u'somewhere-or-other', 'device-uri': u'socket://10.0.11.169/'}, u'_10_0_11_62': {'printer-is-shared': False, 'printer-info': u'10.0.11.62', 'printer-state-message': u'Waiting for printer to finish.', 'printer-type': 10522700, 'printer-make-and-model': u'HP LaserJet CM1410 Series', 'printer-state-reasons': [u'none'], 'printer-uri-supported': u'ipp://localhost:631/printers/_10_0_11_62', 'printer-state': 3, 'printer-location': u'moreXanderDome', 'device-uri': u'socket://10.0.11.62/'}}
2015-12-28 17:43:23,795 do_send_printers() device-uri(_10_0_11_169)=socket://10.0.11.169/
2015-12-28 17:43:23,795 do_send_printers() device-uri(_10_0_11_62)=socket://10.0.11.62/
2015-12-28 17:43:23,795 do_send_printers() exported printers unchanged: {'_10_0_11_169': {'printer-info': u'10.0.11.169', 'mimetypes': ['application/pdf', 'application/postscript'], 'device-uri': u'socket://10.0.11.169/'}, '_10_0_11_62': {'printer-info': u'10.0.11.62', 'mimetypes': ['application/pdf', 'application/postscript'], 'device-uri': u'socket://10.0.11.62/'}}
2015-12-28 17:44:23,293 check_printers() printers_modified_callback=<bound method XpraClient.send_printers of gtk2.client>
2015-12-28 17:44:23,796 pycups.get_all_printers()={u'_10_0_11_169': {'printer-is-shared': False, 'printer-info': u'10.0.11.169', 'printer-state-message': u'', 'printer-type': 77631500, 'printer-make-and-model': u'HP Color LaserJet Pro MFP M177', 'printer-state-reasons': [u'none'], 'printer-uri-supported': u'ipp://localhost:631/printers/_10_0_11_169', 'printer-state': 3, 'printer-location': u'somewhere-or-other', 'device-uri': u'socket://10.0.11.169/'}, u'_10_0_11_62': {'printer-is-shared': False, 'printer-info': u'10.0.11.62', 'printer-state-message': u'Waiting for printer to finish.', 'printer-type': 10522700, 'printer-make-and-model': u'HP LaserJet CM1410 Series', 'printer-state-reasons': [u'none'], 'printer-uri-supported': u'ipp://localhost:631/printers/_10_0_11_62', 'printer-state': 3, 'printer-location': u'moreXanderDome', 'device-uri': u'socket://10.0.11.62/'}}
2015-12-28 17:44:23,796 do_send_printers() found printers={u'_10_0_11_169': {'printer-is-shared': False, 'printer-info': u'10.0.11.169', 'printer-state-message': u'', 'printer-type': 77631500, 'printer-make-and-model': u'HP Color LaserJet Pro MFP M177', 'printer-state-reasons': [u'none'], 'printer-uri-supported': u'ipp://localhost:631/printers/_10_0_11_169', 'printer-state': 3, 'printer-location': u'somewhere-or-other', 'device-uri': u'socket://10.0.11.169/'}, u'_10_0_11_62': {'printer-is-shared': False, 'printer-info': u'10.0.11.62', 'printer-state-message': u'Waiting for printer to finish.', 'printer-type': 10522700, 'printer-make-and-model': u'HP LaserJet CM1410 Series', 'printer-state-reasons': [u'none'], 'printer-uri-supported': u'ipp://localhost:631/printers/_10_0_11_62', 'printer-state': 3, 'printer-location': u'moreXanderDome', 'device-uri': u'socket://10.0.11.62/'}}
2015-12-28 17:44:23,796 do_send_printers() device-uri(_10_0_11_169)=socket://10.0.11.169/
2015-12-28 17:44:23,796 do_send_printers() device-uri(_10_0_11_62)=socket://10.0.11.62/
2015-12-28 17:44:23,797 do_send_printers() exported printers unchanged: {'_10_0_11_169': {'printer-info': u'10.0.11.169', 'mimetypes': ['application/pdf', 'application/postscript'], 'device-uri': u'socket://10.0.11.169/'}, '_10_0_11_62': {'printer-info': u'10.0.11.62', 'mimetypes': ['application/pdf', 'application/postscript'], 'device-uri': u'socket://10.0.11.62/'}}

@totaam
Copy link
Collaborator Author

totaam commented Dec 29, 2015

2015-12-29 08:51:53: antoine commented


The comment above was still missing the test of printing locally, so I dusted up the ol' mac mini and hooked up the printing and found that:

  • chrome browser prints fine
  • safari opens in it "Preview" which also prints fine (as can be seen in the preview page)
  • our "Print" pycups wrapper has the problem
  • so does the default system "lpr" utility

So I guess what we could also use a more (or is it less?) "clever" print queue helper. So I went looking for one and stumbled upon this: Mac OS: print PDF in landscape orientation from command line - which talks about an ominous but I have to switch off "rotate automatically".
I tried various options:

  • lp -o landscape -o fit-to-page -o media=A4 Downloads/test.pdf - OK!
  • lp -o landscape -o fit-to-page Downloads/test.pdf - OK!
  • lp -o landscape Downloads/test.pdf - OK!

So then I tried with our "Print" wrapper tool and found that despite what the documentation says, we should not be using the numeric values for orientation, so this works (and r11516 removes the invalid default option from the code):

XPRA_DEFAULT_CUPS_OPTIONS=orientation-requested=landscape /Volumes/Xpra/Xpra.app/Contents/Helpers/Print ./Downloads/test.pdf

Which sounds great.. except we have no way of knowing when to activate this workaround: all the server knows about this print job is this:

xpraforwarder[6880]: running: ['xpra', 'print', 'socket:/home/tlaloc/.xpra/jimador.spikes.eng-13', \
   '-', 'application/pdf', '0d6e0381698caeab50a41782fd9926b89542c346', \
   'Garden-gnomes-e1365011986402.jpg (JPEG Image, 598\xc2\xa0\xc3\x97\xc2\xa0300 pixels)', '_10_0_11_62', '1', \
      'edgetoedge=yes manualduplex=off overridea4withletter=yes manualfeed=off number-up=1 \
       joboffset=on Duplex=None Resolution=300dpi PageSize=Letter lowsupplies=continue borderless=on ret=notset \
       job-uuid=urn:uuid:fc94d726-18b1-3e1e-42e1-5f9abcf17394 job-originating-host-name=localhost \
       time-at-creation=1450748346 time-at-processing=1450748346']

That's because the PDF is already in the correct orientation by the time it lands in the print queue, and it should be printed as-is.

I am reluctant to change to postscript at this point... especially after the 0.16 release.
And the change in r11517 is a little bit big too, because it's done cleanly using the per-platform files, I guess something more hackish could be merged in 0.16.
Some other minor improvements in r11518 and r11519 will give us a lot more printing debug information via the print tool and via xpra info. (trunk only)

@afarr: please confirm that trunk prints in lanscape mode correctly for you. (works for me, I have many many gnomes printer all around the house)
And that this does not cause regressions in other areas (quality, or whatever) as the rendering pipeline is a bit different for postscript..

@totaam
Copy link
Collaborator Author

totaam commented Jan 5, 2016

2016-01-05 00:27:19: afarr commented


Trunk is printing as hoped/expected with 0.17.0 r11535 osx client and 0.17.0 r11580 fedora 23 server (yes, looks like I'd missed some fedora 23 set up details, all good now), whether I use the local variable or not to set the default value. (I think I need a lawn for all these lawn gnomes...)

Note, when I use the above listed local printing option (i.e. XPRA_DEFAULT_CUPS_OPTIONS=orientation-requested=landscape Xpra.app/Helpers/Print PRINTER_NAME ~/Downloads/test-garden-gnome.pdf) to try to landscape print a pdf (rather than a .ps) the 0.17.0, then it still prints "portrait as landscape".

While running in general to see if there might be any other impact, I haven't been seeing anything in a (relatively brief) stint of testing, but I did see a server-side traceback that may be related (not sure what triggered it, since I wasn't seeing anything particularly dramatic while "side-testing" video and browsing rendering).

Traceback (most recent call last):
  File "/usr/lib64/python2.7/site-packages/xpra/server/window/window_source.py", line 1041, in delayed_region_soft_timeout
    self.do_send_delayed()
  File "/usr/lib64/python2.7/site-packages/xpra/server/window/window_source.py", line 1132, in do_send_delayed
    self.send_delayed_regions(*delayed)
  File "/usr/lib64/python2.7/site-packages/xpra/server/window/window_source.py", line 1147, in send_delayed_regions
    self.do_send_delayed_regions(damage_time, window, regions, coding, options)
  File "/usr/lib64/python2.7/site-packages/xpra/server/window/window_video_source.py", line 574, in do_send_delayed_regions
    self.process_damage_region(damage_time, window, actual_vr.x, actual_vr.y, actual_vr.width, actual_vr.height, coding, video_options, 0)
  File "/usr/lib64/python2.7/site-packages/xpra/server/window/window_video_source.py", line 617, in process_damage_region
    WindowSource.process_damage_region(self, damage_time, window, x, y, w-dw, h-dh, coding, options, flush=flush)
  File "/usr/lib64/python2.7/site-packages/xpra/server/window/window_source.py", line 1297, in process_damage_region
    assert frozen, "failed to freeze %s" % image
AssertionError: failed to freeze XImageWrapper(BGRX: 1, 1, 908, 795)

@totaam
Copy link
Collaborator Author

totaam commented Jan 5, 2016

2016-01-05 08:49:12: antoine changed status from new to assigned

@totaam
Copy link
Collaborator Author

totaam commented Jan 5, 2016

2016-01-05 08:49:12: antoine changed owner from afarr to antoine

@totaam
Copy link
Collaborator Author

totaam commented Jan 5, 2016

2016-01-05 08:49:12: antoine commented


I will backport the switch from pdf to postscript for osx (which is what "fixes" landscape printing).

Noted the lack of effect from the XPRA_DEFAULT_CUPS_OPTIONS=orientation-requested=landscape, I will try to find the time to play with this again, but not going to worry too much about it since we have a working fix.

For the "failed to freeze" error, see #835#comment:26.

@totaam
Copy link
Collaborator Author

totaam commented Jan 5, 2016

2016-01-05 13:13:44: antoine changed status from assigned to new

@totaam
Copy link
Collaborator Author

totaam commented Jan 5, 2016

2016-01-05 13:13:44: antoine changed owner from antoine to afarr

@totaam
Copy link
Collaborator Author

totaam commented Jan 5, 2016

2016-01-05 13:13:44: antoine commented


Backport to v0.16.x in 11593.
Also pushed a beta osx build with this change, can you please check that this doesn't break anything before I post the next 0.16.x stable update.

@totaam
Copy link
Collaborator Author

totaam commented Jan 5, 2016

2016-01-05 23:55:31: afarr changed owner from afarr to antoine

@totaam
Copy link
Collaborator Author

totaam commented Jan 5, 2016

2016-01-05 23:55:31: afarr commented


Looks like there're some sound bugs in the 0.16.1 builds.. and a vestigial "frozen" variable bit (maybe from fix moved to 835).

Put details into #1076.

@totaam
Copy link
Collaborator Author

totaam commented Jan 6, 2016

2016-01-06 03:10:56: antoine changed owner from antoine to afarr

@totaam
Copy link
Collaborator Author

totaam commented Jan 6, 2016

2016-01-06 03:10:56: antoine commented


The "frozen" bit should be fixed, in any case it should not interfere with printing.. except that the log will fill up very quickly and make it hard to work with.

@totaam
Copy link
Collaborator Author

totaam commented Jan 11, 2016

2016-01-11 20:25:39: afarr changed status from new to closed

@totaam
Copy link
Collaborator Author

totaam commented Jan 11, 2016

2016-01-11 20:25:39: afarr set resolution to fixed

@totaam
Copy link
Collaborator Author

totaam commented Jan 11, 2016

2016-01-11 20:25:39: afarr commented


Ok, tested with lots of those "run all night" and all the other functionality that I could think of... looks good and stable for 0.16.1 release (testing with 0.16.1 11604 osx client against 0.16.1 r11617 fedora 23 server). Also tested printing with 0.16.1 11604 windows client, seems to work as expected.

I think it is good enough to close this ticket.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant