forked from josch/img2pdf
1
0
Fork 0
Commit Graph

46 Commits (main)

Author SHA1 Message Date
Johannes 'josch' Schauer 000fc3b5ac
remove obsolete src/tests/__init__.py 4 years ago
James R. Barlow bca3f802ac
Add support for pikepdf 4 years ago
Johannes 'josch' Schauer 1cd2674a2c
src/tests/__init__.py: recursively convert both PDFs into Python data structures and then compare for equality -- this allows comparing PDFs in which streams are compressed differently 4 years ago
Johannes 'josch' Schauer f4b296cef3
src/tests/__init__.py: make path OS agnostic (slash vs backslash) 4 years ago
Johannes 'josch' Schauer 5c7ffb09a1
src/tests/__init__.py: add support for engine instead of with_pdfrw 4 years ago
Johannes 'josch' Schauer 997fe8efd8
src/tests/__init__.py: use pikepdf instead of pdfrw 4 years ago
Johannes 'josch' Schauer ceba6a8223
Rip out remaining python3 support
https://www.enricozini.org/blog/2020/python/python-2-is-dead/
4 years ago
Johannes 'josch' Schauer 0bbbc7a31a
pdfrw is now disabled by default if it's not installed (closes: #74) 4 years ago
Georg Sauthoff 2faeb2005d
Decompress stream to account for different possible encodings (closes: #51)
Recompressing the image stream makes the comparison robust against output
preserving changes in the zlib compress output bitstream
(e.g. between different zlib implementations/versions/releases).
Without this, some img2pdf 0.3.2 tests fail on Fedora 29/aarch64.
See also:
josch/img2pdf#51
https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/thread/R7GD4L5Z6HELCDAL2RDESWR2F3ZXHWVX/
5 years ago
Johannes 'josch' Schauer 0639dbd47c
src/tests/__init__.py: fix CommandLineTests on python3 5 years ago
josch 4cebd9f15d Merge branch 'agroszer-py2' into 'master'
fixing a slew of python 2 issues

See merge request !4
5 years ago
Johannes 'josch' Schauer 198c98a5f9
make pep8 compliant 6 years ago
Johannes 'josch' Schauer f5d8d86dff
Also do not re-encode CCITT Group 4 encoded TIFF images
Add additional property of input images: inverted

closes: #47
6 years ago
Johannes 'josch' Schauer 2ad0c036b2
src/tests/input/mono.tif: set dpi to 72 6 years ago
Johannes 'josch' Schauer eec1a25a92
add test case for ccittfaxdecode 6 years ago
Johannes 'josch' Schauer 7de174f4b5
CCITTFaxDecode filter must be in an array 6 years ago
Johannes 'josch' Schauer d931f02709
src/tests/__init__.py: handle PNG input images properly 6 years ago
Johannes 'josch' Schauer b99fae1380
src/tests/__init__.py: don't test for color space now that we support palette PNGs 6 years ago
Johannes 'josch' Schauer ac9ba1d0f6
handle monochrome png properly 6 years ago
Johannes 'josch' Schauer eaf9de23c9
Filter must not be array for PNG output, so never make it an array 6 years ago
Johannes 'josch' Schauer 2a33ff275d
adapt test output to new handling of png input 6 years ago
Johannes 'josch' Schauer ebd8d911bb
add test grayscale input png src/tests/input/gray.png 6 years ago
Johannes 'josch' Schauer e7755f0a87
src/tests/input/normal.png: remove alpha channel 6 years ago
Johannes 'josch' Schauer 3142824bab
src/tests/__init__.py: do not test animation.gif with pdfrw because it doesn't support hexadecimal palette data 6 years ago
James R. Barlow a8269391e9 Implement /UserUnit scaling to support oversized PDFs
The original PDF specification supported a maximum of 200x200" pages or
14400 PDF units. In PDF 1.6 rather than remove this limitation, Adobe
added the /UserUnit field for pages, which allows one to specify the
scaling that should be applied for user-facing numbers, while keeping
the internal limit of 14400 units.

Many real-world designs are larger than 200" in one direction. One
example is tractor feed or rolled paper which may be easier to scan in
one continuous run rather than segment into pages.

/UserUnit is independent of the pixel size and resolution of the image.

/UserUnit can also indicate very small page sizes but this is not
implemented here.
7 years ago
Adam Groszer 0e76a5bd97 fixing a slew of python 2 issues 7 years ago
Stephan Richter b25098c3f0 Python 2 does not automatically convert integers to floats, so we have to be a bit more explicit. 7 years ago
Stephan Richter 18d637ea34 Make sure we are using the correct IO class in Python 2. 7 years ago
Johannes 'josch' Schauer 16993964ce restore pep8 compliance 7 years ago
Johannes 'josch' Schauer 60b2e2206a Add multiframe gif (animated gif) test case 7 years ago
Johannes 'josch' Schauer 8476e333cd src/tests/__init__.py: add support for multiframe gif tests 7 years ago
Johannes 'josch' Schauer e4b6854eb5 src/tests/output/mono.png.pdf: remove the /Producer field 7 years ago
Johannes 'josch' Schauer 962d4dbdfb Make pep8 compliant again 7 years ago
Johannes 'josch' Schauer c2f43a579e src/tests/output/mono.png.pdf: remove timestamps 7 years ago
James R. Barlow eedf73e73e Add test cases for CCITT G4 8 years ago
Johannes 'josch' Schauer e05d2992e0 src/tests/__init__.py: adapt testcases for last commit 8 years ago
Johannes 'josch' Schauer 27015c1a6e fix testsuite after exception renaming 8 years ago
josch 251238b410 release version 0.2.0 - big rewrite and lots of new features
- 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
8 years ago
josch d5fc324b7b cater for python-pil versions without close() attribute (the 3rd fix) 9 years ago
josch b90e385efe cater for python-pil versions without close() attribute (the 2nd fix) 9 years ago
josch 9389d81a14 fix testsuite after commit 2cb8e55f broke it - thanks Jakub Wilk! 9 years ago
Jakub Wilk 5d7975164d remove unused imports 9 years ago
josch aabd104114 update tests handling 9 years ago
josch 3fdd824201 support file objects as input 9 years ago
Erik Jensen c68ce6a48d Add CMYK test images 9 years ago
Stephan Richter db7e74bcfe Added tests for the package. 10 years ago