From 170f35a5802ec7093b00fb2e39bbde3756516f15 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Thu, 22 Sep 2016 15:48:36 +0200 Subject: js: Make PDFDocument, PDFPage, and PDFAnnotation subclasses. Add isPDF methods to query availability of PDF specific methods. --- docs/mutool/run.html | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'docs') diff --git a/docs/mutool/run.html b/docs/mutool/run.html index 2eb4be0a..a0401595 100644 --- a/docs/mutool/run.html +++ b/docs/mutool/run.html @@ -170,8 +170,6 @@ MuPDF can open many document types (PDF, XPS, CBZ, EPUB, FB2 and a handful of im
Returns true if the password matches.
Document#getMetaData(key)
Return various meta data information. The common keys are: "format", "encryption", "info:Author", and "info:Title". -
Document#toPDF() -
Returns a PDFDocument (see below) or null if the document is not a PDF.
Document#layout(pageWidth, pageHeight, fontSize)
Layout a reflowable document (EPUB, FB2, or XHTML) to fit the specified page and font size.
Document#countPages() @@ -182,6 +180,8 @@ MuPDF can open many document types (PDF, XPS, CBZ, EPUB, FB2 and a handful of im
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. +
Document#isPDF() +
Returns true if the document is a PDF document.
@@ -207,8 +207,8 @@ If alpha is true, the page will be drawn on a transparent background, otherwise
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. +
Page#isPDF() +
Returns true if the page is from a PDF document.
@@ -590,16 +590,14 @@ PDFDocument and PDFObject

With MuPDF it is also possible to create, edit and manipulate PDF documents using low level access to the objects and streams contained in a PDF file. +A PDFDocument object is also a Document object. You can test a Document object +to see if it is safe to use as a PDFDocument by calling document.isPDF().

new PDFDocument()
Create a new empty PDF document.
new PDFDocument(fileName)
Load a PDF document from file. -
Document#toPDF() -
Get access to the raw PDFDocument from a Document; returns null if the document is not a PDF. -
PDFDocument#toDocument() -
Cast the PDF document to a Document.
PDFDocument#save(fileName, options)
Write the PDF document to file. The write options are a string of comma separated options (see the document writer options). -- cgit v1.2.3