Skip to content

Missing region in PDF #119

@hackerb9

Description

@hackerb9

I have a particular PNG file which I am embedding in a PDF as a JBIG2 stream. However, horizontal and vertical lines are missing from one section in the middle.

$ jbig2 -s -a -p -v schem1.png 
Processing "schem1.png"...
source image: 14816 x 9600 (1 bits) 72dpi x 72dpi, refcount = 1
thresholded image: 14816 x 9600 (1 bits) 72dpi x 72dpi, refcount = 2

$ jbig2topdf.py output >output.pdf

$ convert output.pdf -colorspace gray -depth 1 broken.png

Thumbnail of JBIG2 embbed in a PDF showing a bug where lines are missing


I have tried various PDF viewers plus web browsers and ImageMagick, and the problem is always the same. My guess is it is a bug in the PDF section of the jbig2enc code as normal JBIG2 output looks fine:

$ jbig2 schem1.png | jbig2dec /dev/stdin -o works.png

Thumbnail of JBIG2 not embedded in a PDF and no bug is apparent

Metadata

Metadata

Assignees

No one assigned

    Labels

    WontFixNo activity is planned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions