public static PdfObject createInfoId(byte id[]) { ByteBuffer buf = new ByteBuffer(90); buf.append('[').append('<'); for (int k = 0; k < 16; ++k) buf.appendHex(id[k]); buf.append('>').append('<'); id = createDocumentId(); for (int k = 0; k < 16; ++k) buf.appendHex(id[k]); buf.append('>').append(']'); return new PdfLiteral(buf.toByteArray()); }
public static PdfObject createInfoId(byte id[]) { ByteBuffer buf = new ByteBuffer(90); buf.append('[').append('<'); for (int k = 0; k < 16; ++k) buf.appendHex(id[k]); buf.append('>').append('<'); id = createDocumentId(); for (int k = 0; k < 16; ++k) buf.appendHex(id[k]); buf.append('>').append(']'); return new PdfLiteral(buf.toByteArray()); }
public static PdfObject createInfoId(byte[] id) { ByteBuffer buf = new ByteBuffer(90); buf.append('[').append('<'); for (int k = 0; k < 16; ++k) buf.appendHex(id[k]); buf.append('>').append('<'); id = createDocumentId(); for (int k = 0; k < 16; ++k) buf.appendHex(id[k]); buf.append('>').append(']'); return new PdfLiteral(buf.toByteArray()); }
/** * Writes the PDF representation of this <CODE>PdfString</CODE> as an array * of <CODE>byte</CODE> to the specified <CODE>OutputStream</CODE>. * * @param writer for backwards compatibility * @param os The <CODE>OutputStream</CODE> to write the bytes to. */ public void toPdf(PdfWriter writer, OutputStream os) throws IOException { byte b[] = getBytes(); PdfEncryption crypto = null; if (writer != null) crypto = writer.getEncryption(); if (crypto != null && !crypto.isEmbeddedFilesOnly()) b = crypto.encryptByteArray(b); if (hexWriting) { ByteBuffer buf = new ByteBuffer(); buf.append('<'); int len = b.length; for (int k = 0; k < len; ++k) buf.appendHex(b[k]); buf.append('>'); os.write(buf.toByteArray()); } else os.write(PdfContentByte.escapeString(b)); }
/** * Writes the PDF representation of this <CODE>PdfString</CODE> as an array * of <CODE>byte</CODE> to the specified <CODE>OutputStream</CODE>. * * @param writer for backwards compatibility * @param os The <CODE>OutputStream</CODE> to write the bytes to. */ public void toPdf(PdfWriter writer, OutputStream os) throws IOException { byte[] b = getBytes(); PdfEncryption crypto = null; if (writer != null) crypto = writer.getEncryption(); if (crypto != null && !crypto.isEmbeddedFilesOnly()) b = crypto.encryptByteArray(b); if (hexWriting) { ByteBuffer buf = new ByteBuffer(); buf.append('<'); int len = b.length; for (int k = 0; k < len; ++k) buf.appendHex(b[k]); buf.append('>'); os.write(buf.toByteArray()); } else os.write(PdfContentByte.escapeString(b)); }
/** * Writes the PDF representation of this <CODE>PdfString</CODE> as an array * of <CODE>byte</CODE> to the specified <CODE>OutputStream</CODE>. * * @param writer for backwards compatibility * @param os The <CODE>OutputStream</CODE> to write the bytes to. */ public void toPdf(PdfWriter writer, OutputStream os) throws IOException { byte b[] = getBytes(); PdfEncryption crypto = null; if (writer != null) crypto = writer.getEncryption(); if (crypto != null && !crypto.isEmbeddedFilesOnly()) b = crypto.encryptByteArray(b); if (hexWriting) { ByteBuffer buf = new ByteBuffer(); buf.append('<'); int len = b.length; for (int k = 0; k < len; ++k) buf.appendHex(b[k]); buf.append('>'); os.write(buf.toByteArray()); } else os.write(PdfContentByte.escapeString(b)); }