PdfTextRasterizer.Save Method (Stream, IEnumerable(PdfCharacterCode))

Converts text to an image and saves the result to a stream.

Namespace:  BitMiracle.Docotic.Pdf
Assembly:  BitMiracle.Docotic.Pdf (in BitMiracle.Docotic.Pdf.dll)

Syntax

C#
public double[] Save(
	Stream stream,
	IEnumerable<PdfCharacterCode> characterCodes
)
VB
Public Function Save ( 
	stream As Stream,
	characterCodes As IEnumerable(Of PdfCharacterCode)
) As Double()

Parameters

stream
Type: System.IO.Stream
The stream to save the rendered text to.
characterCodes
Type: System.Collections.Generic.IEnumerable<PdfCharacterCode>
The collection of character codes that defines the text to render. Must not be empty.

Return Value

Type: Double[]
The collection of rendered character widths in points (1/72 inch). Widths do not include character spacing.

Remarks

The output image contains all the text rendered in one line.

This method produces grayscale PNG images without an alpha channel.

You can get character codes using the GetCharCodes() method. Another source of character codes is the handler specified by the UnmappedCharacterCodeHandler property.

See Also