From 3e11ae39c9cb49144694247046d383e781a1d56f Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Tue, 12 Jul 2016 16:24:46 +0200 Subject: 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. --- docs/mutool/run.html | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'docs') 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
Count the number of pages in the document. This may change if you call the layout function with different parameters.
Document#loadPage(number)
Returns a Page object for the given page number. Page number zero (0) is the first page in the document. +
Document#loadOutline() +
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.
@@ -199,6 +203,10 @@ If alpha is true, the page will be drawn on a transparent background, otherwise
Search for 'needle' text on the page, and return an array with rectangles of all matches found.
Page#getAnnotations()
Return array of all annotations on the page. +
Page#getLinks() +
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.
Page#toPDF()
Returns the PDFObject/PDFPage for the page, if the document is a PDF file.
-- cgit v1.2.3