summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorTor Andersson <tor.andersson@artifex.com>2016-05-18 14:47:05 +0200
committerTor Andersson <tor.andersson@artifex.com>2016-05-20 14:31:08 +0200
commit0528bc575875c579408ab90bb2c2e3af0750545d (patch)
tree1b5de9615e17eef3c25988f6b33535e7c9d6c4b3 /docs
parenta4b7981d56e3cb22e2a1c18e40906e88fc331da5 (diff)
downloadmupdf-0528bc575875c579408ab90bb2c2e3af0750545d.tar.xz
murun: Add graftObject to javascript bindings.
Add some paranoid checks to pdf_graft_object to prevent user errors from crashing mupdf.
Diffstat (limited to 'docs')
-rw-r--r--docs/mutool/run.html11
1 files changed, 11 insertions, 0 deletions
diff --git a/docs/mutool/run.html b/docs/mutool/run.html
index 5d5d73fd..23286f07 100644
--- a/docs/mutool/run.html
+++ b/docs/mutool/run.html
@@ -589,6 +589,17 @@ Do NOT mix and match objects from one document with another document!
</dl>
<p>
+The following functions can be used to copy objects from one document to another:
+
+<dl>
+<dt>PDFDocument#graftObject(sourceDocument, object, sourceGraftMap)
+<dd>Deep copy an object into the destination document. The graft map may be null, but should be used if you
+are copying several objects from the same source document using multiple calls to graftObject.
+<dt>PDFDocument#newGraftMap()
+<dd>Create a graft map for the source document, so that objects that have already been copied can be found again.
+</dl>
+
+<p>
All functions that take PDF objects, do automatic translation between JavaScript objects
and PDF objects using a few basic rules. Null, booleans, and numbers are translated directly.
JavaScript strings are translated to PDF names, unless they are surrounded by parentheses: