From: Moritz Bunkus Date: Fri, 25 Jul 2008 12:50:42 +0000 (+0000) Subject: Das Perl-Modul PDF::API2 ist nun feste Voraussetzung. X-Git-Tag: release-2.6.0beta1~32 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=d43904e8740303c640001b7362eac01d7df019c6;hp=06af498f71c9424b2d373d12b4dd90cdac58e070;p=kivitendo-erp.git Das Perl-Modul PDF::API2 ist nun feste Voraussetzung. --- diff --git a/SL/InstallationCheck.pm b/SL/InstallationCheck.pm index 74cb83e88..96c8a0694 100644 --- a/SL/InstallationCheck.pm +++ b/SL/InstallationCheck.pm @@ -20,10 +20,10 @@ use vars qw(@required_modules @optional_modules); { "name" => "List::Util", "url" => "http://search.cpan.org/~gbarr/" }, { "name" => "Template", "url" => "http://search.cpan.org/~abw/" }, { "name" => "Digest::MD5", "url" => "http://search.cpan.org/~gaas/" }, + { "name" => "PDF::API2", "url" => "http://search.cpan.org/~areibens/" }, ); @optional_modules = ( - { "name" => "PDF::API2", "url" => "http://search.cpan.org/~areibens/" }, ); sub module_available { diff --git a/SL/ReportGenerator.pm b/SL/ReportGenerator.pm index 1c0fa7c53..050984aa3 100644 --- a/SL/ReportGenerator.pm +++ b/SL/ReportGenerator.pm @@ -5,6 +5,8 @@ use IO::Wrap; use List::Util qw(max); use Text::CSV_XS; use Text::Iconv; +use PDF::API2; +use PDF::Table; use SL::Form; @@ -371,9 +373,6 @@ sub prepare_html_content { my $allow_pdf_export = $opts->{allow_pdf_export}; - eval { require PDF::API2; require PDF::Table; }; - $allow_pdf_export |= 1 if (! $@); - my $variables = { 'TITLE' => $opts->{title}, 'TOP_INFO_TEXT' => $self->html_format($opts->{top_info_text}), @@ -921,7 +920,7 @@ Output format. Used by generate_with_headers to determine the format. Supported =item allow_pdf_export -Used to determine if a button for PDF export should be displayed. Default is yes. The PDF button is hidden if neither the Perl module PDF::API2 nor the external applications html2ps and Ghostscript are available regardless of this parameter's value. +Used to determine if a button for PDF export should be displayed. Default is yes. =item allow_csv_export