/** * return the characters in our value without any translation. This allows * a string to be built that holds 2-byte or one-byte character codes, as needed * for processing by fonts when extracting text. * * Intended for use when no encoding transformations are desired. * @return The code points in this font as chars. */ public char[] getOriginalChars() { char[] chars; if (encoding == null || encoding.length() == 0) { byte [] bytes = getOriginalBytes(); chars = new char[bytes.length]; for (int i = 0; i<bytes.length; i++) chars[i] = (char) (bytes[i]&0xff); } else { chars = new char[0]; } return chars; }
/** * This constructor should only be called when the origin for text display is at (0,0) and the * graphical state reflects all transformations of the baseline. This is in text space units. * * Decodes a PdfString (which will contain glyph ids encoded in the font's encoding) based on * the active font, and determine the unicode equivalent * * @param in * the String that needs to be encoded * * @return the encoded String * @since 2.1.7 */ protected String decode(PdfString in) { byte[] bytes = in.getOriginalBytes(); return gs.font.decode(bytes, 0, bytes.length); }
if (sub.equals(PdfName.ADBE_X509_RSA_SHA1)) { PdfString cert = v.getAsString(PdfName.CERT); pk = new PdfPKCS7(contents.getOriginalBytes(), cert.getBytes(), provider); pk = new PdfPKCS7(contents.getOriginalBytes(), provider); updateByteRange(pk, v); PdfString str = v.getAsString(PdfName.M);
if (sub.equals(PdfName.ADBE_X509_RSA_SHA1)) { PdfString cert = v.getAsString(PdfName.CERT); pk = new PdfPKCS7(contents.getOriginalBytes(), cert.getBytes(), provider); } else { pk = new PdfPKCS7(contents.getOriginalBytes(), provider);
if (sub.equals(PdfName.ADBE_X509_RSA_SHA1)) { PdfString cert = v.getAsString(PdfName.CERT); pk = new PdfPKCS7(contents.getOriginalBytes(), cert.getBytes(), provider); pk = new PdfPKCS7(contents.getOriginalBytes(), provider); updateByteRange(pk, v); PdfString str = v.getAsString(PdfName.M);