1、首先需要安装adobe acrobat Pro,下载地址:https://pan.baidu.com/s/1PD1sCryujYjjsJRDVqo6yw?pwd=0q99
2、用adobe acrobat Pro打开PDF文件
3、在“工具 ”-“JavaScript”-“文档级 JavaScript”中,添加 JavaScript脚本,可将pdf书签导出为PDF格式带页码的目录页。
function PrintBookmarks(bm, nLevel) { if (nLevel != 0) { // don't print the root bmReport.absIndent=bmTab*(nLevel-1); bm.execute(); bmReport.writeText(bm.name+".........."+(bm.doc.pageNum +1)); } if (bm.children != null) for (var i = 0; i < bm.children.length; i++) PrintBookmarks(bm.children[i], nLevel + 1); } bmTab = 20; bmReport = new Report(); bmReport.size = 2; bmReport.writeText(this.title); bmReport.writeText(" "); bmReport.size = 1.5; bmReport.writeText("目录"); bmReport.writeText(" "); bmReport.size = 1; PrintBookmarks(this.bookmarkRoot, 0); global.bmRep = bmReport; // make global global.wrtDoc = app.setInterval( 'try {' +' reportDoc = global.bmRep.open("Listing of Bookmarks");' +' console.println("Executed Report.open");' +' app.clearInterval(global.wrtDoc);' +' delete global.wrtDoc;' +' console.println("Executed App.clearInterval");' +' reportDoc.info.title = "Bookmark Listings";' +' reportDoc.info.Author = "List Bookmark Sequence";' +'} catch (e) {console.println("Waiting...: " + e);}' , 100);
javascript
2022-09-12 12学好javascript是开发必备基础知识,任何开发都离不开javascript.我的站长站为您整理javascript教程,javascript源码,更多javascript资源请访问我的站长站。...
- 植物大战僵尸中文Javascript版源码 [2022-06-29]
- Acrobat Pro+javascript将pdf转换成带页码目录 [2022-06-25]
- 简单JavaScript闯关小游戏源码下载 [2021-12-25]
- JavaScript动态修改样式方法 [2021-10-30]
- JavaScript ES6-11版本语法大全教程 [2021-05-14]