Soviut
Soviut

Reputation: 91555

Are any Python PDF libraries able to access objects and groups in an existing PDF file?

I'm building a server application which accepts PDF files that artists have exported from Adobe Illustrator. Each file acts as an art "deck" containing several similar pieces of artwork, with each layer being a separate piece of art in the deck.

I'd like to be able to programmatically access those layers and separate them out into their own PDF files, single page documents in this case. Reading and creating PDFs is pretty easy with Python PDF libraries like ReportLab, pyPDF, and pyx. However, none of these libraries allow manipulating of an existing PDF at the layer/group/object level.

Have I missed something?

Upvotes: 1

Views: 1214

Answers (1)

aquavitae
aquavitae

Reputation: 19114

Have a look at pdfminer. I haven't used it much so I don't know if it does what you want, but from what I've seen it's quite powerful, and it is one of the more popular python PDF libraries.

Upvotes: 2

Related Questions