Bug 4558 - support more printer features in RDP
Summary: support more printer features in RDP
Status: CLOSED WONTFIX
Alias: None
Product: ThinLinc
Classification: Unclassified
Component: Printing (show other bugs)
Version: trunk
Hardware: PC Unknown
: P2 Normal
Target Milestone: 4.10.0
Assignee: Karl Mikaelsson
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-03-12 11:13 CET by Pierre Ossman
Modified: 2019-02-07 16:19 CET (History)
1 user (show)

See Also:
Acceptance Criteria:


Attachments
msgenbw.ppd (5.52 KB, text/plain)
2013-07-03 12:28 CEST, Pierre Ossman
Details
msgencol.ppd (3.45 KB, text/plain)
2013-07-03 12:28 CEST, Pierre Ossman
Details

Description Pierre Ossman cendio 2013-03-12 11:13:53 CET
Currently we use a very basic PostScript printer driver for printer redirection in rdesktop. This unfortunately means that we cannot support fancy features like control of colour mode, duplex printing or other settings the printer might have.

Supporting every possible setting the printer might have is not possible without abandoning the principle of a single printer driver. But we could try to support a few more of the standard features.

One solution to this might be to implement XPS support (bug 3804). Another is to have a more competent PostScript driver. The latter could be done by shipping a PPD in wtstools (the actual driver is included with all versions of Windows).
Comment 2 Pierre Ossman cendio 2013-07-03 11:05:22 CEST
Microsoft's PostScript driver is documented here:

http://msdn.microsoft.com/en-us/library/windows/hardware/ff556561%28v=vs.85%29.aspx

PPD specification:

http://partners.adobe.com/public/developer/en/ps/5003.PPD_Spec_v4.3.pdf

The above includes a list of standard options that we could include.
Comment 3 Pierre Ossman cendio 2013-07-03 11:21:58 CEST
Also see bug 4362.
Comment 4 Pierre Ossman cendio 2013-07-03 12:28:06 CEST
Created attachment 482 [details]
msgenbw.ppd

Microsoft's "generic" PostScript PPD (B/W).
Comment 5 Pierre Ossman cendio 2013-07-03 12:28:37 CEST
Created attachment 483 [details]
msgencol.ppd

Colour ditto.
Comment 6 Pierre Ossman cendio 2013-07-03 12:50:40 CEST
I can't find any explicit list of versions of Windows that includes their PostScript driver. But since they still have updated development pages up, I'd wager it's available on all current versions of Windows.
Comment 7 Pierre Ossman cendio 2013-07-03 14:07:25 CEST
We might need to read the options out of the PostScript from rdesktop and convert them to command line arguments. See this patch from debian/ubuntu:

  * debian/patches/read-embedded-options-from-incoming-postscript-and-add-to-ipp-attrs.dpatch:
    Make CUPS reading all option settings in PostScript print jobs and add
    the option settings to the filter command line before starting the filter
    chain. This fixes the problem that in the PDF printing workflow (where
    incoming PostScript gets converted to PDF by pstopdf) option settings
    embedded in the incoming PostScript code do not get obeyed. Especially
    the options of jobs from Windows clients get ignored.

We can't assume that the local cups has this patch applied.
Comment 8 Pierre Ossman cendio 2013-07-04 11:43:59 CEST
Another interesting problem is printer settings. Driver queues are created and destroyed with the session, so there is no easy way for the administrator to control the settings.

RDP allows persistent printer settings by sending over a blob to the client and expecting it back on subsequent connections. We could exploit this is we can figure out the format of the blob and prepare one before connect.
Comment 9 Pierre Ossman cendio 2013-07-08 13:30:11 CEST
The following standardised PPD fields could be of interest to us:

 - *InputSlot: Lower Middle Upper Manual Envelope LargeCapacity
 - *PageSize/*PageRegion: Letter Legal Tabloid A3 A4 A5
 - *OutputBin: Upper Lower Rear
 - *TraySwitch: True False
 - *Duplex: DuplexTumble, DuplexNoTumble SimplexTumble None
 - *Collate: True False
 - *Sorter: True False
Comment 10 Pierre Ossman cendio 2013-07-08 13:33:43 CEST
Missed one:

 - *ColorModel: CMYK Gray

Possibly also:

 - *Resolution: 150dpi 300dpi 600dpi 1200dpi
Comment 12 Pierre Ossman cendio 2019-02-07 16:02:55 CET
rdesktop (and associated tools) is being removed from the ThinLinc product.

Note You need to log in before you can comment on or make changes to this bug.