使用Acrobat Pro和JavaScript:将PDF转换为带页码目录的神奇操作 您所在的位置:网站首页 pdf批量盖章acroba 使用Acrobat Pro和JavaScript:将PDF转换为带页码目录的神奇操作

使用Acrobat Pro和JavaScript:将PDF转换为带页码目录的神奇操作

#使用Acrobat Pro和JavaScript:将PDF转换为带页码目录的神奇操作| 来源: 网络整理| 查看: 265

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);



【本文地址】

公司简介

联系我们

今日新闻

    推荐新闻

      专题文章
        CopyRight 2018-2019 实验室设备网 版权所有