PDFGraftMap

Instance methods

graftObject(object)

Use the graft map to copy objects, with the ability to remember previously copied objects.

Arguments:
  • object – Object to graft.

EXAMPLE

var map = document.newGraftMap();
map.graftObject(obj);
graftPage(map, dstPageNumber, srcDoc, srcPageNumber)

Graft a page and its resources at the given page number from the source document to the requested page number in the destination document connected to the map.

Arguments:
  • dstPageNumber – The page number where the source page will be inserted. Page numbers start at 0, and -1 means at the end of the document.

  • srcDoc – Source document.

  • srcPageNumber – Source page number.

EXAMPLE

var map = dstdoc.newGraftMap();
map.graftObject(-1, srcdoc, 0);