/** * Removes a single property from the {@link CanvasTag tag}'s properties. * * @param name the key of the key-value pair to be removed * @return current {@link CanvasTag} */ public CanvasTag removeProperty(PdfName name) { if (properties != null) { properties.remove(name); } return this; }
public TagReference removeProperty(PdfName name) { if (properties != null) { properties.remove(name); } return this; }
/** * Removes the specified key from the underlying {@link PdfDictionary} of this {@link PdfAnnotation}. * * @param key key to be removed * @return this {@link PdfAnnotation} instance. */ public PdfAnnotation remove(PdfName key) { getPdfObject().remove(key); return this; }
public PdfLinkAnnotation removeAction() { getPdfObject().remove(PdfName.A); return this; }
@Override public void removeRow(int rowIndex) { fireTableRowsDeleted(rowIndex, rowIndex); dictionary.remove(keys.get(rowIndex)); keys.remove(rowIndex); fireTableDataChanged(); }
@Override public AccessibilityProperties clearRefs() { getBackingElem().getPdfObject().remove(PdfName.Ref); return this; }
public PdfCatalog remove(PdfName key) { getPdfObject().remove(key); setModified(); return this; }
@Override public AccessibilityProperties clearAttributes() { getBackingElem().getPdfObject().remove(PdfName.A); return this; }
public PdfStructureAttributes removeAttribute(String attributeName) { PdfName name = PdfStructTreeRoot.convertRoleToPdfName(attributeName); getPdfObject().remove(name); setModified(); return this; }
/** * Determining the initial backdrop against which its stack is composited. * @param isolated */ public void setIsolated(boolean isolated) { if (isolated) { getPdfObject().put(PdfName.I, PdfBoolean.TRUE); } else { getPdfObject().remove(PdfName.I); } }
/** * Determining whether the objects within the stack are composited with one another or only with the group's backdrop. * @param knockout */ public void setKnockout(boolean knockout) { if (knockout) { getPdfObject().put(PdfName.K, PdfBoolean.TRUE); } else { getPdfObject().remove(PdfName.K); } }
public PdfLinkAnnotation setDestination(PdfObject destination) { if (getPdfObject().containsKey(PdfName.A)) { getPdfObject().remove(PdfName.A); logger.warn(LogMessageConstant.DESTINATION_NOT_PERMITTED_WHEN_ACTION_IS_SET); } if (destination.isArray() && ((PdfArray)destination).get(0).isNumber()) LoggerFactory.getLogger(PdfLinkAnnotation.class).warn(LogMessageConstant.INVALID_DESTINATION_TYPE); return (PdfLinkAnnotation) put(PdfName.Dest, destination); }
/** * Removes the XFA stream from the document. */ public void removeXfaForm() { if (hasXfaForm()) { PdfDictionary root = document.getCatalog().getPdfObject(); PdfDictionary acroform = root.getAsDictionary(PdfName.AcroForm); acroform.remove(PdfName.XFA); xfaForm = null; } }
public void setMoreInfo(String key, String value) { PdfName keyName = new PdfName(key); if (value == null) { infoDictionary.remove(keyName); infoDictionary.setModified(); } else { put(keyName, new PdfString(value, PdfEncodings.UNICODE_BIG)); } }
/** * Removes the XFA stream from the document. */ public void removeXfaForm() { if (hasXfaForm()) { PdfDictionary root = document.getCatalog().getPdfObject(); PdfDictionary acroform = root.getAsDictionary(PdfName.AcroForm); acroform.remove(PdfName.XFA); xfaForm = null; } }
private void copyExistingField(PdfPage toPage, PdfAnnotation currentAnnot) { PdfFormField field = mergeFieldsWithTheSameName(PdfFormField.makeFormField(currentAnnot.getPdfObject(), toPage.getDocument())); PdfArray kids = field.getKids(); if (kids != null) { field.getPdfObject().remove(PdfName.Kids); formTo.addField(field, toPage); field.getPdfObject().put(PdfName.Kids, kids); } else { formTo.addField(field, toPage); } }
@Override public void flush() { PdfDictionary pageDict = getPdfObject().getAsDictionary(PdfName.Pg); if (pageDict == null || pageDict.getIndirectReference() != null && pageDict.getIndirectReference().isFree()) { getPdfObject().remove(PdfName.Pg); } PdfDocument doc = getDocument(); if (doc != null) { doc.checkIsoConformance(getPdfObject(), IsoKey.TAG_STRUCTURE_ELEMENT); } super.flush(); }
private void copyExistingField(PdfPage toPage, PdfAnnotation currentAnnot) { PdfFormField field = mergeFieldsWithTheSameName(PdfFormField.makeFormField(currentAnnot.getPdfObject(), toPage.getDocument())); PdfArray kids = field.getKids(); if (kids != null) { field.getPdfObject().remove(PdfName.Kids); formTo.addField(field, toPage); field.getPdfObject().put(PdfName.Kids, kids); } else { formTo.addField(field, toPage); } }