/** * Gets the <code>DA</code> String property on the AcroForm. * <br> * This method returns the default (fallback value) for the <code>DA</code> * attribute of variable text {@link PdfFormField form field}s. * * @return the form-wide default appearance, as a <code>String</code> */ public PdfString getDefaultAppearance() { return getPdfObject().getAsString(PdfName.DA); }
/** * Gets the /M value. Should only be used if the time of signing is not available in the signature. * @return {@link PdfString} which denotes time of signing. */ public PdfString getDate() { return getPdfObject().getAsString(PdfName.M); }
/** * The date and time when the annotation was most recently modified. * This is an optional property of the annotation. * * @return a {@link PdfString} with the modification date as it's value or null if date is not specified. */ public PdfString getDate() { return getPdfObject().getAsString(PdfName.M); }
/** * Attribute for a structure element that may be used as pronunciation hint. It is an exact replacement for content * enclosed by the structure element and its children. * * @return a {@link PdfString} which defines an exact replacement for content enclosed by the structure * element and its children. This value is to be interpreted based on the PhoneticAlphabet attribute in effect. */ public PdfString getPhoneme() { return getPdfObject().getAsString(PdfName.Phoneme); }
/** * Gets the /Cert entry value of this signature. */ public PdfString getCert() { return getPdfObject().getAsString(PdfName.Cert); }
/** * Gets the <code>DA</code> String property on the AcroForm. * <br> * This method returns the default (fallback value) for the <code>DA</code> * attribute of variable text {@link PdfFormField form field}s. * * @return the form-wide default appearance, as a <code>String</code> */ public PdfString getDefaultAppearance() { return getPdfObject().getAsString(PdfName.DA); }
/** * Gets the /Contents entry value. */ public PdfString getContents() { return getPdfObject().getAsString(PdfName.Contents); }
/** * Gets the current alternate name. The alternate is a descriptive name to * be used by status messages etc. * * @return the current alternate name, as a {@link PdfString} */ public PdfString getAlternativeName() { return getPdfObject().getAsString(PdfName.TU); }
/** * Gets the /M value. Should only be used if the time of signing is not available in the signature. * @return {@link PdfString} which denotes time of signing. */ public PdfString getDate() { return getPdfObject().getAsString(PdfName.M); }
/** * Text representing a short description of the subject being addressed by the annotation. * @return a {@link PdfString} which value is a annotation subject. */ public PdfString getSubject() { return getPdfObject().getAsString(PdfName.Subj); }
/** * The default appearance string that shall be used in formatting the text. See ISO-32001 12.7.3.3, “Variable Text”. * @return a {@link PdfString} that specifies the default appearance, or null if default appereance is not specified. */ public PdfString getDefaultAppearance() { return getPdfObject().getAsString(PdfName.DA); }
/** * The default appearance string that shall be used in formatting the text. See ISO-32001 12.7.3.3, “Variable Text”. * @return a {@link PdfString} that specifies the default appearance, or null if default appereance is not specified. */ public PdfString getDefaultAppearance() { return getPdfObject().getAsString(PdfName.DA); }
/** * Gets the current mapping name. The mapping name can be used when * exporting the form data in the document. * * @return the current mapping name, as a {@link PdfString} */ public PdfString getMappingName() { return getPdfObject().getAsString(PdfName.TM); }
private String getPropertyAsString(PdfName name) { PdfString text = properties.getAsString(name); String result = null; if (text != null) { result = text.toUnicodeString(); } return result; }
/** * Gets the text that shall be displayed for the annotation or, if this type of annotation does not display text, * an alternate description of the annotation’s contents in human-readable form. * * @return annotation text content. */ public PdfString getContents() { return getPdfObject().getAsString(PdfName.Contents); }
/** * PDF 2.0. A language identifier overriding the document’s language identifier to * specify the natural language for all text in the annotation except where overridden by * other explicit language specifications * * @return the lang entry */ public String getLang() { PdfString lang = getPdfObject().getAsString(PdfName.Lang); return lang != null ? lang.toUnicodeString() : null; }
public PdfSignature(PdfDictionary sigDictionary) { super(sigDictionary); PdfString contents = getPdfObject().getAsString(PdfName.Contents); if (contents != null) { contents.markAsUnencryptedObject(); } }
/** * Gets the /Location entry value. * @return physical location of signing. */ public String getLocation() { PdfString locationStr = getPdfObject().getAsString(PdfName.Location); return locationStr != null ? locationStr.toUnicodeString() : null; }
public String getAttributeAsText(String attributeName) { PdfName name = PdfStructTreeRoot.convertRoleToPdfName(attributeName); PdfString attrVal = getPdfObject().getAsString(name); return attrVal != null ? attrVal.toUnicodeString() : null; }
private void initKeyAndReadDictionary(PdfDictionary encryptionDictionary, byte[] password, byte[] documentId, boolean encryptMetadata) { byte[] uValue = getIsoBytes(encryptionDictionary.getAsString(PdfName.U)); byte[] oValue = getIsoBytes(encryptionDictionary.getAsString(PdfName.O)); PdfNumber pValue = (PdfNumber) encryptionDictionary.get(PdfName.P); this.permissions = pValue.longValue(); this.documentId = documentId; keyLength = getKeyLength(encryptionDictionary); byte[] paddedPassword = padPassword(password); checkPassword(encryptMetadata, uValue, oValue, paddedPassword); }