Closed adghayes closed 2 years ago
Video demo from command line:
@benadida @arsalansufi and @adghayes discussed this synchronously, here is @benadida's summary:
We explored the possibility of using two printer trays, one with 8.5x11, one with 8.5x14, and fully collating. Sadly, doing so reliably, where we know for sure the second tray is connected, in the best of cases requires a large amount of engineering work in
kiosk-browser
's printing support. Without that reliable knowledge, it seems far too easy to end up printing a totally broken test deck, wasting a lot of paper, and frustrating the heck out of the clerk.Solution I think I'm landing on: when HMPBs are 8.5x14, then we do a "best-effort" collation of BMD ballots and test deck expected results by precinct, and then we pause the printing, prompt the user to add 8.5x14 paper, and then print the HMPB ballots, which the admin then has to separate by precinct and match up with the other collated material.
This feels significantly better than what we have today, since printing blanks and overvotes is done automatically, so it's still a big improvement.
And I think the little bit of manual collating is the right tradeoff in this situation.
Closing this ticket as we will not be trying to print out of separate trays. @arsalansufi will open a separate ticket for the flow to prompt users to switch paper when necessary.
Ticket for our new approach! https://github.com/votingworks/vxsuite/issues/1873
Summary
We want to print all L&A materials for each precinct together as an "L&A Package." In the case where ballots are legal size, however, the materials can't all print out of the same tray because a tray can only be loaded with one type of paper at a time. We can, however, split printing across multiple trays.
Hardware Feasibility Research
You can control the source tray (
InputSlot
) with CUPS, and this is already a possible option (paperSource
) inkiosk-browser
'sprint
function. If you don't specify a tray, the defaultInputSlot
isAuto
for which the printer decides based on hardware state (in general, the lowest numbered tray that is available and has paper). If do you specify a tray and paper is not available in that tray, the printer will prompt you to add paper or press a button to use a next available tray. We would have to train users to not press the button and instead load paper in those situations.You can target the optional Tray 3 (
Tray3
) if it is set up properly. First, the printer itself must detect Tray 3. If you attach Tray 3 while the printer is powered on, it will not be detected and is not usable. Tray 3 must be attached before the printer is powered on. Second,Tray3
must be included in the CUPS filters derived from the PPD file. I'm not really sure how that works, but I think the printer provides the PPD file. CUPS updates the PPD file whenever the printer is reconnected or power-cycled. So power cycling the printer with the tray attached should be sufficient to enable targeted printing from Tray 3.We need a way to check that
Tray3
is in the CUPS filters before we attempt split-tray printing for L&A packages. That information is currently not exposed ingetPrinterInfo.
Our list of paper sources is hardcoded so does not reflect state. The currently available trays are listed in/etc/cups/ppd/[printer].ppd
but may be available elsewhere. We need to expose the list onkiosk
. @eventualbuddha or @benadida I suspect you have more insight here.Once we do that, we can check for the presence of Tray 3 from
election-manager
and split jobs accordingly. If we were to skip a check, then jobs sent toTray3
would actually be treated asAuto
and print out of Tray 2.Non-Requirements
Tasks
kiosk-browser
: Expose the options for the InputSlot CUPS filters inkiosk-browser
vxsuite
: Prevent printing L&A materials if the extra tray is required and it is not available & split the jobs appropriately when printed