We want to create a module that takes a PDF and adds page numbers and the table of contents to it.
A proof of concept scripts (both in PHP and Python) have been created in T168871. We will use Python because of the availability of a good third party PDF processing library called pdfrw.
A/C
- Script takes a PDF and data for table of contents.
- Script adds page numbers to the PDF
- Script creates the table of contents with page numbers and adds it to the PDF.
WIP Post processor script:
https://github.com/kodchi/ppg