gray bitmap destroyed as importpage manipulates data?

"ybosso73" <[email protected]> Sat, 27 Oct 2007 15:05:48 -0000
Newsgroups gmane.comp.lang.perl.modules.pdfapi2
Message-ID <[email protected]>
Hello folks!

On PDF::API2 Rev 2.11 I'm using kind of this snippet:

--- snip ---

use PDF::API2;

$quelle = PDF::API2->open("test.pdf")
    || die "Konnte Quell-PDF nicht öffnen!\n";

$ziel=PDF::API2->new(-file => "test_ziel.pdf")
    || die "Konnte Ziel-PDF nicht anlegen!\n";

$seite=$ziel->importpage($quelle, 1, 1);

$ziel->save;
$ziel->end;
$quelle->end;

--- snap ---

or similar.

In "test.pdf" there exists an gray-bitmap, a scan from a newspaper
with a lot of very fair grey-values spotted around.

On importpage this bitmap seems to be manipulated, the result looks
like a mishappened gray to mono conversion (in Photoshop something
like mode-change from "gray" to "bitmap" or alike). However, in the
generated PDF the graphics is still tagged to be "gray".

For sample PDF look at
http://www.schneiderdruck.de/download/test.pdf
and
http://www.schneiderdruck.de/download/test_ziel.pdf

This seems to be happening on any gray-graphics, as also other
examples are available. Did I miss a feature, some "downsampling"`,
"touching", or "conversion" to switch off?

Any hint is greatly appreciated!