From 0528bc575875c579408ab90bb2c2e3af0750545d Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Wed, 18 May 2016 14:47:05 +0200 Subject: murun: Add graftObject to javascript bindings. Add some paranoid checks to pdf_graft_object to prevent user errors from crashing mupdf. --- docs/mutool/run.html | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'docs') 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 @@ -588,6 +588,17 @@ Do NOT mix and match objects from one document with another document!
PDFDocument#newDictionary() +

+The following functions can be used to copy objects from one document to another: + +

+
PDFDocument#graftObject(sourceDocument, object, sourceGraftMap) +
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. +
PDFDocument#newGraftMap() +
Create a graft map for the source document, so that objects that have already been copied can be found again. +
+

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. -- cgit v1.2.3