/** * Copies object to a specified document. * <br><br> * NOTE: Works only for objects that are read from document opened in reading mode, otherwise an exception is thrown. * * @param document document to copy object to. * @return copied object. */ public PdfObject copyTo(PdfDocument document) { return copyTo(document, true); }
if (srcMappingArray.size() > 1 && srcMappingArray.get(1).isDictionary()) { PdfArray copiedMappingArray = new PdfArray(); copiedMappingArray.add(srcMappingArray.get(0).copyTo(toDocument)); PdfDictionary copiedNamespace = copyNamespaceDict(srcMappingArray.getAsDictionary(1), copyingParams); copiedMappingArray.add(copiedNamespace); copiedMapping = entry.getValue().copyTo(toDocument);
if (oldPage.getPdfObject() == pageObject) { PdfArray copiedArray = (PdfArray) dest.copyTo(toDocument, false); d = new PdfExplicitDestination(copiedArray); break;