use strict;
+use SL::Webdav;
+
use Exporter 'import';
our @EXPORT_OK = qw(create_massprint_pdf merge_massprint_pdf create_pdfs print_pdfs);
our %EXPORT_TAGS = (
my $pdf_filename = $self->create_pdf(%create_params);
+ if ($::instance_conf->get_webdav_documents && !$form->{preview}) {
+ my $webdav = SL::Webdav->new(
+ type => $params{document}->type,
+ number => $params{document}->record_number,
+ );
+ my $webdav_file = SL::Webdav::File->new(
+ webdav => $webdav,
+ filename => $form->{attachment_filename},
+ );
+ eval {
+ $webdav_file->store(file => $pdf_filename);
+ 1;
+ } or do {
+ push @{ $params{errors} }, $@ if exists $params{errors};
+ }
+ }
+
if ( $::instance_conf->get_doc_storage && ! $form->{preview}) {
$self->append_general_pdf_attachments(filepath => $pdf_filename, type => $form->{type} );
$form->{tmpfile} = $pdf_filename;
before printing is done
+Recognized parameters are (not a complete list):
+
+=over 2
+
+=item * C<errors> – optional. If given, it must be an array ref. This will be
+filled with potential errors.
+
+=back
+
=head1 AUTHOR