Implements the proposal detailed at
#112 (comment)
This is a limited implementation of JBIG2, which can be extended to
support multiple pages, symbol tables, and other features of the format
in the future.
To test, I included a test fixture. You can also download 042.bmp (the same
one as @josch already downloaded in #112 (comment)
from https://git.ghostscript.com/?p=tests.git;a=blob_plain;f=jbig2/042.bmp;hb=HEAD
and run the following command:
jbig2 042.bmp | img2pdf > 042.pdf
This results in a small PDF, just as @josch originally found in the
comment mentioned above.
This is my first contribution to this repository so let me know if
something else is needed. Thanks for a great library!
If I understood the code in `jp2.py` correctly, this should now work.
Moreover, Pillow should usually be able to open JP2 files, so `jp2.py` is only a fallback.
- now Python3 only
- pep8 compliant code
- update my email to josch@mister-muffin.de
- move from github to gitlab.mister-muffin.de/josch/img2pdf
- use logging module
- add extensive test suite
- ability to read from standard input
- pdf writer:
- make more compatible with the interface of pdfrw module
- print floats which equal to their integer conversion as integer
- do not print trailing zeroes for floating point numbers
- print more linebreaks
- add binary string at beginning of PDF to indicate that the PDF
contains binary data
- handle datetime and unicode strings by using utf-16-be encoding
- new options (see --help for more details):
- --without-pdfrw
- --imgsize
- --border
- --fit
- --auto-orient
- --viewer-panes
- --viewer-initial-page
- --viewer-magnification
- --viewer-page-layout
- --viewer-fit-window
- --viewer-center-window
- --viewer-fullscreen
- remove short command line options for metadata arguments