As a separate matter, I believe a useful complement to support in img2pdf might be a utility to merge the "stripped form" as stored in PDF back into an actual JBIG2 file, similar to the…
So now the only remaining piece we need is some way to identify the file as JBIG2. Any ideas?
This seems quite impossible, which is a job of pdfimages
. I don't know whether they are…
It is then natural to select some of them to assemble another pdf file.
Unless you need to edit the images, it might be easiest to work with the PDF document and a tool like pdftk or…
Oh, I see, it is not lossless - JBIG2
has only 1 bit per pixel, while the original JPEG
has 8 bits per pixel.
But why do you insist on using jbig2enc in the first place? I cannot find any bilevel image where using jbig2 leads to any significant space reduction compared to the compression that img2pdf uses…
Okay, I obtained a PDF containing a JBIG2 encoded image. This is becoming more troublesome... Instead of just containing one blob per image, the PDF contains two blobs for each image. One is the…
The next issue: with jbig2enc not being present in Linux distros and being encumbered by patents and no JBIG2 support in imagemagick or PIL, I cannot add any testcases for JBIG2 support to the…
I did some test and seemingly the size data (height, weight, xppi, yppi)
is contained in the JBIG2 stream (not the head). I pass the JBIG2 stream generated by pdfimages
to the code…
Thanks for the explanations. However, it seems to me that this answer claims that there are "header" and "tail" in a "normal" JBIG2 file which are "stripped"…
Maybe I misunderstood something. In the manpage of pdfimages
, the "formats" JPEG
, JPEG2000
, JBIG2
and CCITT
are listed in parallel, and I think that if I specify -png
, it would induce a…
Thanks. Let me first open a feature request at pdfimages
. However, it seems to me that neither are the real JBIG2
images supported by img2pdf
?
The pdf
that I am dealing with is not permitted to share (which however consists of many scanned pages), but the result of pdfimages -list
looks like
page num type width height color…