Method Save
- Namespace
- BitMiracle.Docotic.Pdf
- Assembly
- BitMiracle.Docotic.Pdf.dll
Save(string, IEnumerable<PdfCharacterCode>)
Converts text to an image and saves the result to a file.
public double[] Save(string fileName, IEnumerable<PdfCharacterCode> characterCodes)
Parameters
fileName
stringThe name of the file to save the rendered text to.
characterCodes
IEnumerable<PdfCharacterCode>The collection of character codes that defines the text to render. Must not be empty.
Returns
- 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.
Save(Stream, IEnumerable<PdfCharacterCode>)
Converts text to an image and saves the result to a stream.
public double[] Save(Stream stream, IEnumerable<PdfCharacterCode> characterCodes)
Parameters
stream
StreamThe stream to save the rendered text to.
characterCodes
IEnumerable<PdfCharacterCode>The collection of character codes that defines the text to render. Must not be empty.
Returns
- 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.