I am learning to write Postscript by hand. I've taken a JBIG2 image from the link below (amb_1.jb2 is used in the example here: http://jbig2dec.sourceforge.net/ubc/main.html) and I have added it to to a stream inside of a PDF file.
The PDF in question is here. https://gist.github.com/brandonprry/277cbbc581be4e8eaa403a16403a6996
There are no errors opening it in any of the PDF readers I have tried, but the image isn't rendered.
What am I missing for rendering the embedded JBIG2 image stream (9 0 obj)? Using the MuPDF tool 'mutool info', it recognizes the PDF contains a JBIG2 image stream, but it still doesn't render it as far as I can tell.
./mutool info /media/psf/Home/tmp/testcases/0adcc9f8-c421-47d6-93ad-9f6efc2e360b.pdf
/media/psf/Home/tmp/testcases/0adcc9f8-c421-47d6-93ad-9f6efc2e360b.pdf:
PDF-1.4
Info object (3 0 R):
<</CreationDate(D:20051122152833-05'00')/Creator(PdfCompressor 3.0.84)/Producer(CVISION Technologies)>>
Pages: 1
Retrieving info from pages 1-1...
Mediaboxes (1):
1 (7 0 R): [ 0 0 967.68 1728 ]
Fonts (3):
1 (7 0 R): Type1 'Helvetica' (4 0 R)
1 (7 0 R): Type1 'Times-Roman' (5 0 R)
1 (7 0 R): Type1 'Courier' (6 0 R)
Images (1):
1 (7 0 R): [ ASCIIHex JBIG2 ] 10x10 1bpc DevGray (9 0 R)
I've noticed this stack overflow post that notes the magic header is not supposed to be included, which I currently am in the above example.
jbig2 data in pdf is not valid jbig2 data. Wrong magic
With or without the 8-byte header in the JBIG2 stream, no errors are printed and no image is rendered.
Any thoughts are much appreciated.