void addAdditionalAction(PdfName actionType, PdfAction action) { if (additionalActions == null) { additionalActions = new PdfDictionary(); } if (action == null) additionalActions.remove(actionType); else additionalActions.put(actionType, action); if (additionalActions.size() == 0) additionalActions = null; }
void add(PdfName key, PdfDictionary resource) { if (resource.size() == 0) return; PdfDictionary dic = getAsDict(key); if (dic == null) put(key, resource); else dic.putAll(resource); } }
void addAdditionalAction(PdfName actionType, PdfAction action) { if (additionalActions == null) { additionalActions = new PdfDictionary(); } if (action == null) additionalActions.remove(actionType); else additionalActions.put(actionType, action); if (additionalActions.size() == 0) additionalActions = null; }
void add(PdfName key, PdfDictionary resource) { if (resource.size() == 0) return; PdfDictionary dic = getAsDict(key); if (dic == null) put(key, resource); else dic.putAll(resource); } }
void addAdditionalAction(PdfName actionType, PdfAction action) { if (additionalActions == null) { additionalActions = new PdfDictionary(); } if (action == null) additionalActions.remove(actionType); else additionalActions.put(actionType, action); if (additionalActions.size() == 0) additionalActions = null; }
void add(PdfName key, PdfDictionary resource) { if (resource.size() == 0) return; PdfDictionary dic = getAsDict(key); if (dic == null) put(key, resource); else dic.putAll(resource); } }
/** * Removes any usage rights that this PDF may have. Only Adobe can grant usage rights * and any PDF modification with iText will invalidate them. Invalidated usage rights may * confuse Acrobat and it's advisable to remove them altogether. */ public void removeUsageRights() { PdfDictionary perms = catalog.getAsDict(PdfName.PERMS); if (perms == null) return; perms.remove(PdfName.UR); perms.remove(PdfName.UR3); if (perms.size() == 0) catalog.remove(PdfName.PERMS); }
/** * Removes any usage rights that this PDF may have. Only Adobe can grant usage * rights and any PDF modification with iText will invalidate them. * Invalidated usage rights may confuse Acrobat and it's advisable to remove * them altogether. */ public void removeUsageRights() { PdfDictionary perms = catalog.getAsDict(PdfName.PERMS); if (perms == null) return; perms.remove(PdfName.UR); perms.remove(PdfName.UR3); if (perms.size() == 0) catalog.remove(PdfName.PERMS); }
/** * Removes any usage rights that this PDF may have. Only Adobe can grant usage rights * and any PDF modification with iText will invalidate them. Invalidated usage rights may * confuse Acrobat and it's advisable to remove them altogether. */ public void removeUsageRights() { PdfDictionary perms = catalog.getAsDict(PdfName.PERMS); if (perms == null) return; perms.remove(PdfName.UR); perms.remove(PdfName.UR3); if (perms.size() == 0) catalog.remove(PdfName.PERMS); }
if (update.size() != this.exclusionLocations.size()) { throw new IllegalArgumentException("The update dictionary has less keys than required."); //$NON-NLS-1$
if (update.size() != exclusionLocations.size()) throw new IllegalArgumentException(MessageLocalization.getComposedMessage("the.update.dictionary.has.less.keys.than.required")); if (tempFile == null) {
names.put(PdfName.EMBEDDEDFILES, writer.addToBody(PdfNameTree.writeTree(documentFileAttachment, writer)).getIndirectReference()); if (names.size() > 0) put(PdfName.NAMES, writer.addToBody(names).getIndirectReference());
names.put(PdfName.EMBEDDEDFILES, writer.addToBody(PdfNameTree.writeTree(documentFileAttachment, writer)).getIndirectReference()); if (names.size() > 0) put(PdfName.NAMES, writer.addToBody(names).getIndirectReference());
names.put(PdfName.EMBEDDEDFILES, writer.addToBody(PdfNameTree.writeTree(documentFileAttachment, writer)).getIndirectReference()); if (names.size() > 0) put(PdfName.NAMES, writer.addToBody(names).getIndirectReference());
if (viewerPreferences.size() > 0) { catalog.put(PdfName.VIEWERPREFERENCES, viewerPreferences);
if (viewerPreferences.size() > 0) { catalog.put(PdfName.VIEWERPREFERENCES, viewerPreferences);
if (viewerPreferences.size() > 0) { catalog.put(PdfName.VIEWERPREFERENCES, viewerPreferences);