summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorTor Andersson <tor.andersson@artifex.com>2016-10-25 14:38:26 +0200
committerTor Andersson <tor.andersson@artifex.com>2016-10-26 18:46:43 +0200
commit74a8ad5f447db264ef213d023e36a796771097b8 (patch)
tree7420478437f6ab876498a07d441038f9f3c7e889 /docs
parent51d070b625dd68ed129a7f5c1f4250f3b9033c22 (diff)
downloadmupdf-74a8ad5f447db264ef213d023e36a796771097b8.tar.xz
js: Update docs with PDFObject accessor functions.
Diffstat (limited to 'docs')
-rw-r--r--docs/mutool/run.html29
1 files changed, 28 insertions, 1 deletions
diff --git a/docs/mutool/run.html b/docs/mutool/run.html
index 045c3c3a..2081202a 100644
--- a/docs/mutool/run.html
+++ b/docs/mutool/run.html
@@ -704,7 +704,7 @@ are numbered objects.
<dl>
<dt>PDFObject#isIndirect()
<dd>Is the object an indirect reference.
-<dt>PDFObject#toIndirect()
+<dt>PDFObject#asIndirect()
<dd>Return the object number the indirect reference points to.
<dt>PDFObject#isStream()
<dd>True if the object is an indirect reference pointing to a stream.
@@ -722,6 +722,33 @@ This will update the Length, Filter and DecodeParms automatically.
This will update the Length automatically, but leave the Filter and DecodeParms untouched.
</dl>
+<p>
+Primitive PDF objects such as booleans, names, and numbers can usually be treated like JavaScript values.
+When that is not sufficient use these functions:
+
+<dl>
+<dt>PDFObject#isNull()
+<dd>Is the object the 'null' object?
+<dt>PDFObject#isBoolean()
+<dd>Is the object a boolean?
+<dt>PDFObject#asBoolean()
+<dd>Get the boolean primitive value.
+<dt>PDFObject#isNumber()
+<dd>Is the object a number?
+<dt>PDFObject#asNumber()
+<dd>Get the number primitive value.
+<dt>PDFObject#isName()
+<dd>Is the object a name?
+<dt>PDFObject#asName()
+<dd>Get the name as a string.
+<dt>PDFObject#isString()
+<dd>Is the object a string?
+<dt>PDFObject#asString()
+<dd>Convert a "text string" to a javascript unicode string.
+<dt>PDFObject#asByteString()
+<dd>Convert a string to an array of byte values.
+</dl>
+
<h3>
PDF Page Access
</h3>