in reply to Re: Merging images into the content of a PDF document
in thread Merging images into the content of a PDF document

Thanks a lot... this solution works... to an extent.

The images really seem to be inlined. That is, say $content really outputs the binary stream as it should. However, when the PDF is viewed in Reader, no images are shown. It's as if they're drawn in white color on white background... completely invisible, but I'm sure they're there.

Any idea what could cause the problem?

Replies are listed 'Best First'.
Re^3: Merging images into the content of a PDF document
by vr (Curate) on May 23, 2018 at 10:03 UTC

    It's not "white color on white background", it's emptiness -- syntax error in content makes Reader to abort rendering (silently, because users are not be alarmed, no-no). Solution works to extent of file it was tested with (since you didn't provide any). And, like I said: what entries are allowed in inline image description, what values are they allowed to have, did you check the manual? SMask is definitely not allowed. Rather, it would be ignored, if it wasn't indirect object. I suspect same as above: "0 R" between BI and ID keywords, but maybe forbidden colorspace or compression, whatever. Arbitrarily deleting soft mask will probably result in change of appearance.

    And it's definitely not Perl anymore :)