Pdfcropmargins

Latest version: v2.1.2

Safety actively analyzes 628969 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 5 of 7

1.0.1

Not secure
------------------

Changes:

* Globs are now applied in Python to file arguments on non-Windows systems (in
addition to Windows systems). This way they work in the Python interface as
well as from a shell like Bash that expands them before passing them. In the
unlikely case that a glob character is in an actual PDF file name it might
need to be quoted twice (once escaped). Shell variables are now also
expanded in Python if detected.

Bug fixes:

* The program no longer attempts to glob user-supplied output filenames, which
was issuing an unnecessary warning (due to a recent change).

1.0.0

Not secure
------------------

New features:

* The MuPDF program can now be used to calculate the crops. This is done
in-memory, and tends to be fast. It requires PyMuPDF to be installed in
Python -- it is already installed with the GUI option, or can be
user-installed enable the option without the GUI dependencies. This is now
the default method of cropping if PyMuPDF is detected and importable. To
force using this method, use the ``--calcbb m`` or ``-c m`` option.

* The preferred way to select the method of calculating bounding boxes has
changed. Use ``--calcbb`` or the shortcut ``-c`` with one of 'm' (MuPDF),
'p' (pdftoppm), 'gr' (Ghostscript rendering), or 'gb' (direct Ghostscript
bounding box calculation) as the argument. The default selection sequence is
'd'. Passing 'o' reverts to the older (before MuPDF) default sequence.

* The default rendering resolution is now 72 dpi instead of 150 dpi.
Resolution can still be set with the ``-x`` and ``-y`` options.

* A new option flag ``--percentText`` which changes the interpretation of
the percentage values passed to ``--percentRetain`` and ``--percentRetain4``.
With this flag the left and right margins are set to a percentage of the
bounding box width and the top and bottom margins are set to a percentage
of the bounding box height.

Bug fixes:

* Remove a debug print statement of bounding boxes that was left after a 0.2.10
negative-threshold fix.

* Fixed bug in ``--version`` argument.

* Improved sizing of GUI windows.

0.2.123456

-------------------------

Bug fixes:

* Fixed a recently-introduced bug in GUI events when running Python2.

* Drop Pillow requirement for Python 2 (versions newer than 7.0.0 not supported
and have security vulnerabilities). Add a warning on importing old Pillow
versions they might have installed or choose to install. Also include
``typing`` backport requirement for Python 2 versions of PySimpleGUI27.

* Import ``readline`` so prompts are sent to stdout instead of stderr, except
on Windows Python which doesn't support readline.

0.2.3456

-----------------------

New features:

* Added a command to write the crops to a file, mostly for testing and debugging.

Bug fixes:

* Fixed a bug with catching signals on Windows systems.

* Fixed a bug with Windows finding the fallback pdftoppm from setup.py installs.

* Fixed a faulty warning about thresholds with gs introduced with the GUI mode.

0.2.78

---------------------

New features:

* Negative threshold values are now allowed, and reverse the test for
background vs. foreground. This can be used for PDFs with dark backgrounds
and light foregrounds.

Bug fixes:

* Minor improvements.

0.2.012

-------------------------

* Updated documentation.

* Removed typing dependency (fixed in PySimpleGUI27).

Page 5 of 7

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.