Commit graph

15 commits

Author SHA1 Message Date
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.
2017-08-20 21:19:23 +09:00
Stephan Richter
b25098c3f0 Python 2 does not automatically convert integers to floats, so we have to be a bit more explicit. 2017-05-22 19:34:34 +02:00
Stephan Richter
18d637ea34 Make sure we are using the correct IO class in Python 2. 2017-05-22 12:31:52 -04:00
16993964ce restore pep8 compliance 2017-01-20 09:19:30 +01:00
8476e333cd src/tests/__init__.py: add support for multiframe gif tests 2017-01-20 08:47:58 +01:00
962d4dbdfb Make pep8 compliant again 2017-01-19 11:22:08 +01:00
James R. Barlow
eedf73e73e Add test cases for CCITT G4 2016-07-22 07:09:35 +02:00
e05d2992e0 src/tests/__init__.py: adapt testcases for last commit 2016-05-26 18:11:42 +02:00
27015c1a6e fix testsuite after exception renaming 2016-02-17 00:26:45 +01:00
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
2016-02-02 19:51:27 +01:00
josch
d5fc324b7b cater for python-pil versions without close() attribute (the 3rd fix) 2015-03-07 03:02:00 +01:00
josch
b90e385efe cater for python-pil versions without close() attribute (the 2nd fix) 2015-03-07 03:01:02 +01:00
Jakub Wilk
5d7975164d remove unused imports 2015-03-06 22:51:58 +01:00
josch
aabd104114 update tests handling 2015-02-16 19:23:21 +01:00
Stephan Richter
db7e74bcfe Added tests for the package. 2014-03-14 19:18:38 +01:00