{"id":9313,"date":"2026-09-20T17:06:22","date_gmt":"2026-09-20T09:06:22","guid":{"rendered":"https:\/\/support.fuxinsoft.cn\/?p=9313&#038;preview=true&#038;preview_id=9313"},"modified":"2026-09-20T17:06:23","modified_gmt":"2026-09-20T09:06:23","slug":"websdk-%e5%88%9b%e5%bb%ba%e4%b9%a6%e7%ad%be%e5%b9%b6%e8%ae%be%e7%bd%ae-gotor-launch-%e5%8a%a8%e4%bd%9c%ef%bc%88%e6%89%93%e5%bc%80%e5%8f%a6%e4%b8%80pdf%e6%8c%87%e5%ae%9a%e9%a1%b5-%e6%89%93%e5%bc%80","status":"publish","type":"post","link":"https:\/\/support.fuxinsoft.cn\/?p=9313","title":{"rendered":"WebSDK \u521b\u5efa\u4e66\u7b7e\u5e76\u8bbe\u7f6e GoToR \/ Launch \u52a8\u4f5c\uff08\u6253\u5f00\u53e6\u4e00PDF\u6307\u5b9a\u9875 \/ \u6253\u5f00\u975ePDF\u6587\u4ef6\uff09"},"content":{"rendered":"<blockquote><p>\u9002\u7528\u7248\u672c\uff1a\u798f\u6615 PDF SDK for Web 11.1\uff08PDFViewCtrl \/ UIExtension \u4e24\u79cd\u521d\u59cb\u5316\u6a21\u5f0f\u5747\u9002\u7528\uff09<\/p><\/blockquote>\n<blockquote><p>\u672c\u6587\u6240\u6709\u63a5\u53e3\u5199\u6cd5\u4e0e\u884c\u4e3a\u5747\u7ecf 11.1 \u5b9e\u673a\u9a8c\u8bc1\uff08\u542b\u4fdd\u5b58\u56de\u8bfb\u4e0e PDF \u5b57\u8282\u7ea7\u6838\u5bf9\uff09\u3002<\/p><\/blockquote>\n<h2>1. \u9700\u6c42\u4e0e\u603b\u4f53\u601d\u8def<\/h2>\n<p>\u9700\u6c42\uff1a\u5728\u7ebf\u9884\u89c8 PDF \u65f6\uff0c\u901a\u8fc7\u4ee3\u7801\u521b\u5efa\u300c\u5e26\u5404\u79cd\u5c5e\u6027\u7684\u4e66\u7b7e\u300d\uff0c\u5e76\u628a\u4e66\u7b7e\u52a8\u4f5c\u8bbe\u7f6e\u4e3a\uff1a<\/p>\n<ol>\n<li><strong>GoToR\uff08\u8fdc\u7a0b\u8df3\u8f6c\uff09<\/strong>\uff1a\u70b9\u51fb\u4e66\u7b7e\u6253\u5f00<strong>\u53e6\u4e00\u4e2a PDF<\/strong> \u7684<strong>\u6307\u5b9a\u9875\u9762\u4f4d\u7f6e<\/strong>\uff1b<\/li>\n<li><strong>Launch\uff08\u542f\u52a8\u5916\u90e8\u6587\u4ef6\uff09<\/strong>\uff1a\u70b9\u51fb\u4e66\u7b7e\u6253\u5f00\u4e00\u4e2a<strong>\u975e PDF \u6587\u4ef6<\/strong>\uff08.txt \/ .docx \/ \u4efb\u610f\u6587\u4ef6\uff09\u3002<\/li>\n<\/ol>\n<p>WebSDK \u7684\u4e66\u7b7e\u80fd\u529b\u5206\u4e24\u5c42\uff0c\u9009\u9519\u5c42\u662f\u6b64\u7c7b\u9700\u6c42\u6700\u5e38\u89c1\u7684\u5931\u8d25\u539f\u56e0\uff1a<\/p>\n<table border=\"1\">\n<thead>\n<tr>\n<th style=\"text-align:center;vertical-align:middle\">\u5c42<\/th>\n<th style=\"text-align:center;vertical-align:middle\">\u5165\u53e3<\/th>\n<th style=\"text-align:center;vertical-align:middle\">\u80fd\u529b<\/th>\n<th style=\"text-align:center;vertical-align:middle\">\u662f\u5426\u652f\u6301 GoToR\/Launch<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"text-align:center;vertical-align:middle\">UI \u4e66\u7b7e\u9762\u677f\u5c42<\/td>\n<td style=\"text-align:center;vertical-align:middle\"><code>pdfui.getBookmarkDataService().addBookmark(options)<\/code><\/td>\n<td style=\"text-align:center;vertical-align:middle\">\u4ec5\u6587\u6863\u5185\u8df3\u9875\uff08TypeGoto\uff09\uff0c<code>AddBookmarkOptions = {color?, destId?, destination?, relationship, style?, title?}<\/code>\uff0c<strong>\u6ca1\u6709 action \u5b57\u6bb5<\/strong><\/td>\n<td style=\"text-align:center;vertical-align:middle\">\u274c \u4e0d\u652f\u6301<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align:center;vertical-align:middle\"><strong>\u6838\u5fc3\u4e66\u7b7e API \u5c42<\/strong><\/td>\n<td style=\"text-align:center;vertical-align:middle\"><code>await (await docRender.getPDFDoc()).getBookmarkAPI()<\/code><\/td>\n<td style=\"text-align:center;vertical-align:middle\">\u4e66\u7b7e\u6811\u589e\u5220\u6539\u3001\u4efb\u610f PDF \u52a8\u4f5c\uff08TypeGoto \/ <strong>TypeGoToR<\/strong> \/ TypeGoToE \/ <strong>TypeLaunch<\/strong> \/ TypeURI \/ TypeJavaScript \/ \u2026\uff09\u3001\u5c5e\u6027\u3001\u4fdd\u5b58<\/td>\n<td style=\"text-align:center;vertical-align:middle\">\u2705 <strong>\u5fc5\u987b\u7528\u8fd9\u5c42<\/strong><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u4e24\u5c42\u53ef\u6df7\u7528\uff1a\u6838\u5fc3\u5c42\u521b\u5efa\u7684\u5e26\u52a8\u4f5c\u4e66\u7b7e\u4f1a\u6b63\u5e38\u663e\u793a\u5728 UI \u4e66\u7b7e\u9762\u677f\u91cc\u3002<\/p>\n<h2>2. \u6838\u5fc3\u8bbf\u95ee\u8def\u5f84\uff0811.1 \u5b9e\u6d4b\uff09<\/h2>\n<pre><code>\/\/ \u2014\u2014 \u88f8 PDFViewCtrl \u6a21\u5f0f \u2014\u2014\nconst docRender = pdfViewer.getPDFDocRender();        \/\/ \u540c\u6b65\u8fd4\u56de\nconst pdfDoc    = await docRender.getPDFDoc();        \/\/ \u4e3b\u7ebf\u7a0b\u6838\u5fc3 PDFDoc\nconst bapi      = await pdfDoc.getBookmarkAPI();      \/\/ \u2605 \u6587\u6863\u7ea7\u4e66\u7b7e API\n\n\/\/ \u2014\u2014 UIExtension\uff08PDFUI\uff09\u6a21\u5f0f \u2014\u2014\nconst viewer   = await pdfui.getPDFViewer();\nconst pdfDoc   = await viewer.getPDFDocRender().getPDFDoc();\nconst bapi     = await pdfDoc.getBookmarkAPI();<\/code><\/pre>\n<blockquote><p>\u6ce8\u610f\uff1a\u4e0d\u8981\u4f9d\u8d56 <code>pdfDoc.getRootBookmark()<\/code> \/ <code>createRootBookmark()<\/code> \u2014\u2014 11.1 \u4e3b\u7ebf\u7a0b\u4e0a\u8fd9\u4e24\u4e2a\u65b9\u6cd5<strong>\u4e0d\u5b58\u5728<\/strong>\uff08\u4ec5\u5185\u90e8\u94fe\u8def\u4f7f\u7528\uff09\u3002\u4e00\u5207\u901a\u8fc7 <code>getBookmarkAPI()<\/code> \u5b8c\u6210\u3002<\/p><\/blockquote>\n<h2>3. \u6700\u5c0f\u5b8c\u6574\u4ee3\u7801<\/h2>\n<h3>3.1 \u521b\u5efa GoToR \u4e66\u7b7e\uff08\u6253\u5f00\u53e6\u4e00\u4e2a PDF \u7684\u6307\u5b9a\u9875\uff09<\/h3>\n<pre><code>async function createGoToRBookmark(bapi) {\n  \/\/ 1) \u63d2\u5165\u4e66\u7b7e\uff08destination \u5fc5\u586b\uff1b\u63d2\u5165\u5230\u6839\u65f6 relationship \u53ea\u80fd 0=FIRST_CHILD \u6216 1=LAST_CHILD\uff09\n  const id = await bapi.insertBookmarkTree({\n    relationship: 0,                                     \/\/ 0=\u6839\u4e0b\u7b2c\u4e00\u4e2a\u5b69\u5b50\n    title: '\u6253\u5f00\u53e6\u4e00PDF\uff1atarget.pdf \u7b2c3\u9875',\n    destination: { pageIndex: 0, zoomMode: 'ZoomFitPage' } \/\/ \u5360\u4f4d\u76ee\u6807\uff0c\u7a0d\u540e\u88ab GoToR \u8986\u76d6\n  });\n\n  \/\/ 2) \u8bbe\u7f6e\u5c5e\u6027\uff1a\u989c\u8272\u8d70 setProperties\uff08\u652f\u6301 '#RRGGBB'\uff09\uff0c\u7c97\u4f53 style=2\uff081=\u659c\u4f53\uff0c\u53ef\u7ec4\u5408\uff09\n  await bapi.setProperties(id, { color: '#FF0000', style: 2 });\n\n  \/\/ 3) \u5173\u952e\uff1a\u63d2\u5165\u65f6 SDK \u81ea\u52a8\u6302\u4e86\u4e00\u4e2a TypeGoto \u52a8\u4f5c\uff0c\u5fc5\u987b\u5148\u79fb\u9664\uff0c\n  \/\/    \u5426\u5219\u65b0\u52a8\u4f5c\u4f1a\u88ab\u6302\u6210\u65e7\u52a8\u4f5c\u7684\u5b50\u52a8\u4f5c\uff08\/Next\uff09\u800c\u4e0d\u662f\u66ff\u6362\n  await bapi.removeAction(id);\n\n  \/\/ 4) \u5199\u5165 GoToR \u52a8\u4f5c\uff1a\u6253\u5f00 target.pdf \u7b2c 3 \u9875\uff08pageIndex \u4e3a\u76ee\u6807\u6587\u6863\u7684 0 \u57fa\u9875\u7801\uff09\n  await bapi.setAction(id, {\n    type: 'TypeGoToR',\n    destination: { pageIndex: 2, zoomMode: 'ZoomFitPage' },  \/\/ ZoomXYZ \u65f6\u53ef\u52a0 left\/top\/zoomFactor\n    fileSpec: { fileName: 'target.pdf' },                    \/\/ \u76ee\u6807 PDF \u8def\u5f84\/URL\uff1b\u4e0d\u8981\u4f20 description\n    newWindowFlag: 1                                         \/\/ 0=False, 1=True, 2=None\n  });\n\n  \/\/ 5) \u56de\u8bfb\u786e\u8ba4\uff08\u53ef\u9009\uff09\n  const action = await bapi.getAction(id);\n  console.log(action.exportToJson());\n  \/\/ \u2192 { type:'TypeGoToR', destination:{pageIndex:2, zoomMode:'ZoomFitPage'},\n  \/\/     newWindowFlag:1, fileSpec:{fileName:'target.pdf'} }\n  return id;\n}<\/code><\/pre>\n<p>\u4fdd\u5b58\u540e PDF \u5185\u90e8\u5bf9\u8c61\uff08\u5b57\u8282\u7ea7\u6838\u5bf9\u4e00\u81f4\uff09\uff1a<\/p>\n<pre><code>\u4e66\u7b7e\u5bf9\u8c61:  &lt;&lt;\/A 28 0 R \/C[1 0 0] \/Title(\u2026) \/Parent \u2026 \/Count \u2026&gt;&gt;\n\u52a8\u4f5c\u5bf9\u8c61:  &lt;&lt;\/NewWindow true \/S\/GoToR \/D[2\/Fit] \/F 29 0 R \/Type\/Action&gt;&gt;\nFileSpec:  &lt;&lt;\/UF(target.pdf) \/F(target.pdf) \/Type\/Filespec&gt;&gt;<\/code><\/pre>\n<h3>3.2 \u521b\u5efa Launch \u4e66\u7b7e\uff08\u6253\u5f00\u975e PDF \u6587\u4ef6\uff09<\/h3>\n<pre><code>async function createLaunchBookmark(bapi) {\n  const id = await bapi.insertBookmarkTree({\n    destId: undefined, relationship: 1,                  \/\/ 1=LAST_CHILD\uff0c\u63d2\u5230\u6839\u672b\u5c3e\n    title: '\u6253\u5f00\u9644\u4ef6\uff1anote.txt',\n    destination: { pageIndex: 0, zoomMode: 'ZoomFitPage' }\n  });\n  await bapi.setProperties(id, { color: '#0000FF', style: 1 });   \/\/ 1=\u659c\u4f53\n  await bapi.removeAction(id);                                     \/\/ \u540c\u6837\u5148\u6e05\u81ea\u52a8\u751f\u6210\u7684 TypeGoto\n\n  await bapi.setAction(id, {\n    type: 'TypeLaunch',\n    fileSpec: { fileName: 'note.txt' }                   \/\/ \u975e PDF \u6587\u4ef6\uff08.txt\/.docx\/\u2026\u5747\u53ef\uff09\n  });\n  return id;\n}<\/code><\/pre>\n<p>\u4fdd\u5b58\u540e PDF \u5185\u90e8\u5bf9\u8c61\uff1a<code>&lt;&lt;\/S\/Launch \/F 32 0 R \/Type\/Action&gt;&gt;<\/code> + <code>&lt;&lt;\/UF(note.txt) \/F(note.txt) \/Type\/Filespec&gt;&gt;<\/code>\u3002<\/p>\n<h3>3.3 \u521b\u5efa\u591a\u7ea7\u4e66\u7b7e\u6811\uff08\u5e26\u5404\u79cd\u5c5e\u6027\uff09<\/h3>\n<pre><code>\/\/ \u6839\u7ea7\u7b2c 1 \u4e2a\uff1aFIRST_CHILD\uff1b\u4e4b\u540e\u9010\u4e2a\u7528 destId=\u524d\u4e00\u4e2a + NEXT_SIBLING(3) \u4e32\u6210\u5144\u5f1f\u94fe\nconst id1 = await bapi.insertBookmarkTree({\n  relationship: 0, title: '1. \u6253\u5f00\u53e6\u4e00PDF\uff1atarget.pdf \u7b2c3\u9875',\n  destination: { pageIndex: 0, zoomMode: 'ZoomFitPage' }, style: 2 });\nawait bapi.setProperties(id1, { color: '#FF0000' });\n\nconst id2 = await bapi.insertBookmarkTree({\n  destId: id1, relationship: 3,                          \/\/ 3=NEXT_SIBLING\uff08id1 \u7684\u4e0b\u4e00\u4e2a\u5144\u5f1f\uff09\n  title: '2. \u6253\u5f00\u975ePDF\u6587\u4ef6\uff1anote.txt',\n  destination: { pageIndex: 0, zoomMode: 'ZoomFitPage' }, style: 1 });\nawait bapi.setProperties(id2, { color: '#0000FF' });\n\n\/\/ \u4e8c\u7ea7\u5b50\u4e66\u7b7e\uff1adestId=\u7236id + FIRST_CHILD(0)\nconst id11 = await bapi.insertBookmarkTree({\n  destId: id1, relationship: 0, title: '1.1 \u5b50\u4e66\u7b7e\uff08\u6587\u6863\u5185\u7b2c2\u9875\uff09',\n  destination: { pageIndex: 1, zoomMode: 'ZoomFitPage' } });\n\n\/\/ \u6574\u6811\u56de\u8bfb\uff1a[{id, deep, title, color, isBold, isItalic, children:[\u2026]}]\nconst tree = await pdfDoc.getBookmarksJson();<\/code><\/pre>\n<p>relationship \u5168\u8868\uff1a<code>0=FIRST_CHILD, 1=LAST_CHILD, 2=PREVIOUS_SIBLING, 3=NEXT_SIBLING, 4=FIRST_SIBLING, 5=LAST_SIBLING<\/code>\uff08<strong>destId \u7701\u7565\u5373\u63d2\u5165\u6839\u65f6\u53ea\u5141\u8bb8 0\/1<\/strong>\uff09\u3002<\/p>\n<h3>3.4 \u4fdd\u5b58<\/h3>\n<pre><code>const data = await pdfDoc.getFile({ flags: 0, fileName: 'output.pdf' });  \/\/ \u8fd4\u56de Blob\n\/\/ \u4f8b\uff1a\u4e0a\u4f20\u56de\u670d\u52a1\u7aef\nconst bytes = new Uint8Array(await data.arrayBuffer());\nawait fetch('\/save?name=output.pdf', { method: 'POST', body: bytes });<\/code><\/pre>\n<p>\u4fdd\u5b58 \u2192 \u91cd\u65b0\u6253\u5f00\u540e\uff0c<code>getAction()<\/code> \u56de\u8bfb\u7684\u52a8\u4f5c\u7c7b\u578b\/\u76ee\u6807\u9875\/\u6587\u4ef6\u540d\u4e0e\u5199\u5165\u5b8c\u5168\u4e00\u81f4\uff08\u5b9e\u673a\u4e24\u8f6e\u9a8c\u8bc1\uff09\u3002<\/p>\n<h2>4. \u5fc5\u987b\u6ce8\u610f\u7684 6 \u4e2a\u5751\uff08\u5168\u90e8\u5b9e\u6d4b\u8e29\u8fc7\uff09<\/h2>\n<ol>\n<li><strong>UI \u9762\u677f <code>addBookmark<\/code> \u505a\u4e0d\u5230\u4efb\u610f\u52a8\u4f5c<\/strong>\uff1a<code>AddBookmarkOptions<\/code> \u65e0 <code>action<\/code> \u5b57\u6bb5\uff0c\u521b\u5efa\u7684\u4e66\u7b7e\u56fa\u5b9a\u4e3a TypeGoto\uff08\u8fd8\u4f1a\u81ea\u52a8\u5e26\u5f53\u524d\u89c6\u53e3\u4f4d\u7f6e\uff09\u3002\u8981 GoToR\/Launch \u5fc5\u987b\u8d70 <code>getBookmarkAPI()<\/code>\u3002<\/li>\n<li><strong>\u5148 <code>removeAction<\/code> \u518d <code>setAction<\/code><\/strong>\uff1a\u63d2\u5165\u4e66\u7b7e\u65f6 SDK \u81ea\u52a8\u6302 TypeGoto\uff1b\u76f4\u63a5 setAction \u4f1a\u628a\u65b0\u52a8\u4f5c\u8ffd\u52a0\u4e3a\u5b50\u52a8\u4f5c\uff08\/Next\uff09\u800c\u975e\u66ff\u6362\uff0c\u56de\u8bfb\u4ecd\u662f TypeGoto\u3002<\/li>\n<li><strong>\u63d2\u5165\u6839\u7684 relationship \u53ea\u80fd 0\/1<\/strong>\uff1a\u5426\u5219\u629b <code>When inserting a bookmark into the root, the relationship must be either \"BookmarkPosition.e_PosFirstChild\" or \"BookmarkPosition.e_PosLastChild\".<\/code> \u6839\u7ea7\u5144\u5f1f\u7528 <code>destId=\u524d\u4e00\u4e2a, relationship:3<\/code>\u3002<\/li>\n<li><strong>\u989c\u8272\u7528 <code>setProperties<\/code> \u4f20<\/strong>\uff1a<code>insertBookmarkTree<\/code> options \u91cc\u7684 color \u9700\u8981 int\uff0c\u4f20 <code>'#FF0000'<\/code> \u5b57\u7b26\u4e32\u4f1a\u843d\u6210\u9ed1\u8272\uff1b<code>setProperties(id,{color:'#FF0000'})<\/code> \u5185\u90e8\u505a\u4e86\u8f6c\u6362\uff0c\u5b57\u7b26\u4e32\u6700\u7a33\u59a5\u3002style\uff1a<code>1=\u659c\u4f53, 2=\u7c97\u4f53<\/code>\uff08\u53ef\u6309\u4f4d\u7ec4\u5408\uff09\u3002<\/li>\n<li><strong>GoToR \u7684 fileSpec \u4e0d\u8981\u4f20 <code>description<\/code><\/strong>\uff1a11.1 \u4f1a\u628a JS \u5b57\u7b26\u4e32\u76f4\u63a5\u4f20\u7ed9\u5e95\u5c42 <code>FileSpec.SetDescription<\/code> \u89e6\u53d1 embind \u9519\u8bef <code>Cannot pass \"\u2026\" as a String<\/code>\u3002\u53e6\u5916\u8be5 API \u5199\u5165\u7684 GoToR FileSpec \u4f1a\u9644\u5e26\u4e00\u4e2a\u7a7a\u5d4c\u5165\u5f0f\u6587\u4ef6\u6d41\uff08\/EF\uff0cSDK \u5b9e\u73b0\u884c\u4e3a\uff09\uff0c\u9605\u8bfb\u5668\u6309 \/F \u8def\u5f84\u89e3\u6790\u76ee\u6807\uff0c\u4e0d\u5f71\u54cd\u52a8\u4f5c\u5408\u6cd5\u6027\u3002<\/li>\n<li><strong><code>pageIndex<\/code> \u662f\u76ee\u6807\u6587\u6863\u7684 0 \u57fa\u9875\u7801<\/strong>\uff1a<code>destination:{pageIndex:2}<\/code> \u5373\u76ee\u6807\u6587\u4ef6\u7b2c 3 \u9875\uff1b\u6821\u9a8c\u76ee\u6807\u6587\u6863\u9875\u6570\u662f\u5e94\u7528\u5c42\u804c\u8d23\uff08SDK \u5199\u5165\u65f6\u4e0d\u6821\u9a8c\u76ee\u6807\u6587\u4ef6\uff09\u3002<\/li>\n<\/ol>\n<h2>5. \u6d4f\u89c8\u5668\u7aef\u6267\u884c\u884c\u4e3a\u7684\u73b0\u5b9e\u7ea6\u675f<\/h2>\n<ul>\n<li><strong>GoToR<\/strong>\uff1a\u52a8\u4f5c\u6570\u636e\u5408\u6cd5\u4e14\u5df2\u5199\u5165 PDF\uff0c\u684c\u9762\u9605\u8bfb\u5668\uff08\u798f\u6615\u684c\u9762\u7248\/Acrobat\uff09\u53ef\u76f4\u63a5\u6267\u884c\u3002Web \u7aef\u70b9\u51fb\u4e66\u7b7e\u540e\u7684\u884c\u4e3a\u53d6\u51b3\u4e8e\u9605\u8bfb\u5668\u5b9e\u73b0\u4e0e\u5e94\u7528\u96c6\u6210\u2014\u2014\u6d4f\u89c8\u5668\u6c99\u7bb1\u5185&#8221;\u6253\u5f00\u53e6\u4e00\u672c\u5730\u6587\u4ef6&#8221;\u5929\u7136\u53d7\u9650\u3002eCTD \u7b49 B\/S \u573a\u666f\u5efa\u8bae\uff1a\u5e94\u7528\u5c42\u76d1\u542c\u4e66\u7b7e\u70b9\u51fb\/\u52a8\u4f5c\u6267\u884c\uff0c\u6309 fileSpec \u81ea\u884c\u52a0\u8f7d\u5bf9\u5e94\u6587\u6863\uff08WebSDK \u63d0\u4f9b <code>ActionCallbackManager.setEmbeddedGotoCallback<\/code> \u4e00\u7c7b\u56de\u8c03\u51fa\u53e3\uff0c11.1 \u8fd0\u884c\u5e93\u5b9e\u6d4b\u5b58\u5728\uff09\u3002<\/li>\n<li><strong>Launch<\/strong>\uff1a\u666e\u901a http \u9875\u9762<strong>\u65e0\u6cd5\u9759\u9ed8\u542f\u52a8\u672c\u5730\u7a0b\u5e8f<\/strong>\u6253\u5f00\u975e PDF \u6587\u4ef6\uff0c\u6d4f\u89c8\u5668\u4f1a\u963b\u6b62\u6216\u8f6c\u4e3a\u4e0b\u8f7d\uff0c\u4e14\u901a\u5e38\u9700\u8981\u771f\u5b9e\u7528\u6237\u70b9\u6309\u3002\u52a8\u4f5c\u5408\u6cd5\u6027\u4f53\u73b0\u5728 PDF \u5185\u5bb9\u5c42\uff08\u5199\u5165\u6b63\u786e\u3001\u53ef\u56de\u8bfb\u3001\u684c\u9762\u7aef\u53ef\u6267\u884c\uff09\u3002Web \u5e94\u7528\u66f4\u5e38\u89c1\u7684\u7b49\u6548\u505a\u6cd5\u662f\uff1a\u76d1\u542c\u70b9\u51fb\u540e\u7531\u5e94\u7528\u5c42\u5904\u7406\uff08\u4e0b\u8f7d\u3001\u65b0\u7a97\u53e3\u3001\u6216\u8c03\u7528\u5728\u7ebf\u9884\u89c8\u7ec4\u4ef6\u6253\u5f00 .docx \u7b49\uff09\u3002<\/li>\n<li>UI \u4e66\u7b7e\u9762\u677f\u4e0e\u6838\u5fc3\u5c42\u5171\u7528\u540c\u4e00\u4e66\u7b7e\u5b58\u50a8\uff08<code>BookmarkDataService.reloadBookmarkChildren()<\/code> \u53ef\u5237\u65b0\u9762\u677f\u6570\u636e\uff09\uff0c\u6838\u5fc3\u5c42\u521b\u5efa\u7684\u4e66\u7b7e\uff08\u6807\u9898\/\u989c\u8272\/\u6837\u5f0f\/\u5c42\u7ea7\uff09\u5728\u9762\u677f\u4e2d\u53ef\u89c1\u53ef\u70b9\uff1b<code>BookmarkDataService.performAction(id)<\/code> \u53ef\u7f16\u7a0b\u89e6\u53d1\u52a8\u4f5c\u6267\u884c\uff08\u5b9e\u6d4b\u8c03\u7528\u65e0\u5f02\u5e38\uff1b\u6d4f\u89c8\u5668\u5bf9\u8de8\u6587\u6863\/\u5916\u90e8\u6587\u4ef6\u7684\u5b9e\u9645\u6253\u5f00\u53d7\u5b89\u5168\u7b56\u7565\u7ea6\u675f\uff0c\u89c1\u4e0a\u4e24\u6761\uff09\u3002<\/li>\n<\/ul>\n<h2>6. \u4e00\u9875\u901f\u67e5\uff08API \u901f\u89c8\uff09<\/h2>\n<table border=\"1\">\n<thead>\n<tr>\n<th style=\"text-align:center;vertical-align:middle\">\u76ee\u7684<\/th>\n<th style=\"text-align:center;vertical-align:middle\">\u8c03\u7528<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"text-align:center;vertical-align:middle\">\u62ff\u4e66\u7b7e API<\/td>\n<td style=\"text-align:center;vertical-align:middle\"><code>(await viewer.getPDFDocRender().getPDFDoc()).getBookmarkAPI()<\/code><\/td>\n<\/tr>\n<tr>\n<td style=\"text-align:center;vertical-align:middle\">\u63d2\u5165\u4e66\u7b7e<\/td>\n<td style=\"text-align:center;vertical-align:middle\"><code>bapi.insertBookmarkTree({destId?, relationship, title, destination, style?})<\/code> \u2192 <code>Promise&lt;id&gt;<\/code><\/td>\n<\/tr>\n<tr>\n<td style=\"text-align:center;vertical-align:middle\">\u6539\u5c5e\u6027<\/td>\n<td style=\"text-align:center;vertical-align:middle\"><code>bapi.setProperties(id, {title?, color?, style?})<\/code><\/td>\n<\/tr>\n<tr>\n<td style=\"text-align:center;vertical-align:middle\">\u8bfb\u5c5e\u6027<\/td>\n<td style=\"text-align:center;vertical-align:middle\"><code>bapi.getProperties(id)<\/code><\/td>\n<\/tr>\n<tr>\n<td style=\"text-align:center;vertical-align:middle\">\u6e05\u52a8\u4f5c<\/td>\n<td style=\"text-align:center;vertical-align:middle\"><code>bapi.removeAction(id)<\/code><\/td>\n<\/tr>\n<tr>\n<td style=\"text-align:center;vertical-align:middle\">\u8bbe GoToR<\/td>\n<td style=\"text-align:center;vertical-align:middle\"><code>bapi.setAction(id, {type:'TypeGoToR', destination:{pageIndex, zoomMode}, fileSpec:{fileName}, newWindowFlag})<\/code><\/td>\n<\/tr>\n<tr>\n<td style=\"text-align:center;vertical-align:middle\">\u8bbe Launch<\/td>\n<td style=\"text-align:center;vertical-align:middle\"><code>bapi.setAction(id, {type:'TypeLaunch', fileSpec:{fileName}})<\/code><\/td>\n<\/tr>\n<tr>\n<td style=\"text-align:center;vertical-align:middle\">\u8bfb\u52a8\u4f5c<\/td>\n<td style=\"text-align:center;vertical-align:middle\"><code>bapi.getAction(id)<\/code> \u2192 \u5bf9\u8c61\uff0c<code>.exportToJson()<\/code> \u5e8f\u5217\u5316<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align:center;vertical-align:middle\">\u6574\u6811\u56de\u8bfb<\/td>\n<td style=\"text-align:center;vertical-align:middle\"><code>pdfDoc.getBookmarksJson()<\/code><\/td>\n<\/tr>\n<tr>\n<td style=\"text-align:center;vertical-align:middle\">\u5220\u4e66\u7b7e\/\u79fb\u52a8<\/td>\n<td style=\"text-align:center;vertical-align:middle\"><code>bapi.remove(id)<\/code> \/ <code>bapi.moveTo({srcId, destId, relationship})<\/code><\/td>\n<\/tr>\n<tr>\n<td style=\"text-align:center;vertical-align:middle\">\u4fdd\u5b58<\/td>\n<td style=\"text-align:center;vertical-align:middle\"><code>pdfDoc.getFile({flags:0, fileName})<\/code> \u2192 Blob<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\uff08\u4ee5\u4e0a\u5747\u4e3a WebSDK 11.1 \u5b9e\u673a\u9a8c\u8bc1\u8fc7\u7684\u5199\u6cd5\uff1b<code>getBookmarkAPI\/insertBookmarkTree\/setAction\/...<\/code> \u672a\u51fa\u73b0\u5728\u516c\u5f00 API \u6587\u6863\u4e0e\u58f0\u660e\u6587\u4ef6\u4e2d\uff0c\u5c5e\u4e8e\u8fd0\u884c\u5e93\u5b9e\u673a\u9a8c\u8bc1\u8fc7\u7684\u53ef\u7528\u63a5\u53e3\uff0c\u8de8\u5927\u7248\u672c\u5347\u7ea7\u65f6\u5efa\u8bae\u505a\u56de\u5f52\u9a8c\u8bc1\u3002\uff09<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u9002\u7528\u7248\u672c\uff1a\u798f\u6615 PDF SDK for Web 11.1\uff08PDFViewCtrl \/ UIExtension  [&hellip;]<\/p>\n","protected":false},"author":32,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[67],"tags":[1482,1483,687,935,950],"class_list":["post-9313","post","type-post","status-publish","format-standard","hentry","category-websdk","tag-gotor","tag-launch","tag-pdfviewctrl","tag-uiextension","tag-950"],"pp_statuses_selecting_workflow":false,"pp_workflow_action":"current","pp_status_selection":"publish","_links":{"self":[{"href":"https:\/\/support.fuxinsoft.cn\/index.php?rest_route=\/wp\/v2\/posts\/9313","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/support.fuxinsoft.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/support.fuxinsoft.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/support.fuxinsoft.cn\/index.php?rest_route=\/wp\/v2\/users\/32"}],"replies":[{"embeddable":true,"href":"https:\/\/support.fuxinsoft.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=9313"}],"version-history":[{"count":3,"href":"https:\/\/support.fuxinsoft.cn\/index.php?rest_route=\/wp\/v2\/posts\/9313\/revisions"}],"predecessor-version":[{"id":9391,"href":"https:\/\/support.fuxinsoft.cn\/index.php?rest_route=\/wp\/v2\/posts\/9313\/revisions\/9391"}],"wp:attachment":[{"href":"https:\/\/support.fuxinsoft.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=9313"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/support.fuxinsoft.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=9313"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/support.fuxinsoft.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=9313"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}