问题
http://pillow.readthedocs.org/en/3.0.x/handbook/image-file-formats.html#pdf
The Pillow docs mention being able to save multiple pages, but I can't find any other docs or code samples that tell you how to add pages to a new PDF.
回答1:
You could try the following:
im.save('test.pdf', save_all=True)
By default, the output format is determined by the file extension. This is documented in the release notes.
回答2:
Doesn't seem like this is currently possible with Pillow, I used reportlab to build a multi-page PDF from scratch:
https://pypi.python.org/pypi/reportlab
来源:https://stackoverflow.com/questions/34036886/add-multiple-pages-to-new-pdf-using-pil-pillow