Revision f4958a2b
Von Moritz Bunkus vor mehr als 10 Jahren hinzugefügt
SL/Helper/CreatePDF.pm | ||
---|---|---|
33 | 33 |
$form->{format} = 'pdf'; |
34 | 34 |
$form->{cwd} = getcwd(); |
35 | 35 |
$form->{templates} = $::instance_conf->get_templates; |
36 |
$form->{IN} = $params{template} . '.tex';
|
|
36 |
$form->{IN} = $params{template}; |
|
37 | 37 |
$form->{tmpdir} = $form->{cwd} . '/' . $userspath; |
38 |
my ($suffix) = $params{template} =~ m{\.(.+)}; |
|
38 | 39 |
|
39 | 40 |
my $vars = $params{variables} || {}; |
40 | 41 |
$form->{$_} = $vars->{$_} for keys %{ $vars }; |
... | ... | |
42 | 43 |
my $temp_fh; |
43 | 44 |
($temp_fh, $form->{tmpfile}) = File::Temp::tempfile( |
44 | 45 |
'kivitendo-printXXXXXX', |
45 |
SUFFIX => '.tex',
|
|
46 |
SUFFIX => ".${suffix}",
|
|
46 | 47 |
DIR => $userspath, |
47 | 48 |
UNLINK => ($::lx_office_conf{debug} && $::lx_office_conf{debug}->{keep_temp_files})? 0 : 1, |
48 | 49 |
); |
Auch abrufbar als: Unified diff
CreatePDF-Helfer: create_pdf: Extension muss bereits übergeben werden