Encoder

Base class from which encoders are derived.

public abstract class Encoder
Public MustInherit Class Encoder

Inheritance: ObjectEncoder

Derived: SingleByteEncoder

Licensing Info

This class is a DynamicPDF Core Suite Essentials feature. One of the following is required for non-evaluation usage:

Examples

This example shows how to Change the encoding of a built in font.
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.Text
Imports ceTe.DynamicPDF.PageElements
	 
Module MyModule
	 		
	Sub Main()
	 		
	    ' Create a PDF Document
	    Dim MyDocument As Document = New Document 
	 		
	    ' Create a Page and add it to the document
	    Dim MyPage As Page = New Page
	    MyDocument.Pages.Add(MyPage)
	 		
	    ' Create a core font with a specified encoding
	    Dim MyCentralEuropeHelveticaFont As Font = New Helvetica(Encoder.CentralEurope)
	    ' Use the font in a text area Page Element
	    MyPage.Elements.Add(New TextArea("Text using the Central Europe encoder", 0, 0, 200, 12, MyCentralEuropeHelveticaFont, 12))
	 
	    ' Save the PDF document
	    MyDocument.Draw("C:\MyDocument.pdf")
	 		
	End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.Text;
using ceTe.DynamicPDF.PageElements;

public class Example
{
    public static void CreatePDF(string outputPath)
    {
        //Create a PDF Document
        Document document = new Document();

        // Create a Page and add it to the document
        Page page = new Page();
        document.Pages.Add(page);

        // Create a core font with a specified encoding
        Font centralEuropeHelveticaFont = new Helvetica(Encoder.CentralEurope);

        // Use the font in a text area Page Element
        page.Elements.Add(new TextArea("Text using the Central Europe encoder", 0, 0, 250, 12, centralEuropeHelveticaFont, 12));
 
        // Save the PDF
        document.Draw(outputPath);
    } 
}

Remarks

This class contains the static properties from which all encodings are accessed. See the Text Encodings topic for more details on this.

Properties

BalticGets the Baltic encoder.
CentralEuropeGets the central Europe encoder.
Latin1Gets the Latin 1 encoder.
Latin2Gets the Latin 2 (WINANSI) encoder.
Latin9Gets the Latin 9 encoder.
SpaceIs0x20Gets a value indicating if the encoder uses a single byte 0x20 value for spaces.
TurkishGets the Turkish encoder.
UnicodeGets the Unicode encoder.

Methods

DrawEncoding(DocumentWriter)Draws the encoding to the given DocumentWriter object.
Encode(FontSubsetter, Char[], Int32, Int32, Boolean)Encodes the specified text.
Equals(Object)Determines whether the specified Object is equal to the current Object .
(Inherited from Object)
GetHashCode()Serves as a hash function for a particular type.
(Inherited from Object)
GetType()Gets the Type of the current instance.
(Inherited from Object)
ToString()Returns a String that represents the current Object .
(Inherited from Object)

See Also

ceTe.DynamicPDF.Text

In this topic