diff options
author | Tor Andersson <tor.andersson@artifex.com> | 2016-07-12 16:24:46 +0200 |
---|---|---|
committer | Tor Andersson <tor.andersson@artifex.com> | 2016-07-12 16:24:52 +0200 |
commit | 3e11ae39c9cb49144694247046d383e781a1d56f (patch) | |
tree | 366f911eb023b48af557ac89a69358e494018ddc /docs | |
parent | 6a4f5d72134f492492952185dddd3aa140a0f53c (diff) | |
download | mupdf-3e11ae39c9cb49144694247046d383e781a1d56f.tar.xz |
js: Add doc.loadOutline and page.getLinks functions.
These just convert fz_outline and fz_link into plain JS arrays and
objects with no associated native userdata.
Diffstat (limited to 'docs')
-rw-r--r-- | docs/mutool/run.html | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/docs/mutool/run.html b/docs/mutool/run.html index 9cf4cdb9..5cc96a88 100644 --- a/docs/mutool/run.html +++ b/docs/mutool/run.html @@ -178,6 +178,10 @@ MuPDF can open many document types (PDF, XPS, CBZ, EPUB, FB2 and a handful of im <dd>Count the number of pages in the document. This may change if you call the layout function with different parameters. <dt>Document#loadPage(number) <dd>Returns a Page object for the given page number. Page number zero (0) is the first page in the document. +<dt>Document#loadOutline() +<dd>Returns an array with the outline (table of contents). +In the array is an object for each heading with the property 'title', and a property 'page' containing the page number. +If the object has a 'down' property, it contains an array with all the sub-headings for that entry. </dl> <dl> @@ -199,6 +203,10 @@ If alpha is true, the page will be drawn on a transparent background, otherwise <dd>Search for 'needle' text on the page, and return an array with rectangles of all matches found. <dt>Page#getAnnotations() <dd>Return array of all annotations on the page. +<dt>Page#getLinks() +<dd>Return an array of all the links on the page. +Each link is an object with a 'bounds' property, and either a 'page' or 'uri' property, +depending on whether it's an internal or external link. <dt>Page#toPDF() <dd>Returns the PDFObject/PDFPage for the page, if the document is a PDF file. </dl> |