Bug#514380: libpdf-api2-perl: corrupts certain PNMs when embedding them

Jeff jffry at posteo.net
Wed Jun 17 08:29:54 BST 2020


I have here what looks like a related problem:

#!/usr/bin/perl -w
use strict;
use PDF::API2;

my $pdf = PDF::API2-> new(-file => 'test.pdf');

my $page = $pdf-> page;
$page->mediabox(2480/300*72*5, 3506/300*72*5);

my $gfx = $page->gfx;
my $img = $pdf->image_pnm(shift);
$gfx->image($img);

$pdf->save;
$pdf->end();


If you unxz the .pnm file, and then run the above script with the pnm
filename as an argument, the resulting PDF is strangely skewed.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: corrupt_no_compression.pnm.xz
Type: application/x-xz
Size: 913372 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/pkg-perl-maintainers/attachments/20200617/7d960dac/attachment-0001.xz>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://alioth-lists.debian.net/pipermail/pkg-perl-maintainers/attachments/20200617/7d960dac/attachment-0001.sig>


More information about the pkg-perl-maintainers mailing list