From 74a8ad5f447db264ef213d023e36a796771097b8 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Tue, 25 Oct 2016 14:38:26 +0200 Subject: js: Update docs with PDFObject accessor functions. --- docs/mutool/run.html | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) (limited to 'docs') 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.
PDFObject#isIndirect()
Is the object an indirect reference. -
PDFObject#toIndirect() +
PDFObject#asIndirect()
Return the object number the indirect reference points to.
PDFObject#isStream()
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.
+

+Primitive PDF objects such as booleans, names, and numbers can usually be treated like JavaScript values. +When that is not sufficient use these functions: + +

+
PDFObject#isNull() +
Is the object the 'null' object? +
PDFObject#isBoolean() +
Is the object a boolean? +
PDFObject#asBoolean() +
Get the boolean primitive value. +
PDFObject#isNumber() +
Is the object a number? +
PDFObject#asNumber() +
Get the number primitive value. +
PDFObject#isName() +
Is the object a name? +
PDFObject#asName() +
Get the name as a string. +
PDFObject#isString() +
Is the object a string? +
PDFObject#asString() +
Convert a "text string" to a javascript unicode string. +
PDFObject#asByteString() +
Convert a string to an array of byte values. +
+

PDF Page Access

-- cgit v1.2.3