Show / Hide Table of Contents

Class Convert.WPFConverterOptions

pdftron.PDF.Convert can be used to to convert .xaml files into PDF documents with control over headers and footers, main body placement, and column widths. Pagination is controlled by specifying the page size and body size (margins) and all pages are appended to a PDFDoc which can then be further manipulated using the PDFNet API.

Three types of XAML objects are convertible using pdftron.PDF.Convert:

  • FlowDocument's which describe content that is reflowable from page to page
  • FixedDocument's which describe content that has been placed on a fixed page
  • Blocks such as Canvas, RichTextBox, Section etc which can be wrapped or inserted directly into a FlowDocument

Limitations: There are many Xaml classes that cannot be added to FlowDocument or FixedDocuments and therefore this sample converter cannot convert them. Examples include Page, Window or Frame objects.

Inheritance
object
Convert.WPFConverterOptions
Inherited Members
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
Namespace: pdftron.PDF
Assembly: PDFNet.dll
Syntax
public class Convert.WPFConverterOptions

Constructors

WPFConverterOptions()

Default constructor. Sets the page size to (8.5 x 11), and margins to 1/2 inch. Number of columns to 0 (don't override input) and no header and footer functions.

Declaration
public WPFConverterOptions()

Properties

BodyRect

The Rectangle bounding the body area for the content. FlowDocuments will reflow their content to fit within this bounding area as best they can. FixedDocuments may reflow. Relative to PageSize, origin is at upper left (x1, y1), and increases down to right.

Declaration
public Rect BodyRect { get; set; }
Property Value
Type Description
Rect

FooterFunc

Store for the Footer drawing function. Drawn after the header, and before the body is drawn.

Declaration
public Convert.WPFConverterOptions.DrawHeaderFooter FooterFunc { get; set; }
Property Value
Type Description
Convert.WPFConverterOptions.DrawHeaderFooter

FooterRect

The Rectangle bounding the Footer area, typically below the body area. Relative to the PageSize, origin is at the upper left (x1, y1), and increases down to right.

Declaration
public Rect FooterRect { get; set; }
Property Value
Type Description
Rect

HeaderFunc

Store for the Header drawing function. Drawn before the body is drawn.

Declaration
public Convert.WPFConverterOptions.DrawHeaderFooter HeaderFunc { get; set; }
Property Value
Type Description
Convert.WPFConverterOptions.DrawHeaderFooter

HeaderRect

The Rectangle bounding the Header area, typically above the body area. Relative to the PageSize, origin is at upper left (x1, y1), and increases down to right.

Declaration
public Rect HeaderRect { get; set; }
Property Value
Type Description
Rect

NumColumns

Number of columns for FlowDocument layout as an override for any defined column width in the FlowDocument. If NumColumns == 0, then the default FlowDocument column widths are used, otherwise BodyRect.Width()/NumColumns is used. See the example CreateXamlTableAndConvert.

Declaration
public int NumColumns { get; set; }
Property Value
Type Description
int

PageSize

The page size in 96 dpi units (as used in XPS)

Declaration
public Size PageSize { get; set; }
Property Value
Type Description
Size
In This Article
Back to top Generated by DocFX