PdfSharp.Xps  1.1.15
PdfSharp.Xps.XpsConverter Class Reference

Main class that provides the functionallity to convert an XPS file into a PDF file. More...

Classes

class  ConvertOptions
 

Public Member Functions

 XpsConverter (PdfDocument pdfDocument, XpsDocument xpsDocument)
 Initializes a new instance of the XpsConverter class. More...
 
 XpsConverter (PdfDocument pdfDocument, string xpsDocumentPath)
 Initializes a new instance of the XpsConverter class. More...
 
PdfPage CreatePage (int xpsPageIndex)
 HACK More...
 
void RenderPage (PdfPage page, int xpsPageIndex)
 Renders an XPS document page to the specified PDF page. More...
 

Static Public Member Functions

static void Convert (string xpsFilename)
 Converts the specified PDF file into an XPS file. The new file is stored in the same directory. More...
 
static void Convert (string xpsFilename, string pdfFilename, int docInde)
 Implements the PDF file to XPS file conversion. More...
 
static void Convert (string xpsFilename, string pdfFilename, int docIndex, bool createComparisonDocument)
 Implements the PDF file to XPS file conversion. More...
 
static void Convert (string xpsFilename, string pdfFilename, int docIndex, bool createComparisonDocument, ConvertOptions opts=null)
 
static void Convert (Stream xpsInStream, Stream pdfOutStream, bool closePdfStream)
 Implements the PDF file to XPS file conversion. More...
 
static void Convert (Stream xpsInStream, Stream pdfOutStream, bool closePdfStream, ConvertOptions opts=null)
 Implements the PDF file to XPS file conversion. More...
 
static PdfDocument Convert (IEnumerable< FixedPage > pages)
 Converts a set of FixedPages from at least one XPS document into a PdfDocument. This method can be used to merge multiple XPS documents into a single PDF. More...
 
static void SaveXpsPageToBitmap (string xpsFileName)
 
static BitmapSource BitmapSourceFromPage (DocumentPage docPage, double resolution)
 

Properties

PdfDocument PdfDocument [get]
 Gets the PDF document of this converter. More...
 
XpsDocument XpsDocument [get]
 Gets the XPS document of this converter. More...
 

Detailed Description

Main class that provides the functionallity to convert an XPS file into a PDF file.

Constructor & Destructor Documentation

◆ XpsConverter() [1/2]

PdfSharp.Xps.XpsConverter.XpsConverter ( PdfDocument  pdfDocument,
XpsDocument  xpsDocument 
)

Initializes a new instance of the XpsConverter class.

Parameters
pdfDocumentThe PDF document.
xpsDocumentThe XPS document.

◆ XpsConverter() [2/2]

PdfSharp.Xps.XpsConverter.XpsConverter ( PdfDocument  pdfDocument,
string  xpsDocumentPath 
)

Initializes a new instance of the XpsConverter class.

Parameters
pdfDocumentThe PDF document.
xpsDocumentPathThe XPS document path.

Member Function Documentation

◆ BitmapSourceFromPage()

static BitmapSource PdfSharp.Xps.XpsConverter.BitmapSourceFromPage ( DocumentPage  docPage,
double  resolution 
)
static

◆ Convert() [1/7]

static PdfDocument PdfSharp.Xps.XpsConverter.Convert ( IEnumerable< FixedPage pages)
static

Converts a set of FixedPages from at least one XPS document into a PdfDocument. This method can be used to merge multiple XPS documents into a single PDF.

Parameters
pagesA collection of FixedPages to render to PDF.
Returns
A PDF document that contains the converted version of the pages passed in.

◆ Convert() [2/7]

static void PdfSharp.Xps.XpsConverter.Convert ( Stream  xpsInStream,
Stream  pdfOutStream,
bool  closePdfStream 
)
static

Implements the PDF file to XPS file conversion.

◆ Convert() [3/7]

static void PdfSharp.Xps.XpsConverter.Convert ( Stream  xpsInStream,
Stream  pdfOutStream,
bool  closePdfStream,
ConvertOptions  opts = null 
)
static

Implements the PDF file to XPS file conversion.

◆ Convert() [4/7]

static void PdfSharp.Xps.XpsConverter.Convert ( string  xpsFilename)
static

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

◆ Convert() [5/7]

static void PdfSharp.Xps.XpsConverter.Convert ( string  xpsFilename,
string  pdfFilename,
int  docInde 
)
static

Implements the PDF file to XPS file conversion.

◆ Convert() [6/7]

static void PdfSharp.Xps.XpsConverter.Convert ( string  xpsFilename,
string  pdfFilename,
int  docIndex,
bool  createComparisonDocument 
)
static

Implements the PDF file to XPS file conversion.

◆ Convert() [7/7]

static void PdfSharp.Xps.XpsConverter.Convert ( string  xpsFilename,
string  pdfFilename,
int  docIndex,
bool  createComparisonDocument,
ConvertOptions  opts = null 
)
static

◆ CreatePage()

PdfPage PdfSharp.Xps.XpsConverter.CreatePage ( int  xpsPageIndex)

HACK

◆ RenderPage()

void PdfSharp.Xps.XpsConverter.RenderPage ( PdfPage  page,
int  xpsPageIndex 
)

Renders an XPS document page to the specified PDF page.

Parameters
pageThe target PDF page. The page must belong to the PDF document of this converter.
xpsPageIndexThe zero-based XPS page number.

◆ SaveXpsPageToBitmap()

static void PdfSharp.Xps.XpsConverter.SaveXpsPageToBitmap ( string  xpsFileName)
static

Property Documentation

◆ PdfDocument

PdfDocument PdfSharp.Xps.XpsConverter.PdfDocument
get

Gets the PDF document of this converter.

◆ XpsDocument

XpsDocument PdfSharp.Xps.XpsConverter.XpsDocument
get

Gets the XPS document of this converter.


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