VectSharp  2.2.1
A light library for C# vector graphics
VectSharp.PDF.PDFContextInterpreter Class Reference

Contains methods to render a Document as a PDF document. More...

Classes

class  FilterOption
 Determines how and whether image filters are rasterised. More...
 

Public Types

enum  TextOptions { TextOptions.SubsetFonts, TextOptions.ConvertIntoPaths }
 Defines whether the used fonts should be included in the file. More...
 

Static Public Member Functions

static void SaveAsPDF (this Document document, string fileName, TextOptions textOption=TextOptions.SubsetFonts, bool compressStreams=true, Dictionary< string, string > linkDestinations=null, FilterOption filterOption=default)
 Save the document to a PDF file. More...
 
static void SaveAsPDF (this Document document, Stream stream, TextOptions textOption=TextOptions.SubsetFonts, bool compressStreams=true, Dictionary< string, string > linkDestinations=null, FilterOption filterOption=default)
 Save the document to a PDF stream. More...
 

Detailed Description

Contains methods to render a Document as a PDF document.

Definition at line 828 of file PDFContext.cs.

Member Enumeration Documentation

◆ TextOptions

Defines whether the used fonts should be included in the file.

Enumerator
SubsetFonts 

Embeds subsetted font files containing only the glyphs for the characters that have been used.

ConvertIntoPaths 

Does not embed any font file and converts all text items into paths.

Definition at line 1123 of file PDFContext.cs.

Member Function Documentation

◆ SaveAsPDF() [1/2]

static void VectSharp.PDF.PDFContextInterpreter.SaveAsPDF ( this Document  document,
Stream  stream,
TextOptions  textOption = TextOptions.SubsetFonts,
bool  compressStreams = true,
Dictionary< string, string >  linkDestinations = null,
FilterOption  filterOption = default 
)
static

Save the document to a PDF stream.

Parameters
documentThe Document to save.
streamThe stream to which the PDF data will be written.
textOptionDefines whether the used fonts should be included in the file.
compressStreamsIndicates whether the streams in the PDF file should be compressed.
linkDestinationsA dictionary associating element tags to link targets. If this is provided, objects that have been drawn with a tag contained in the dictionary will become hyperlink to the destination specified in the dictionary. If the destination starts with a hash (#), it is interpreted as the tag of another object in the current document; otherwise, it is interpreted as an external URI.
filterOptionDefines how and whether image filters should be rasterised when rendering the image.

Definition at line 1207 of file PDFContext.cs.

◆ SaveAsPDF() [2/2]

static void VectSharp.PDF.PDFContextInterpreter.SaveAsPDF ( this Document  document,
string  fileName,
TextOptions  textOption = TextOptions.SubsetFonts,
bool  compressStreams = true,
Dictionary< string, string >  linkDestinations = null,
FilterOption  filterOption = default 
)
static

Save the document to a PDF file.

Parameters
documentThe Document to save.
fileNameThe full path to the file to save. If it exists, it will be overwritten.
textOptionDefines whether the used fonts should be included in the file.
compressStreamsIndicates whether the streams in the PDF file should be compressed.
linkDestinationsA dictionary associating element tags to link targets. If this is provided, objects that have been drawn with a tag contained in the dictionary will become hyperlink to the destination specified in the dictionary. If the destination starts with a hash (#), it is interpreted as the tag of another object in the current document; otherwise, it is interpreted as an external URI.
filterOptionDefines how and whether image filters should be rasterised when rendering the image.

Definition at line 1112 of file PDFContext.cs.


The documentation for this class was generated from the following file: