C# Class PdfSharp.Xps.XpsConverter

Main class that provides the functionallity to convert an XPS file into a PDF file.
Show file Open project: homoluden/WPF2PDF

Private Properties

Property Type Description

Public Methods

Method Description
BitmapSourceFromPage ( System.Windows.Documents.DocumentPage docPage, double resolution ) : System.Windows.Media.Imaging.BitmapSource
Convert ( PdfSharp.Xps.XpsModel.XpsDocument xpsDocument, string pdfFilename, int docIndex ) : void

Implements the PDF file to XPS file conversion.

Convert ( string xpsFilename ) : void

Converts the specified PDF file into an XPS file. The new file is stored in the same directory.

Convert ( string xpsFilename, string pdfFilename, int docInde ) : void

Implements the PDF file to XPS file conversion.

Convert ( string xpsFilename, string pdfFilename, int docIndex, bool createComparisonDocument ) : void

Implements the PDF file to XPS file conversion.

CreatePage ( int xpsPageIndex ) : PdfPage

HACK

Initialize ( ) : void
RenderPage ( PdfPage page, int xpsPageIndex ) : void

Renders an XPS document page to the specified PDF page.

SaveXpsPageToBitmap ( string xpsFileName ) : void
XpsConverter ( PdfSharp.Pdf.PdfDocument pdfDocument, PdfSharp.Xps.XpsModel.XpsDocument xpsDocument ) : System

Initializes a new instance of the XpsConverter class.

XpsConverter ( PdfSharp.Pdf.PdfDocument pdfDocument, string xpsDocumentPath ) : System

Initializes a new instance of the XpsConverter class.

Method Details

BitmapSourceFromPage() static public method

static public BitmapSourceFromPage ( System.Windows.Documents.DocumentPage docPage, double resolution ) : System.Windows.Media.Imaging.BitmapSource
docPage System.Windows.Documents.DocumentPage
resolution double
return System.Windows.Media.Imaging.BitmapSource

Convert() public static method

Implements the PDF file to XPS file conversion.
public static Convert ( PdfSharp.Xps.XpsModel.XpsDocument xpsDocument, string pdfFilename, int docIndex ) : void
xpsDocument PdfSharp.Xps.XpsModel.XpsDocument
pdfFilename string
docIndex int
return void

Convert() public static method

Converts the specified PDF file into an XPS file. The new file is stored in the same directory.
public static Convert ( string xpsFilename ) : void
xpsFilename string
return void

Convert() public static method

Implements the PDF file to XPS file conversion.
public static Convert ( string xpsFilename, string pdfFilename, int docInde ) : void
xpsFilename string
pdfFilename string
docInde int
return void

Convert() public static method

Implements the PDF file to XPS file conversion.
public static Convert ( string xpsFilename, string pdfFilename, int docIndex, bool createComparisonDocument ) : void
xpsFilename string
pdfFilename string
docIndex int
createComparisonDocument bool
return void

CreatePage() public method

HACK
public CreatePage ( int xpsPageIndex ) : PdfPage
xpsPageIndex int
return PdfSharp.Pdf.PdfPage

Initialize() public method

public Initialize ( ) : void
return void

RenderPage() public method

Renders an XPS document page to the specified PDF page.
public RenderPage ( PdfPage page, int xpsPageIndex ) : void
page PdfSharp.Pdf.PdfPage The target PDF page. The page must belong to the PDF document of this converter.
xpsPageIndex int The zero-based XPS page number.
return void

SaveXpsPageToBitmap() static public method

static public SaveXpsPageToBitmap ( string xpsFileName ) : void
xpsFileName string
return void

XpsConverter() public method

Initializes a new instance of the XpsConverter class.
public XpsConverter ( PdfSharp.Pdf.PdfDocument pdfDocument, PdfSharp.Xps.XpsModel.XpsDocument xpsDocument ) : System
pdfDocument PdfSharp.Pdf.PdfDocument The PDF document.
xpsDocument PdfSharp.Xps.XpsModel.XpsDocument The XPS document.
return System

XpsConverter() public method

Initializes a new instance of the XpsConverter class.
public XpsConverter ( PdfSharp.Pdf.PdfDocument pdfDocument, string xpsDocumentPath ) : System
pdfDocument PdfSharp.Pdf.PdfDocument The PDF document.
xpsDocumentPath string The XPS document path.
return System