You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
pdfcat and pagerange.py: error handling, stdout, misc.
modified: LICENSE
Added Steve Witham <switham_github@mac-guyver.com>
modified: PyPDF2/pagerange.py
Fixed some error handling.
Made parse_filename_page_ranges return a list instead of being a generator.
Tweaked a variable name for readability.
renamed: Sample_Code/makepages.py -> Sample_Code/makesimple.py
also modified:
Renamed the code to be similar to makesimple.sh.
Changed the output file names to be the same as makesimple.sh makes.
modified: Sample_Code/pdfcat
Fixed to allow sending output to a file by redirection like with cat,
pdfcat input*.pdf >output.pdf
using
output = os.fdopen(stdout.fileno(), "wb")
I have not tested this in Windows, but the Python docs say the calls are
supported in Windows. The worst problem this could cause would be to
silence PyPDF2's existing warning about the file being in text mode,
while still actually writing in Windows text mode.
Added examples to the --help output to show output-redirect style.
Took out the caching of open input files. Needless complication.
Added a try...except so that if there's a problem while processing an
input file, print the filename.
Made quiet the default and --verbose an option.
0 commit comments