@@ -, +, @@ the 1-Page order PDF - The text "Order number must appear on all related correspondence, shipping papers and invoices. Notify us immediately if you are unable to supply item(s)." appears above the order table. - The page numbers at the bottom of the first page are not obscured by - That the order table starts near the top of the second page, and not to split text over multiple lines) and save - The text above the order table is what you saved in the - The page numbers at the bottom of the first page are not obscrued by - That the order table starts near the top of the second page and not --- Koha/pdfformat/layout1page.pm | 11 +++++++++++ .../bug_33393-add_1PageOrderPDFText.pl | 10 ++++++---- .../intranet-tmpl/prog/pdf/layout1page.odt | Bin 10258 -> 10968 bytes .../intranet-tmpl/prog/pdf/layout1page.pdf | Bin 19437 -> 9291 bytes 4 files changed, 17 insertions(+), 4 deletions(-) --- a/Koha/pdfformat/layout1page.pm +++ a/Koha/pdfformat/layout1page.pm @@ -140,6 +140,7 @@ sub printhead { my $billing_library = Koha::Libraries->find( $basketgroup->{billingplace} ); my $delivery_library = Koha::Libraries->find( $basketgroup->{deliveryplace} ); my $freedeliveryplace = $basketgroup->{freedeliveryplace}; + my $ordersentences = C4::Context->preference("1PageOrderPDFText"); # open 1st page (with the header) my $page = $pdf->openpage(1); @@ -162,6 +163,16 @@ sub printhead { $text->translate(107/mm, ($height-67)/mm); $text->text($libraryname); + # print text defined in 1PageOrderPDFText syspref + $text->font( $pdf->corefont("Times", -encoding => "utf8"), 4/mm ); + my @allLines = split/\n+/, $ordersentences; + my $count = 0; + foreach my $ordersentence ( @allLines ) { + $count+=4; + $text->translate(15/mm, ($height-(105 + $count ))/mm); + $text->text( $ordersentence ); + } + $text->font( $pdf->corefont("Times", -encoding => "utf8"), 4/mm ); $text->translate(107/mm, ($height-71)/mm); $text->text($billing_library->branchname); --- a/installer/data/mysql/atomicupdate/bug_33393-add_1PageOrderPDFText.pl +++ a/installer/data/mysql/atomicupdate/bug_33393-add_1PageOrderPDFText.pl @@ -1,13 +1,15 @@ use Modern::Perl; return { - bug_number => "33393", + bug_number => "33393", description => "Modify sentence above the order table in English 1-page order PDF", - up => sub { + up => sub { my ($args) = @_; - my ($dbh, $out) = @$args{qw(dbh out)}; + my ( $dbh, $out ) = @$args{qw(dbh out)}; - $dbh->do(q{INSERT IGNORE INTO systempreferences (variable,value,options,explanation,type) VALUES ('1PageOrderPDFText', 'Order number must appear on all related correspondence, shipping papers and invoices. Notify us immediately if \n you are unable to supply item(s).', NULL, 'Text to be used above the order table in the 1-page order PDF file', 'textarea') }); + $dbh->do( + q{INSERT IGNORE INTO systempreferences (variable,value,options,explanation,type) VALUES ('1PageOrderPDFText', 'Order number must appear on all related correspondence, shipping papers and invoices. Notify us immediately if \n you are unable to supply item(s).', NULL, 'Text to be used above the order table in the 1-page order PDF file', 'textarea') } + ); say $out "Added system preference '1PageOrderPDFText'"; },