baruchel / txt2pdf

Text to PDF converter with Unicode support
MIT License
74 stars 46 forks source link

ENHANCEMENT idea page start/end/offset parameter support #20

Open clach04 opened 2 years ago

clach04 commented 2 years ago

Neat option(s) would be to take in parameters for:

e.g.

python txt2pdf.py --media letter --start 10 --end 20 myfile.txt

only output the pages 10 through to and including 20 to the output PDF file.

Alternative (possibly follow on feature) would be a pages parameter which could take ranges, e.g.:

clach04 commented 2 years ago

I've not had time to implement this, as a quick workaround I'm generating the entire PDF (which for 3000 pages is pretty quick, a few secs) and then extracting the desired pages using another tool (hand written using PyPDF2), for example pdftk.