/** * change the font to SYMBOL */ virtual protected void SetGreekFont() { float fontsize = symbol.Font.Size; symbol.Font = FontFactory.GetFont(FontFactory.SYMBOL, fontsize, Font.NORMAL); }
virtual public void TabColumnTextTest() { Font f = FontFactory.GetFont(FontFactory.COURIER, 11); Document doc = new Document(); Paragraph p; FileStream fs = new FileStream(OUTABC, FileMode.Create); PdfWriter writer = PdfWriter.GetInstance(doc, fs); writer.CompressionLevel = 0; doc.Open(); ColumnText ct = new ColumnText(writer.DirectContent); ct.SetSimpleColumn(36, 36, 436, 800); List <TabStop> tabStopsList = new List <TabStop>(); tabStopsList.Add(new TabStop(100, new DottedLineSeparator())); tabStopsList.Add(new TabStop(200, new LineSeparator(), TabStop.Alignment.CENTER)); tabStopsList.Add(new TabStop(300, new DottedLineSeparator(), TabStop.Alignment.RIGHT)); p = new Paragraph(new Chunk("Hello world", f)); p.TabSettings = new TabSettings(tabStopsList, 50); AddTabs(p, f, 0, "la|la"); ct.AddElement(p); tabStopsList = new List <TabStop>(); tabStopsList.Add(new TabStop(100, new DottedLineSeparator())); tabStopsList.Add(new TabStop(200, new LineSeparator(), TabStop.Alignment.ANCHOR)); tabStopsList.Add(new TabStop(300, new DottedLineSeparator(), TabStop.Alignment.ANCHOR)); p = new Paragraph(new Chunk("Hello World!!!")); p.TabSettings = new TabSettings(tabStopsList, 50); AddTabs(p, f, 12, "l.aal"); AddTabs(p, f, 12, "laa.l"); AddTabs(p, f, 12, "la.al"); ct.AddElement(p); f.Size = 16; p = new Paragraph(new Chunk("Hello world", f)); tabStopsList = new List <TabStop>(); tabStopsList.Add(new TabStop(100, new DottedLineSeparator())); tabStopsList.Add(new TabStop(200, new LineSeparator(), TabStop.Alignment.ANCHOR, ',')); tabStopsList.Add(new TabStop(300, new DottedLineSeparator(), TabStop.Alignment.ANCHOR)); p.TabSettings = new TabSettings(tabStopsList, 50); AddTabs(p, f, 15, "l.aal"); AddTabs(p, f, 13, "laa,l"); AddTabs(p, f, 13, "laa.l"); AddTabs(p, f, 13, "l,aal"); ct.AddElement(p); f = FontFactory.GetFont(FontFactory.TIMES_ROMAN, 12); p = new Paragraph(new Chunk("Hello world", f)); p.TabSettings = new TabSettings(38); AddTabs(p, f, 0); ct.AddElement(p); f.Size = 20; p = new Paragraph(new Chunk("Hello world", f)); p.TabSettings = new TabSettings(38); AddTabs(p, f, 0); ct.AddElement(p); ct.Go(); doc.Close(); fs.Close(); Assert.IsTrue(CompareInnerText(SOURCE14, OUTABC)); }