Bug 18550 - Patron card creator: Print output does not respect layout units
Summary: Patron card creator: Print output does not respect layout units
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Label/patron card printing (show other bugs)
Version: master
Hardware: All All
: P5 - low normal (vote)
Assignee: Marc Véron
QA Contact: Marcel de Rooy
URL:
Keywords:
Depends on: 18541
Blocks: 19264
  Show dependency treegraph
 
Reported: 2017-05-05 13:04 UTC by Marc Véron
Modified: 2019-05-14 05:20 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 18550 - Patron card creator: Print output does not respect layout units (8.08 KB, patch)
2017-05-05 13:13 UTC, Marc Véron
Details | Diff | Splinter Review
Bug 18550 - Patron card creator: Print output does not respect layout units (7.54 KB, patch)
2017-05-07 09:54 UTC, Marc Véron
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 18550 - Patron card creator: Print output does not respect layout units (7.61 KB, patch)
2017-05-10 08:41 UTC, Josef Moravec
Details | Diff | Splinter Review
Follow-up: Add POD descriptions to subs (1.17 KB, patch)
2017-09-07 12:52 UTC, Marc Véron
Details | Diff | Splinter Review
Bug 18550 - Patron card creator: Print output does not respect layout units (7.69 KB, patch)
2017-10-06 07:07 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 18550: [Follow-up] Add POD descriptions to subs (1.22 KB, patch)
2017-10-06 07:07 UTC, Marcel de Rooy
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Marc Véron 2017-05-05 13:04:38 UTC
Text, images and barcode positions are always layed out based on PostScript points, regardless of unit defined in card layout.

To reproduce:
- Test on top of Bug 18584 (introduces layout grid)
- Create a card layout wir a text field, an image and barcode. Use points 
  as layout unit
- Activate layout grid
- Create PDF output, save.
- Change layout unit to mm.
- Create PDF output, save.
- Compare PDFs. Verify that the positions are unchanged.
Comment 1 Marc Véron 2017-05-05 13:07:21 UTC
Please test on top of Bug 18541 - Patron card creator: Add a grid to support layout design 
Sorry for wrong bug number in intitial comment.
Comment 2 Marc Véron 2017-05-05 13:13:14 UTC Comment hidden (obsolete)
Comment 3 Marc Véron 2017-05-07 09:54:35 UTC Comment hidden (obsolete)
Comment 4 Josef Moravec 2017-05-10 08:41:36 UTC Comment hidden (obsolete)
Comment 5 Marc Véron 2017-05-18 07:11:52 UTC Comment hidden (obsolete)
Comment 6 Marc Véron 2017-06-20 15:10:09 UTC Comment hidden (obsolete)
Comment 7 Marc Véron 2017-09-07 12:52:24 UTC Comment hidden (obsolete)
Comment 8 Marc Véron 2017-09-19 15:22:26 UTC
Still applies on current master. 
Would be nice to have it in next release because current behaviour is really a malfunction.
Comment 9 Marcel de Rooy 2017-10-06 07:07:30 UTC
Created attachment 67670 [details] [review]
Bug 18550 - Patron card creator: Print output does not respect layout units

To reproduce:
Text, images and barcode positions are always layed out based on PostScript points, regardless of unit defined in card layout.

To reproduce:
- Test on top of Bug 18541 (introduces layout grid)
- Create a card layout with a text field, an image and a barcode. Use points
  as layout unit
- Activate layout grid
- Create PDF output, save
- Change layout unit to mm
- Create PDF output, save
- Compare PDFs. Verify that the positions are unchanged (still using points)

To test:
- Apply patch
- Create again PDF
- Verify that elements are positionad as expected (using unit, e.g. mm)
- Bonus test: Repeat with other units

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 10 Marcel de Rooy 2017-10-06 07:07:34 UTC
Created attachment 67671 [details] [review]
Bug 18550: [Follow-up] Add POD descriptions to subs

This patch simply adds POD descriptions to subs affected by first patch.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 11 Marcel de Rooy 2017-10-06 07:10:47 UTC
QA Comment:
Testing Patron Card from scratch is not very intuitive. The code changes dont look bad. I loose my barcode when I use this patch set, but I trust that the test results of Mark and Josef are based on better card templates etc.
Comment 12 Jonathan Druart 2017-10-06 15:17:29 UTC
Pushed to master for 17.11, thanks to everybody involved!
Comment 13 Fridolin Somers 2017-10-23 14:58:35 UTC
Depends on Bug 18541 that is not in 17.05.x