You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
996 B
996 B
layout | title | author | author_login | author_email | date | categories | tags |
---|---|---|---|---|---|---|---|
post | Save x page per sheet PDF in python | [{display_name sipp11} {login sipp11} {email sipp11@gmail.com} {url }] | sipp11 | sipp11@gmail.com | Aug 2, 2015 | [coding] | [python pdf] |
Reportlab is my go-to PDF library in python
; however, it doesn't do multiple page layout well. The solution is to do regular multiple pages PDF with reportlab
, then process that PDF file afterward to have any layout you want (2-page per sheet, 4-page per sheet, 9-page per sheet, ...)
What you need?
pdfnup
-- it's available via pip
but an ImportError always there. As a result, you need to download that and do install by yourself.
$ python setup.py install
Simple enough. You also have a command line to work on too.
>>> from pdfnup import generateNup
>>>
>>> generateNup("multiple-pages.pdf", 2, verbose=True)
written: file-2up.pdf
There you go.