]> git.koha-community.org Git - koha.git/commit
Bug 7952 - PDF::Reuse under plack writes to console STDOUT instead to browser
authorDobrica Pavlinusic <dpavlin@rot13.org>
Thu, 12 Apr 2012 22:20:00 +0000 (00:20 +0200)
committerJared Camins-Esakov <jcamins@cpbibliography.com>
Sat, 11 Aug 2012 11:29:22 +0000 (07:29 -0400)
commitdb56039e36206e4db742da643b2d025f9e0a06a5
tree24a018266647dd26c4a67f569c10b7c7e38fd315
parent6b79121f39c0f97ed3c66b2598192b82445b126c
Bug 7952 - PDF::Reuse under plack writes to console STDOUT instead to browser

Without name option to prFile, PDF::Reuse opens '-' file which is real
console STDOUT on plack so pdf file gets emited to terminal instead of
sending it to browser.

This change creates temporary file using File::Temp, pass it to PDF::Reuse
and then reads it back and prints it out for plack (or CGI) to pick up.

Test secenario:

1. Home › Tools › Patron Card Creator › Manage Card Batches
2. select batch checkbox and click Export
3. select template and click Export
4. click on pdf file to download it

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
(cherry picked from commit e2e80737d354323be820e4176c2a965440ff089b)

Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
C4/Creators/PDF.pm