Bug 18465 - Patron card creator: Print on duplex card printer
authorMarc Véron <veron@veron.ch>
Thu, 20 Apr 2017 18:43:11 +0000 (20:43 +0200)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Thu, 6 Jul 2017 17:52:54 +0000 (14:52 -0300)
commit65c32eee8eef7102544a579a2a68c7ebb4a6b0bd
tree3574c4d9279d1b9180965d249ed61ea0f4b769f5
parente29163af4cde7ce33060716091726e6fa2eef65e
Bug 18465 - Patron card creator: Print on duplex card printer

Card printers with duplex functionality need as input a PDF file where odd pages contain
the front side and even pages the back side of the cards.

This patch adds such functionality.

To prepare test:
- In Patron card creator > Templates, prepare a 1 up template (1 column / 1 row) that
  fits to a single card. Give it a name like 'Duplex card template'
  (Attention, Card with and Card height seem to have wrong labels, that will go
  to a separate bug).
- In Patron card creator > Layouts create a layout for the front side and one for
  the back side. Give them names to easily remember (Card front layout, Card back layout)
- Go to Patron card creator > Batches and test both layouts together with the
  1 up template. Save and keepp both test files as reference.

To test:
- Apply patch. Restart memcached and plack.
- Go to Patron card creator > Batches
- Click "Export" for a batch
- In the following screen, note the new field "Select a layout for the back side"
  with a hint what it is used for
- Leave it on 'Back side layout not used', export and compare output with test ooutput
  from preparation. It should be the same
- Select the layout you prepared for the back side.
- Export - this file should contain 2 PDF pages per patron, one first with the
  front side, second with the back side.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
koha-tmpl/intranet-tmpl/prog/en/modules/help/patroncards/manage.tt
koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/print.tt
patroncards/create-pdf.pl
patroncards/print.pl