From af3386764c57b83c8de1cdd81fb35f97afc25fd6 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Wed, 6 Jul 2016 21:45:00 +0200 Subject: js: Add wrapper for fz_stext_page to search, select and copy text. --- docs/mutool/run.html | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'docs') diff --git a/docs/mutool/run.html b/docs/mutool/run.html index c6bc80e5..9cf4cdb9 100644 --- a/docs/mutool/run.html +++ b/docs/mutool/run.html @@ -193,6 +193,8 @@ If skipAnnotations is true, ignore annotations. If alpha is true, the page will be drawn on a transparent background, otherwise white.
Page#toDisplayList(skipAnnotations)
Record the contents on the page into a DisplayList. +
Page#toStructuredText() +
Extract the text on the page into a StructuredText object.
Page#search(needle)
Search for 'needle' text on the page, and return an array with rectangles of all matches found.
Page#getAnnotations() @@ -214,6 +216,23 @@ If alpha is true, the page will be drawn on a transparent background, otherwise
Returns the PDFObject/PDFAnnotation for the annotation, if the document is a PDF file. +

+StructuredText +

+ +

+StructuredText objects hold text from a page that has been analyzed and grouped into blocks, lines and spans. +

+ +
+
StructuredText#search(needle) +
Search the text for all instances of 'needle', and return an array with rectangles of all matches found. +
StructuredText#highlight(rect) +
Return an array with rectangles needed to highlight a selection defined by the two corners of the rectangle. +
StructuredText#copy(rect) +
Return the text from the selection defined by the two corners of the rectangle. +
+

ColorSpace

@@ -297,6 +316,11 @@ will keep all the graphics required in memory, so will increase the amount of me
Play back the recorded device calls onto the device.
DisplayList#toPixmap(transform, colorspace, alpha)
Render display list to a pixmap. If alpha is true, it will render to a transparent background, otherwise white. +
DisplayList#toStructuredText(skipAnnotations) +
Extract the text in the display list into a StructuredText object. +
DisplayList#search(needle) +
Search the display list text for all instances of 'needle', and return an array with rectangles of all matches found. +
-- cgit v1.2.3