开发者

How to generate a PDF index page?

I have a python script that exports 772 pdfs and combines them into a multi-page pdf binder. While exporting each PDF, it also adds the name of the current pdf as an entry in a text file. After the whole binder is created, the text file has an entry for each PDF page in the same order as the PDF binder. I need to use this text file to create an index page at the beginning of the PDF, preferably linking to each page in the开发者_JS百科 document.

If I have to do this task manually, I will (and I'm open to suggestions), but I hope to find a way to automate this.

Also, this doesn't have to be done in Python, but it would be nice to fit it in with my current script.

Thanks for the feedback,

Tanner


Poking around in the docs for arcpy.mapping, I can see that you weren't kidding about "it's limited".

Rather than adding new pages, have you considered adding bookmarks to the PDF?

And the only Python software I could dig up that can add bookmarks was pdfrecylce. It's in version 0.05, so I'm gonna go out on a limb and guess it might not be too stable.

If you're willing to use Java or C# there's iText and iTextSharp (but I'm biased). There are quite a few other PDF libraries floating around capable of manipulating existing PDFs... pick a language and start googling.


PDFsam will merge PDFs and create an index with links based on each individual PDF file name or title.

I initially downloaded PDFsam Basic because it will auto organize the PDFs to be merged in order of folder structure instead of only alphabetically. To add multiple PDFs from various folders I go to a directory, search "." to locate and select all the PDFs to add. I think the PDFsam Enhanced allows you to simply drag and drop an entire folder directory. Highly recommend.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜