The following example shows the effect that this parameter has
on PDF rendering.
using (Doc doc = new Doc()) {
doc.Rect.Inset(50, 50);
// Add some text
doc.FontSize = 48;
doc.Pos.String = "50 690";
int id = doc.AddText("Abc");
// Render images
doc.Rect.String = doc.GetInfo(id, "rect");
doc.Rendering.AntiAliasText = true;
Bitmap antialiasedBitmap = doc.Rendering.GetBitmap();
doc.Rendering.AntiAliasText = false;
Bitmap aliasedBitmap = doc.Rendering.GetBitmap();
// Add enlarged images to the pdf file
doc.Rect.Magnify(5, 5);
doc.Rect.Move(0, -300);
doc.AddImageBitmap(aliasedBitmap, false);
doc.Rect.Move(0, -300);
doc.AddImageBitmap(antialiasedBitmap, false);
// Annotate
doc.Rect.String = doc.MediaBox.String;
doc.Color.String = "255 0 0";
doc.FontSize = 36;
doc.Pos.String = "50 740";
doc.AddText("Original text:");
doc.Pos.String = "50 620";
doc.AddText("Magnified aliased image:");
doc.Pos.String = "50 320";
doc.AddText("Magnified antialiased image:");
// Save render of pdf files
doc.Rendering.AntiAliasText = true;
doc.Rendering.DotsPerInch = 36;
doc.Rendering.Save(Server.MapPath("RenderingAntiAliasText.png"));
}
Using doc As New Doc()
doc.Rect.Inset(50, 50)
' Add some text
doc.FontSize = 48
doc.Pos.String = "50 690"
Dim id As Integer = doc.AddText("Abc")
' Render images
doc.Rect.String = doc.GetInfo(id, "rect")
doc.Rendering.AntiAliasText = True
Dim antialiasedBitmap As Bitmap = doc.Rendering.GetBitmap()
doc.Rendering.AntiAliasText = False
Dim aliasedBitmap As Bitmap = doc.Rendering.GetBitmap()
' Add enlarged images to the pdf file
doc.Rect.Magnify(5, 5)
doc.Rect.Move(0, -300)
doc.AddImageBitmap(aliasedBitmap, False)
doc.Rect.Move(0, -300)
doc.AddImageBitmap(antialiasedBitmap, False)
' Annotate
doc.Rect.String = doc.MediaBox.[String]
doc.Color.String = "255 0 0"
doc.FontSize = 36
doc.Pos.String = "50 740"
doc.AddText("Original text:")
doc.Pos.String = "50 620"
doc.AddText("Magnified aliased image:")
doc.Pos.String = "50 320"
doc.AddText("Magnified antialiased image:")
' Save render of pdf files
doc.Rendering.AntiAliasText = True
doc.Rendering.DotsPerInch = 36
doc.Rendering.Save(Server.MapPath("RenderingAntiAliasText.png"))
End Using