We have normal pdf created with "Acrobat PDFMaker for Word". It has only 6 pages.
We try to generate a Thumbnail from the PDF per PDF::API2
$file = '2024_Q1_-digitale-Veranstaltungen_de.pdf';
my $data = do {
local $/ = undef;
open my $fh, "<", $file or die "could not open $file: $!";
<$fh>;
};
$pdf = PDF::API2->from_string($data);
# never gets here
my $sp_pdf = new PDF::API2;
eval {
$sp_pdf->import_page($pdf,1,0);
};
if ($@) {
warn $@;
}
my $image = Image::Magick->new;
$error = $image->BlobToImage($sp_pdf->stringify);
It hangs on line 1 (first from_string()) forever, increasing the use resident-memory over time (using 1GB per 300 seconds more)
2024Q1-digitale-Veranstaltungen_de.pdf
Workaround is to encapsulate the "from_string" method with an POSIX::sigaction and alarm(10).
We have normal pdf created with "Acrobat PDFMaker for Word". It has only 6 pages.
We try to generate a Thumbnail from the PDF per PDF::API2
It hangs on line 1 (first from_string()) forever, increasing the use resident-memory over time (using 1GB per 300 seconds more) 2024Q1-digitale-Veranstaltungen_de.pdf
Workaround is to encapsulate the "from_string" method with an POSIX::sigaction and alarm(10).