Bugzilla – Attachment 45659 Details for
Bug 8352
Add automatic printing of 'hold to pull' notices
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 8352 [QA Followup] - Remove use of HTML::HTMLDoc
Bug-8352-QA-Followup---Remove-use-of-HTMLHTMLDoc.patch (text/plain), 2.45 KB, created by
Kyle M Hall (khall)
on 2015-12-14 14:51:14 UTC
(
hide
)
Description:
Bug 8352 [QA Followup] - Remove use of HTML::HTMLDoc
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2015-12-14 14:51:14 UTC
Size:
2.45 KB
patch
obsolete
>From 4a25ced09c2acebe1525b01c55d9b09d08fe0099 Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Mon, 14 Dec 2015 14:45:57 +0000 >Subject: [PATCH] Bug 8352 [QA Followup] - Remove use of HTML::HTMLDoc > >--- > C4/Installer/PerlDependencies.pm | 5 ----- > Koha/Printer.pm | 24 ++++++++++++++++++------ > debian/control.in | 2 ++ > 3 files changed, 20 insertions(+), 11 deletions(-) > >diff --git a/C4/Installer/PerlDependencies.pm b/C4/Installer/PerlDependencies.pm >index 08b0287..dd79bf8 100644 >--- a/C4/Installer/PerlDependencies.pm >+++ b/C4/Installer/PerlDependencies.pm >@@ -632,11 +632,6 @@ our $PERL_DEPS = { > 'required' => '0', > 'min_ver' => '1.11', > }, >- 'HTML::HTMLDoc' => { >- 'usage' => 'Push to printer', >- 'required' => '0', >- 'min_ver' => '0.10', >- }, > 'File::Temp' => { > 'usage' => 'Plugins', > 'required' => '0', >diff --git a/Koha/Printer.pm b/Koha/Printer.pm >index c7965e2..da0385a 100644 >--- a/Koha/Printer.pm >+++ b/Koha/Printer.pm >@@ -50,12 +50,24 @@ sub print { > return unless ($data); > > if ($is_html) { >- require HTML::HTMLDoc; >- my $htmldoc = new HTML::HTMLDoc(); >- $htmldoc->set_output_format('ps'); >- $htmldoc->set_html_content($data); >- my $doc = $htmldoc->generate_pdf(); >- $data = $doc->to_string(); >+ require PDF::FromHTML; >+ require File::Temp; >+ require File::Slurp; >+ >+ my ( $pdf_fh, $pdf_filename ) = File::Temp::tempfile(); >+ my ( $ps_fh, $ps_filename ) = File::Temp::tempfile(); >+ >+ my $pdf = PDF::FromHTML->new( encoding => 'utf-8' ); >+ my $pdf_data; >+ $pdf->load_file( \$data ); >+ $pdf->convert(); >+ $pdf->write_file( $pdf_filename ); >+ >+ `pdf2ps $pdf_filename $ps_filename`; >+ >+ $data = File::Slurp::read_file( $ps_filename ); >+ >+ unlink( $pdf_filename, $ps_filename ); > } > > my ( $result, $error ); >diff --git a/debian/control.in b/debian/control.in >index ad9b891..11c3ef7 100644 >--- a/debian/control.in >+++ b/debian/control.in >@@ -22,6 +22,7 @@ Depends: ${misc:Depends}, ${koha:Depends}, > cron-daemon, > daemon, > debconf, >+ ghostscript, > idzebra-2.0, > libjs-jquery, > mysql-client | virtual-mysql-client, >@@ -70,6 +71,7 @@ Depends: ${misc:Depends}, > cron-daemon, > daemon, > debconf, >+ ghostscript, > idzebra-2.0, > libjs-jquery, > mysql-client | virtual-mysql-client, >-- >1.7.10.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 8352
:
10627
|
10766
|
12523
|
13465
|
14394
|
16338
|
16543
|
27127
|
28333
|
28334
|
28335
|
28651
|
28652
|
28653
|
28654
|
36833
|
36834
|
40749
|
40750
|
40751
|
41579
|
41580
|
41581
|
41582
|
41583
|
44359
|
44360
|
44361
|
44362
|
44363
|
45275
|
45276
|
45277
|
45278
|
45279
|
45362
|
45365
|
45651
|
45652
|
45653
|
45654
|
45655
|
45656
|
45657
|
45658
|
45659
|
46878
|
46879
|
46880
|
46881
|
46882
|
46883
|
46884
|
48127
|
48128
|
48129
|
48130
|
48131
|
48132
|
48133
|
48134
|
48135