// ===========================================================================
public void Write(Stream stream) {
// step 1
using (Document document = new Document()) {
// step 2
PdfWriter writer = PdfWriter.GetInstance(document, stream);
// step 3
document.Open();
// step 4
Type3Font t3 = new Type3Font(writer, true);
PdfContentByte d = t3.DefineGlyph('D', 600, 0, 0, 600, 700);
d.SetColorStroke(new BaseColor(0xFF, 0x00, 0x00));
d.SetColorFill(new GrayColor(0.7f));
d.SetLineWidth(100);
d.MoveTo(5, 5);
d.LineTo(300, 695);
d.LineTo(595, 5);
d.ClosePathFillStroke();
PdfContentByte s = t3.DefineGlyph('S', 600, 0, 0, 600, 700);
s.SetColorStroke(new BaseColor(0x00, 0x80, 0x80));
s.SetLineWidth(100);
s.MoveTo(595,5);
s.LineTo(5, 5);
s.LineTo(300, 350);
s.LineTo(5, 695);
s.LineTo(595, 695);
s.Stroke();
Font f = new Font(t3, 12);
Paragraph p = new Paragraph();
p.Add("This is a String with a Type3 font that contains a fancy Delta (");
p.Add(new Chunk("D", f));
p.Add(") and a custom Sigma (");
p.Add(new Chunk("S", f));
p.Add(").");
document.Add(p);
}
}