/** * Write a <code>Chunk</code> and all its font properties. * * @param chunk The <code>Chunk</code> item to be written * @param outp The <code>MemoryStream</code> to write to * * @throws IOException * @throws DocumentException */ private void WriteChunk(Chunk chunk, MemoryStream outp) { if (chunk is IRtfField) { ((IRtfField) chunk).Write(this, outp); } else { if (chunk.GetImage() != null) { WriteImage(chunk.GetImage(), outp); } else { WriteInitialFontSignature(outp, chunk); byte[] t = DocWriter.GetISOBytes(FilterSpecialChar(chunk.Content, false)); outp.Write(t, 0, t.Length); WriteFinishingFontSignature(outp, chunk); } } }