|
The following example adds two blocks of styled text to a
document. The first block is in Helvetica and the second in
Courier.
using var doc = new Doc();
doc.FontSize = 96; // big text
doc.Font = doc.AddFont("Helvetica");
doc.AddText("Helvetica Text.");
doc.Font = doc.AddFont("Courier");
doc.AddText("Courier Text.");
doc.Save(Server.MapPath("docfont.pdf"));
Using doc As New Doc()
doc.FontSize = 96
' big text
doc.Font = doc.AddFont("Helvetica")
doc.AddText("Helvetica Text.")
doc.Font = doc.AddFont("Courier")
doc.AddText("Courier Text.")
doc.Save(Server.MapPath("docfont.pdf"))
End Using

docfont.pdf
Also see example code in: ABCpdf Unicode Example,
ABCpdf eForm
Placeholder Example, ABCpdf eForm Stamp Example,
ABCpdf eForm FDF
Example, ABCpdf Fields, Markup and
Movies Example, Doc AddFont
Function, Doc AddText
Function, Doc EmbedFont
Function, Doc String Property,
FontObject Widths Property,
ArrayAtom FromContentStream Function.
|