Class Convert
Converter is a utility class used to convert documents and files to PDF. Conversion of XPS, EMF and image files to PDF documents is performed internally. Other document formats are converted via native application and printing.
using namespace pdftron;
using namespace PDF;
PDFDoc pdfdoc;
Convert.FromXps(pdfdoc, input_path + "simple-xps.xps" );
Convert.FromEmf(pdfdoc, input_path + "simple-emf.emf" );
Convert.ToPdf(pdfdoc, input_path + test docx file.docx );
// Save the PDF document
UString outputFile = output_path + "ConverterTest.pdf";
pdfdoc.Save(outputFile, 0);
pdfdoc.Close();
}</code></pre>
The PDFTron PDFNet printer needs to be installed to convert document formats. On Windows installation of printer drivers requires administrator UAC. The printer is a virtual XPS printer supported on Vista and Windows 7, and on Windows XP with the XPS Essentials Pack.
To install the printer the process must be running as administrator. Execute:
ConvertPrinter.install();
Installation can take a few seconds, so it is recommended that you install the printer once as part of your deployment process. Duplicated installations will be quick since the presence of the printer is checked before installation is attempted.
There is no need to uninstall the printer after conversions, it can be left installed for later access. To uninstall the printer the process must be running as administrator. Execute:
ConvertPrinter.uninstall();
Implements
Inherited Members
Namespace: pdftron.PDF
Assembly: PDFNet.dll
Syntax
public class Convert : IDisposable
Methods
CreateOfficeTemplate(string, ConversionOptions)
Declaration
public static TemplateDocument CreateOfficeTemplate(string in_filename, ConversionOptions options)
Parameters
Type | Name | Description |
---|---|---|
string | in_filename | |
ConversionOptions | options |
Returns
Type | Description |
---|---|
TemplateDocument |
CreateOfficeTemplate(Filter, ConversionOptions)
Declaration
public static TemplateDocument CreateOfficeTemplate(Filter in_stream, ConversionOptions options)
Parameters
Type | Name | Description |
---|---|---|
Filter | in_stream | |
ConversionOptions | options |
Returns
Type | Description |
---|---|
TemplateDocument |
CreateReflow(Page, string)
Create a Reflow object.
Declaration
public static Reflow CreateReflow(Page in_page, string json_zones)
Parameters
Type | Name | Description |
---|---|---|
Page | in_page | the Page to convert |
string | json_zones | pre-recognized zoning information in JSON format |
Returns
Type | Description |
---|---|
Reflow | A Reflow object |
Dispose()
Releases all resources used by the Convert
Declaration
public override sealed void Dispose()
Dispose(bool)
Declaration
[HandleProcessCorruptedStateExceptions]
protected virtual void Dispose(bool A_0)
Parameters
Type | Name | Description |
---|---|---|
bool | A_0 |
~Convert()
Declaration
protected ~Convert()
FromCAD(PDFDoc, string, CADConvertOptions)
Convert the specified CAD file to PDF and append converted pages to the specified PDF document. This conversion requires that the optional PDFTron CAD add-on module is available. See also: the 'CADModule' class
Declaration
public static void FromCAD(PDFDoc in_pdfdoc, string in_filename, CADConvertOptions options)
Parameters
Type | Name | Description |
---|---|---|
PDFDoc | in_pdfdoc | the PDFDoc to append to |
string | in_filename | the path to the CAD document to convert |
CADConvertOptions | options | The options to use when converting. |
Remarks
See the CADConvertOptions
class for the available options.
FromDICOM(PDFDoc, string, AdvancedImagingConvertOptions)
Convert the specified AdvancedImaging (i.e. DICOM) file to PDF and append converted pages to the specified PDF document. This conversion requires that the optional PDFTron AdvancedImaging add-on module is available. See also: the 'AdvancedImagingModule' class
Declaration
public static void FromDICOM(PDFDoc in_pdfdoc, string in_filename, AdvancedImagingConvertOptions options)
Parameters
Type | Name | Description |
---|---|---|
PDFDoc | in_pdfdoc | the PDFDoc to append to |
string | in_filename | the path to the AdvancedImaging document to convert |
AdvancedImagingConvertOptions | options | The options to use when converting. |
Remarks
See the AdvancedImagingConvertOptions
class for the available options.
FromEmf(PDFDoc, string)
Convert the specified EMF to PDF and append converted pages to the specified PDF document. EMF will be fitted to the page.
Declaration
public static void FromEmf(PDFDoc in_pdfdoc, string in_filename)
Parameters
Type | Name | Description |
---|---|---|
PDFDoc | in_pdfdoc | the PDFDoc to append to |
string | in_filename | the path to the EMF document to convert |
Remarks
This method is available only on Windows platforms.
Exceptions
Type | Condition |
---|---|
PDFNetException | PDFNetException the PDFNet exception |
FromSVG(PDFDoc, string, SVGConvertOptions)
Convert the specified SVG file to PDF and append converted pages to the specified PDF document.
Declaration
public static void FromSVG(PDFDoc in_doc, string in_filename, SVGConvertOptions svg_options)
Parameters
Type | Name | Description |
---|---|---|
PDFDoc | in_doc | the PDFDoc to append to |
string | in_filename | the path to the SVG file to convert |
SVGConvertOptions | svg_options | the options to use when converting |
FromText(PDFDoc, string, Obj)
Convert the specified plain text file to PDF and append converted pages to the specified PDF document.
Declaration
public static void FromText(PDFDoc in_pdfdoc, string in_filename, Obj options)
Parameters
Type | Name | Description |
---|---|---|
PDFDoc | in_pdfdoc | the PDFDoc to append to |
string | in_filename | the path to the plain text document to convert |
Obj | options |
Remarks
in_options the conversion options. The availble options are: | Option Name | Type | Note | |-------------------------|---------|---------------------------------------------------------| | BytesPerBite | Integer | In bytes. Use for streaming conversion only. | | FontFace | String | Set the font face used for the conversion. | | FontSize | Integer | Set the font size used for the conversion. | | LineHeightMultiplier | Double | Set the line height multiplier used for the conversion. | | MarginBottom | Double | In inches. Set the bottom margin of the page. | | MarginLeft | Double | In inches. Set the left margin of the page. | | MarginRight | Double | In inches. Set the right margin of the page. | | MarginTop | Double | In inches. Set the top margin of the page. | | PageHeight | Double | In inches. Set the page height. | | PageWidth | Double | In inches. Set the page width. | | UseSourceCodeFormatting | Boolean | Set whether to use mono font for the conversion. |
FromXps(PDFDoc, byte[], int)
Convert the specified XPS document contained in memory to PDF and append converted pages to the specified PDF document.
Declaration
public static void FromXps(PDFDoc in_pdfdoc, byte[] buf, int buf_size)
Parameters
Type | Name | Description |
---|---|---|
PDFDoc | in_pdfdoc | the PDFDoc to append to |
byte[] | buf | the buffer containing the xps document |
int | buf_size | the size of the buffer |
Exceptions
Type | Condition |
---|---|
PDFNetException | PDFNetException the PDFNet exception |
FromXps(PDFDoc, string)
Convert the specified XPS document to PDF and append converted pages to the specified PDF document.
Declaration
public static void FromXps(PDFDoc in_pdfdoc, string in_filename)
Parameters
Type | Name | Description |
---|---|---|
PDFDoc | in_pdfdoc | the PDFDoc to append to |
string | in_filename | the path to the XPS document to convert |
Exceptions
Type | Condition |
---|---|
PDFNetException | PDFNetException the PDFNet exception |
OfficeToPDF(PDFDoc, string, ConversionOptions)
Convert the an office document (in .docx, .xlsx, pptx, or .doc format) to pdf and append to the specified PDF document. This conversion is performed entirely within PDFNet, and does not rely on Word interop or any other external functionality.
Font requirements: on some systems you may need to specify extra font resources to aid in conversion. Please see http://www.pdftron.com/kb_fonts_and_builtin_office_conversion
Declaration
public static void OfficeToPDF(PDFDoc doc, string filePath, ConversionOptions options)
Parameters
Type | Name | Description |
---|---|---|
PDFDoc | doc | the conversion result will be appended to this pdf |
string | filePath | the path to the source document |
ConversionOptions | options | the conversion options |
Remarks
see StreamingPDFConversion() if you would like more control over the conversion process
OfficeToPDF(PDFDoc, Filter, ConversionOptions)
Convert the an office document (in .docx, .xlsx, pptx, or .doc format) to pdf and append to the specified PDF document. This conversion is performed entirely within PDFNet, and does not rely on Word interop or any other external functionality.
Font requirements: on some systems you may need to specify extra font resources to aid in conversion. Please see http://www.pdftron.com/kb_fonts_and_builtin_office_conversion
Declaration
public static void OfficeToPDF(PDFDoc doc, Filter in_stream, ConversionOptions options)
Parameters
Type | Name | Description |
---|---|---|
PDFDoc | doc | the conversion result will be appended to this pdf |
Filter | in_stream | the source data stream. |
ConversionOptions | options | the conversion options |
Remarks
see StreamingPDFConversion() if you would like more control over the conversion process
RequiresPrinter(string)
Utility function to determine if ToPdf will require the PDFNet printer to convert a specific file to PDF.
Declaration
public static bool RequiresPrinter(string in_filename)
Parameters
Type | Name | Description |
---|---|---|
string | in_filename | the path to the document to be checked |
Returns
Type | Description |
---|---|
bool | true if ToPdf requires the printer to convert the file, false otherwise. |
Remarks
Current implementation looks only at the file extension not file contents. If the file extension is missing, false will be returned
Exceptions
Type | Condition |
---|---|
PDFNetException | PDFNetException the PDFNet exception |
StreamingPDFConversion(string, ConversionOptions)
Create a DocumentConversion object suitable for converting a file to pdf.
This conversion will be performed entirely within PDFNet, and handles incoming files in .docx, .xlsx, .pptx, .doc, .ppt, .xls, .png, .jpg, .bmp, .gif, .jp2, .tif, .txt, .xml and .md format
This method does not perform any conversion logic and can be expected to return quickly. To do the actual conversion, use the returned DocumentConversion object (see PDF.DocumentConversion)
Font requirements: on some systems you may need to specify extra font resources to aid in conversion. Please see http://www.pdftron.com/kb_fonts_and_builtin_office_conversion
Declaration
public static DocumentConversion StreamingPDFConversion(string filePath, ConversionOptions options)
Parameters
Type | Name | Description |
---|---|---|
string | filePath | the path to the source document |
ConversionOptions | options | the conversion options |
Returns
Type | Description |
---|---|
DocumentConversion | A DocumentConversion object which encapsulates this particular conversion |
StreamingPDFConversion(Filter, ConversionOptions)
Create a DocumentConversion object suitable for converting a file to pdf.
This conversion will be performed entirely within PDFNet, and handles incoming files in .docx, .xlsx, .pptx, .doc, .ppt, .xls, .png, .jpg, .bmp, .gif, .jp2, .tif, .txt, .xml and .md format
This method does not perform any conversion logic and can be expected to return quickly. To do the actual conversion, use the returned DocumentConversion object (see PDF.DocumentConversion)
Font requirements: on some systems you may need to specify extra font resources to aid in conversion. Please see http://www.pdftron.com/kb_fonts_and_builtin_office_conversion
Declaration
public static DocumentConversion StreamingPDFConversion(Filter in_stream, ConversionOptions options)
Parameters
Type | Name | Description |
---|---|---|
Filter | in_stream | the source data stream |
ConversionOptions | options | the conversion options |
Returns
Type | Description |
---|---|
DocumentConversion | A DocumentConversion object which encapsulates this particular conversion |
Remarks
see StreamingPDFConversion() if you would like more control over the conversion process
StreamingPDFConversion(PDFDoc, string, ConversionOptions)
Create a DocumentConversion object suitable for converting a file to pdf and appending to an existing PDF document.
This conversion will be performed entirely within PDFNet, and handles incoming files in .docx, .xlsx, .pptx, .doc, .ppt, .xls, .png, .jpg, .bmp, .gif, .jp2, .tif, .txt, .xml and .md format
This method does not perform any conversion logic and can be expected to return quickly. To do the actual conversion, use the returned DocumentConversion object (see PDF.DocumentConversion)
Font requirements: on some systems you may need to specify extra font resources to aid in conversion. Please see http://www.pdftron.com/kb_fonts_and_builtin_office_conversion
Declaration
public static DocumentConversion StreamingPDFConversion(PDFDoc doc, string filePath, ConversionOptions options)
Parameters
Type | Name | Description |
---|---|---|
PDFDoc | doc | the conversion result will be appended to this pdf |
string | filePath | the path to the source document |
ConversionOptions | options | the conversion options |
Returns
Type | Description |
---|---|
DocumentConversion | A DocumentConversion object which encapsulates this particular conversion |
StreamingPDFConversion(PDFDoc, Filter, ConversionOptions)
Create a DocumentConversion object suitable for converting a file to pdf and appending to an existing PDF document.
This conversion will be performed entirely within PDFNet, and handles incoming files in .docx, .xlsx, .pptx, .doc, .ppt, .xls, .png, .jpg, .bmp, .gif, .jp2, .tif, .txt, .xml and .md format
This method does not perform any conversion logic and can be expected to return quickly. To do the actual conversion, use the returned DocumentConversion object (see PDF.DocumentConversion)
Font requirements: on some systems you may need to specify extra font resources to aid in conversion. Please see http://www.pdftron.com/kb_fonts_and_builtin_office_conversion
Declaration
public static DocumentConversion StreamingPDFConversion(PDFDoc doc, Filter in_stream, ConversionOptions options)
Parameters
Type | Name | Description |
---|---|---|
PDFDoc | doc | the conversion result will be appended to this pdf |
Filter | in_stream | the source data stream |
ConversionOptions | options | the conversion options |
Returns
Type | Description |
---|---|
DocumentConversion | A DocumentConversion object which encapsulates this particular conversion |
ToEmf(PDFDoc, string)
Convert the PDFDoc to EMF and save to the specified path.
Declaration
public static void ToEmf(PDFDoc in_pdfdoc, string in_filename)
Parameters
Type | Name | Description |
---|---|---|
PDFDoc | in_pdfdoc | the PDFDoc to convert to EMF |
string | in_filename | the path to the EMF files to create, one file per page |
Remarks
This method is available only on Windows platforms.
Exceptions
Type | Condition |
---|---|
PDFNetException | PDFNetException the PDFNet exception |
ToEmf(Page, string)
Convert the Page to EMF and save to the specified path.
Declaration
public static void ToEmf(Page in_page, string in_filename)
Parameters
Type | Name | Description |
---|---|---|
Page | in_page | the Page to convert to EMF |
string | in_filename | the path to the EMF file to create |
Remarks
This method is available only on Windows platforms.
Exceptions
Type | Condition |
---|---|
PDFNetException | PDFNetException the PDFNet exception |
ToEpub(string, string)
Convert a file to EPUB format and save to the specified path.
Declaration
public static void ToEpub(string in_filename, string output_path)
Parameters
Type | Name | Description |
---|---|---|
string | in_filename | the file to convert to EPUB |
string | output_path | the path to where generated content will be stored |
Remarks
Internally formats include BMP, EMF, JPEG, PNG, TIF, XPS, PDF. Formats that require external applications for conversion use the Convert::Printer class and the PDFNet printer to be installed. This is only supported on Windows platforms. Document formats in this category include RTF(MS Word or Wordpad), TXT (Notepad or Wordpad), DOC and DOCX (MS Word), PPT and PPTX (MS PowerPoint), XLS and XLSX (MS Excel), OpenOffice documents, HTML and MHT (Internet Explorer), PUB (MS Publisher), MSG (MS Outlook).
Exceptions
Type | Condition |
---|---|
PDFNetException | PDFNetException the PDFNet exception |
ToEpub(string, string, EPUBOutputOptions)
Convert a file to EPUB format and save to the specified path.
Declaration
public static void ToEpub(string in_filename, string output_path, Convert.EPUBOutputOptions epub_options)
Parameters
Type | Name | Description |
---|---|---|
string | in_filename | the file to convert to EPUB |
string | output_path | the path to where generated content will be stored |
Convert.EPUBOutputOptions | epub_options | the EPUB conversion options |
Remarks
Internally formats include BMP, EMF, JPEG, PNG, TIF, XPS, PDF. Formats that require external applications for conversion use the Convert::Printer class and the PDFNet printer to be installed. This is only supported on Windows platforms. Document formats in this category include RTF(MS Word or Wordpad), TXT (Notepad or Wordpad), DOC and DOCX (MS Word), PPT and PPTX (MS PowerPoint), XLS and XLSX (MS Excel), OpenOffice documents, HTML and MHT (Internet Explorer), PUB (MS Publisher), MSG (MS Outlook).
Exceptions
Type | Condition |
---|---|
PDFNetException | PDFNetException the PDFNet exception |
ToEpub(string, string, HTMLOutputOptions)
Convert a file to EPUB format and save to the specified path.
Declaration
public static void ToEpub(string in_filename, string output_path, Convert.HTMLOutputOptions html_options)
Parameters
Type | Name | Description |
---|---|---|
string | in_filename | the file to convert to EPUB |
string | output_path | the path to where generated content will be stored |
Convert.HTMLOutputOptions | html_options | the HTML conversion options |
Exceptions
Type | Condition |
---|---|
PDFNetException | PDFNetException the PDFNet exception |
ToEpub(string, string, HTMLOutputOptions, EPUBOutputOptions)
Convert a file to EPUB format and save to the specified path.
Declaration
public static void ToEpub(string in_filename, string output_path, Convert.HTMLOutputOptions html_options, Convert.EPUBOutputOptions epub_options)
Parameters
Type | Name | Description |
---|---|---|
string | in_filename | the file to convert to EPUB |
string | output_path | the path to where generated content will be stored |
Convert.HTMLOutputOptions | html_options | the HTML conversion options |
Convert.EPUBOutputOptions | epub_options | the EPUB conversion options |
Remarks
Internally formats include BMP, EMF, JPEG, PNG, TIF, XPS, PDF. Formats that require external applications for conversion use the Convert::Printer class and the PDFNet printer to be installed. This is only supported on Windows platforms. Document formats in this category include RTF(MS Word or Wordpad), TXT (Notepad or Wordpad), DOC and DOCX (MS Word), PPT and PPTX (MS PowerPoint), XLS and XLSX (MS Excel), OpenOffice documents, HTML and MHT (Internet Explorer), PUB (MS Publisher), MSG (MS Outlook).
Exceptions
Type | Condition |
---|---|
PDFNetException | PDFNetException the PDFNet exception |
ToEpub(PDFDoc, string)
Convert the PDFDoc to EPUB format and save to the specified path.
Declaration
public static void ToEpub(PDFDoc in_pdfdoc, string output_path)
Parameters
Type | Name | Description |
---|---|---|
PDFDoc | in_pdfdoc | the PDFDoc to convert to EPUB |
string | output_path | the path to where generated content will be stored |
Exceptions
Type | Condition |
---|---|
PDFNetException | PDFNetException the PDFNet exception |
ToEpub(PDFDoc, string, EPUBOutputOptions)
Convert the PDFDoc to EPUB format and save to the specified path.
Declaration
public static void ToEpub(PDFDoc in_pdfdoc, string output_path, Convert.EPUBOutputOptions epub_options)
Parameters
Type | Name | Description |
---|---|---|
PDFDoc | in_pdfdoc | the PDFDoc to convert to EPUB |
string | output_path | the path to where generated content will be stored |
Convert.EPUBOutputOptions | epub_options | the EPUB conversion options |
Exceptions
Type | Condition |
---|---|
PDFNetException | PDFNetException the PDFNet exception |
ToEpub(PDFDoc, string, HTMLOutputOptions)
Convert the PDFDoc to EPUB format and save to the specified path.
Declaration
public static void ToEpub(PDFDoc in_pdfdoc, string output_path, Convert.HTMLOutputOptions html_options)
Parameters
Type | Name | Description |
---|---|---|
PDFDoc | in_pdfdoc | the PDFDoc to convert to EPUB |
string | output_path | the path to where generated content will be stored |
Convert.HTMLOutputOptions | html_options | the HTML conversion options |
Exceptions
Type | Condition |
---|---|
PDFNetException | PDFNetException the PDFNet exception |
ToEpub(PDFDoc, string, HTMLOutputOptions, EPUBOutputOptions)
Convert the PDFDoc to EPUB format and save to the specified path.
Declaration
public static void ToEpub(PDFDoc in_pdfdoc, string output_path, Convert.HTMLOutputOptions html_options, Convert.EPUBOutputOptions epub_options)
Parameters
Type | Name | Description |
---|---|---|
PDFDoc | in_pdfdoc | the PDFDoc to convert to EPUB |
string | output_path | the path to where generated content will be stored |
Convert.HTMLOutputOptions | html_options | the HTML conversion options |
Convert.EPUBOutputOptions | epub_options | the EPUB conversion options |
Exceptions
Type | Condition |
---|---|
PDFNetException | PDFNetException the PDFNet exception |
ToExcel(string, string)
Convert a PDF file to Excel and save to the specified path.
This conversion requires that the optional PDFTron StructuredOutput add-on module is available.
See also: the StructuredOutputModule
class
Declaration
public static void ToExcel(string in_filename, string output_path)
Parameters
Type | Name | Description |
---|---|---|
string | in_filename | the file to convert to Excel |
string | output_path | the path to where generated content will be stored |
Exceptions
Type | Condition |
---|---|
PDFNetException | PDFNetException the PDFNet exception |
ToExcel(string, string, ExcelOutputOptions)
Convert a PDF file to Excel and save to the specified path.
This conversion requires that the optional PDFTron StructuredOutput add-on module is available.
See also: the StructuredOutputModule
class
Declaration
public static void ToExcel(string in_filename, string output_path, Convert.ExcelOutputOptions options)
Parameters
Type | Name | Description |
---|---|---|
string | in_filename | the file to convert to Excel |
string | output_path | the path to where generated content will be stored |
Convert.ExcelOutputOptions | options | the conversion options |
ToExcel(PDFDoc, string)
Convert the PDF to Excel and save to the specified path.
This conversion requires that the optional PDFTron StructuredOutput add-on module is available.
See also: the StructuredOutputModule
class
Declaration
public static void ToExcel(PDFDoc in_pdfdoc, string output_path)
Parameters
Type | Name | Description |
---|---|---|
PDFDoc | in_pdfdoc | the PDF doc to convert to Excel |
string | output_path | the path to where generated content will be stored |
Exceptions
Type | Condition |
---|---|
PDFNetException | PDFNetException the PDFNet exception |
ToExcel(PDFDoc, string, ExcelOutputOptions)
Convert the PDF to Excel and save to the specified path.
This conversion requires that the optional PDFTron StructuredOutput add-on module is available.
See also: the StructuredOutputModule
class
Declaration
public static void ToExcel(PDFDoc in_pdfdoc, string output_path, Convert.ExcelOutputOptions options)
Parameters
Type | Name | Description |
---|---|---|
PDFDoc | in_pdfdoc | the PDF doc to convert to Excel |
string | output_path | the path to where generated content will be stored |
Convert.ExcelOutputOptions | options | the conversion options |
Exceptions
Type | Condition |
---|---|
PDFNetException | PDFNetException the PDFNet exception |
ToHtml(string, string)
Convert a file to HTML and save to the specified path.
Declaration
public static void ToHtml(string in_filename, string output_path)
Parameters
Type | Name | Description |
---|---|---|
string | in_filename | the file to convert to HTML |
string | output_path | the path to where generated content will be stored |
Remarks
Internally formats include BMP, EMF, JPEG, PNG, TIF, XPS, PDF. Formats that require external applications for conversion use the Convert::Printer class and the PDFNet printer to be installed. This is only supported on Windows platforms. Document formats in this category include RTF(MS Word or Wordpad), TXT (Notepad or Wordpad), DOC and DOCX (MS Word), PPT and PPTX (MS PowerPoint), XLS and XLSX (MS Excel), OpenOffice documents, HTML and MHT (Internet Explorer), PUB (MS Publisher), MSG (MS Outlook).
Exceptions
Type | Condition |
---|---|
PDFNetException | PDFNetException the PDFNet exception |
ToHtml(string, string, HTMLOutputOptions)
Convert a file to HTML and save to the specified path.
In e_reflow_paragraphs mode, this conversion requires that the optional PDFTron
StructuredOutput add-on module is available.
See also: the StructuredOutputModule
class
Declaration
public static void ToHtml(string in_filename, string output_path, Convert.HTMLOutputOptions options)
Parameters
Type | Name | Description |
---|---|---|
string | in_filename | the file to convert to HTML |
string | output_path | the path to where generated content will be stored |
Convert.HTMLOutputOptions | options | the conversion options |
Remarks
Internally formats include BMP, EMF, JPEG, PNG, TIF, XPS, PDF. Formats that require external applications for conversion use the Convert::Printer class and the PDFNet printer to be installed. This is only supported on Windows platforms. Document formats in this category include RTF(MS Word or Wordpad), TXT (Notepad or Wordpad), DOC and DOCX (MS Word), PPT and PPTX (MS PowerPoint), XLS and XLSX (MS Excel), OpenOffice documents, HTML and MHT (Internet Explorer), PUB (MS Publisher), MSG (MS Outlook).
Exceptions
Type | Condition |
---|---|
PDFNetException | PDFNetException the PDFNet exception |
ToHtml(PDFDoc, string)
Convert the PDF to HTML and save to the specified path.
Declaration
public static void ToHtml(PDFDoc in_pdfdoc, string output_path)
Parameters
Type | Name | Description |
---|---|---|
PDFDoc | in_pdfdoc | the PDF doc to convert to HTML |
string | output_path | the path to where generated content will be stored |
Exceptions
Type | Condition |
---|---|
PDFNetException | PDFNetException the PDFNet exception |
ToHtml(PDFDoc, string, HTMLOutputOptions)
Convert the PDF to HTML and save to the specified path.
In e_reflow_paragraphs mode, this conversion requires that the optional PDFTron
StructuredOutput add-on module is available.
See also: the StructuredOutputModule
class
Declaration
public static void ToHtml(PDFDoc in_pdfdoc, string output_path, Convert.HTMLOutputOptions options)
Parameters
Type | Name | Description |
---|---|---|
PDFDoc | in_pdfdoc | the PDF doc to convert to HTML |
string | output_path | the path to where generated content will be stored |
Convert.HTMLOutputOptions | options | the conversion options |
Exceptions
Type | Condition |
---|---|
PDFNetException | PDFNetException the PDFNet exception |
ToPdf(PDFDoc, Stream, ParserContext)
Convert the xaml file in the input stream to PDF and append the results to pdfdoc
Declaration
public static void ToPdf(PDFDoc pdfdoc, Stream inputXamlStream, ParserContext parserContext)
Parameters
Type | Name | Description |
---|---|---|
PDFDoc | pdfdoc | The PDFDoc to append the converted Xaml to |
Stream | inputXamlStream | The input stream containing the xaml |
ParserContext | parserContext | context defining xaml namespaces |
ToPdf(PDFDoc, Stream, ParserContext, WPFConverterOptions)
Convert the xaml file in the input stream to PDF and append the results to pdfdoc
Declaration
public static void ToPdf(PDFDoc pdfdoc, Stream inputXamlStream, ParserContext parserContext, Convert.WPFConverterOptions options)
Parameters
Type | Name | Description |
---|---|---|
PDFDoc | pdfdoc | The PDFDoc to append the converted Xaml to |
Stream | inputXamlStream | The input stream containing the xaml |
ParserContext | parserContext | context defining xaml namespaces |
Convert.WPFConverterOptions | options | specification of conversion options |
ToPdf(PDFDoc, object)
Convert the object specified by doc to PDF
Declaration
public static void ToPdf(PDFDoc pdfdoc, object doc)
Parameters
Type | Name | Description |
---|---|---|
PDFDoc | pdfdoc | The PDFDoc to append the converted Xaml to |
object | doc | The object containing a Xaml document |
Remarks
doc must implement IDocumentPaginatorSource.
doc can be a FlowDocument as object or FixedDocument as object.
doc can also be a UIElement such as Canvas.
doc cannot be a Page, Window or Frame.
ToPdf(PDFDoc, object, WPFConverterOptions)
Convert the object specified by doc to PDF
Declaration
public static void ToPdf(PDFDoc pdfdoc, object doc, Convert.WPFConverterOptions options)
Parameters
Type | Name | Description |
---|---|---|
PDFDoc | pdfdoc | The PDFDoc to append the converted Xaml to |
object | doc | The object containing a Xaml document |
Convert.WPFConverterOptions | options | specification of conversion options |
Remarks
doc must implement IDocumentPaginatorSource.
doc can be a FlowDocument as object or FixedDocument as object.
doc can also be a UIElement such as Canvas.
doc cannot be a Page, Window or Frame.
ToPdf(PDFDoc, string)
Convert the file or document to PDF and append to the specified PDF document.
Declaration
public static void ToPdf(PDFDoc in_pdfdoc, string in_filename)
Parameters
Type | Name | Description |
---|---|---|
PDFDoc | in_pdfdoc | the PDFDoc to append the converted document to. The PDFDoc can then be converted to XPS, EMF or SVG using the other functions in this class. |
string | in_filename | the path to the document to be converted to XPS |
Remarks
Internally formats include BMP, EMF, JPEG, PNG, TIF, XPS. Formats that require external applications for conversion use the Convert::Printer class and the PDFNet printer to be installed. This is only supported on Windows platforms. Document formats in this category include RTF(MS Word or Wordpad), TXT (Notepad or Wordpad), DOC and DOCX (MS Word), PPT and PPTX (MS PowerPoint), XLS and XLSX (MS Excel), OpenOffice documents, HTML and MHT (Internet Explorer), PUB (MS Publisher), MSG (MS Outlook).
Exceptions
Type | Condition |
---|---|
PDFNetException | PDFNetException the PDFNet exception |
ToPdf(PDFDoc, string, WPFConverterOptions)
Convert the specified .xaml file to PDF and append the results to pdfdoc
Declaration
public static void ToPdf(PDFDoc pdfdoc, string inputXamlFile, Convert.WPFConverterOptions options)
Parameters
Type | Name | Description |
---|---|---|
PDFDoc | pdfdoc | The PDFDoc to append the converted Xaml to |
string | inputXamlFile | Path to .xaml file |
Convert.WPFConverterOptions | options | specification of conversion options |
ToPdf(PDFDoc, DocumentPaginator)
Convert the object specified by doc to PDF
Declaration
public static void ToPdf(PDFDoc pdfdoc, DocumentPaginator paginator)
Parameters
Type | Name | Description |
---|---|---|
PDFDoc | pdfdoc | |
DocumentPaginator | paginator |
ToPdf(PDFDoc, DocumentPaginator, WPFConverterOptions)
Convert the object specified by doc to PDF
Declaration
public static void ToPdf(PDFDoc pdfdoc, DocumentPaginator in_paginator, Convert.WPFConverterOptions options)
Parameters
Type | Name | Description |
---|---|---|
PDFDoc | pdfdoc | |
DocumentPaginator | in_paginator | |
Convert.WPFConverterOptions | options |
ToPowerPoint(string, string)
Convert a PDF file to PowerPoint and save to the specified path.
This conversion requires that the optional PDFTron StructuredOutput add-on module is available.
See also: the StructuredOutputModule
class
Declaration
public static void ToPowerPoint(string in_filename, string output_path)
Parameters
Type | Name | Description |
---|---|---|
string | in_filename | the file to convert to PowerPoint |
string | output_path | the path to where generated content will be stored |
Exceptions
Type | Condition |
---|---|
PDFNetException | PDFNetException the PDFNet exception |
ToPowerPoint(string, string, PowerPointOutputOptions)
Convert a PDF file to PowerPoint and save to the specified path.
This conversion requires that the optional PDFTron StructuredOutput add-on module is available.
See also: the StructuredOutputModule
class
Declaration
public static void ToPowerPoint(string in_filename, string output_path, Convert.PowerPointOutputOptions options)
Parameters
Type | Name | Description |
---|---|---|
string | in_filename | the file to convert to PowerPoint |
string | output_path | the path to where generated content will be stored |
Convert.PowerPointOutputOptions | options | the conversion options |
ToPowerPoint(PDFDoc, string)
Convert the PDF to PowerPoint and save to the specified path.
This conversion requires that the optional PDFTron StructuredOutput add-on module is available.
See also: the StructuredOutputModule
class
Declaration
public static void ToPowerPoint(PDFDoc in_pdfdoc, string output_path)
Parameters
Type | Name | Description |
---|---|---|
PDFDoc | in_pdfdoc | the PDF doc to convert to PowerPoint |
string | output_path | the path to where generated content will be stored |
Exceptions
Type | Condition |
---|---|
PDFNetException | PDFNetException the PDFNet exception |
ToPowerPoint(PDFDoc, string, PowerPointOutputOptions)
Convert the PDF to PowerPoint and save to the specified path.
This conversion requires that the optional PDFTron StructuredOutput add-on module is available.
See also: the StructuredOutputModule
class
Declaration
public static void ToPowerPoint(PDFDoc in_pdfdoc, string output_path, Convert.PowerPointOutputOptions options)
Parameters
Type | Name | Description |
---|---|---|
PDFDoc | in_pdfdoc | the PDF doc to convert to PowerPoint |
string | output_path | the path to where generated content will be stored |
Convert.PowerPointOutputOptions | options | the conversion options |
Exceptions
Type | Condition |
---|---|
PDFNetException | PDFNetException the PDFNet exception |
ToSvg(PDFDoc, string)
Convert the PDFDoc to SVG and save to the specified path.
Declaration
public static void ToSvg(PDFDoc in_pdfdoc, string in_filename)
Parameters
Type | Name | Description |
---|---|---|
PDFDoc | in_pdfdoc | the PDFDoc to convert to SVG |
string | in_filename | the path to the SVG files to create, one file per page |
Exceptions
Type | Condition |
---|---|
PDFNetException | PDFNetException the PDFNet exception |
ToSvg(PDFDoc, string, SVGOutputOptions)
Convert the PDFDoc to SVG and save to the specified path.
Declaration
public static void ToSvg(PDFDoc in_pdfdoc, string in_filename, Convert.SVGOutputOptions in_options)
Parameters
Type | Name | Description |
---|---|---|
PDFDoc | in_pdfdoc | the PDFDoc to convert to SVG |
string | in_filename | the path to the SVG files to create, one file per page |
Convert.SVGOutputOptions | in_options | the conversion options |
Exceptions
Type | Condition |
---|---|
PDFNetException | PDFNetException the PDFNet exception |
ToSvg(Page, string)
Convert the Page to SVG and save to the specified path.
Declaration
public static void ToSvg(Page in_page, string in_filename)
Parameters
Type | Name | Description |
---|---|---|
Page | in_page | the Page to convert to SVG |
string | in_filename | the path to the SVG file to create |
Exceptions
Type | Condition |
---|---|
PDFNetException | PDFNetException the PDFNet exception |
ToSvg(Page, string, SVGOutputOptions)
Convert the Page to SVG and save to the specified path.
Declaration
public static void ToSvg(Page in_page, string in_filename, Convert.SVGOutputOptions in_options)
Parameters
Type | Name | Description |
---|---|---|
Page | in_page | the Page to convert to SVG |
string | in_filename | the path to the SVG file to create |
Convert.SVGOutputOptions | in_options | the conversion options |
Exceptions
Type | Condition |
---|---|
PDFNetException | PDFNetException the PDFNet exception |
ToTiff(string, string)
Convert a file to multipage TIFF and save to the specified path.
Declaration
public static void ToTiff(string in_filename, string output_path)
Parameters
Type | Name | Description |
---|---|---|
string | in_filename | the file to convert to multipage TIFF |
string | output_path | the path to where generated content will be stored |
Exceptions
Type | Condition |
---|---|
PDFNetException | PDFNetException the PDFNet exception |
ToTiff(string, string, TiffOutputOptions)
Convert a file to multipage TIFF and save to the specified path.
Declaration
public static void ToTiff(string in_filename, string output_path, Convert.TiffOutputOptions options)
Parameters
Type | Name | Description |
---|---|---|
string | in_filename | the file to convert to multipage TIFF |
string | output_path | the path to where generated content will be stored |
Convert.TiffOutputOptions | options | the conversion options |
Exceptions
Type | Condition |
---|---|
PDFNetException | PDFNetException the PDFNet exception |
ToTiff(string, Filter)
Convert a file to multipage TIFF and write to the provided filter
Declaration
public static void ToTiff(string in_filename, Filter out_filter)
Parameters
Type | Name | Description |
---|---|---|
string | in_filename | the file to convert to multipage TIFF |
Filter | out_filter | the output filter where the TIFF data will be written |
Exceptions
Type | Condition |
---|---|
PDFNetException | PDFNetException the PDFNet exception |
ToTiff(string, Filter, TiffOutputOptions)
Convert a file to multipage TIFF and write to the provided filter
Declaration
public static void ToTiff(string in_filename, Filter out_filter, Convert.TiffOutputOptions options)
Parameters
Type | Name | Description |
---|---|---|
string | in_filename | the file to convert to multipage TIFF |
Filter | out_filter | the output filter where the TIFF data will be written |
Convert.TiffOutputOptions | options | the conversion options |
Exceptions
Type | Condition |
---|---|
PDFNetException | PDFNetException the PDFNet exception |
ToTiff(PDFDoc, string)
Convert the PDF to multipage TIFF and save to the specified path.
Declaration
public static void ToTiff(PDFDoc in_pdfdoc, string output_path)
Parameters
Type | Name | Description |
---|---|---|
PDFDoc | in_pdfdoc | the PDF doc to convert to multipage TIFF |
string | output_path | the path to where generated content will be stored |
Exceptions
Type | Condition |
---|---|
PDFNetException | PDFNetException the PDFNet exception |
ToTiff(PDFDoc, string, TiffOutputOptions)
Convert the PDF to multipage TIFF and save to the specified path.
Declaration
public static void ToTiff(PDFDoc in_pdfdoc, string output_path, Convert.TiffOutputOptions options)
Parameters
Type | Name | Description |
---|---|---|
PDFDoc | in_pdfdoc | the PDF doc to convert to multipage TIFF |
string | output_path | the path to where generated content will be stored |
Convert.TiffOutputOptions | options | the conversion options |
Exceptions
Type | Condition |
---|---|
PDFNetException | PDFNetException the PDFNet exception |
ToTiff(PDFDoc, Filter)
Convert the PDF to multipage TIFF and write to the provided filter
Declaration
public static void ToTiff(PDFDoc in_pdfdoc, Filter out_filter)
Parameters
Type | Name | Description |
---|---|---|
PDFDoc | in_pdfdoc | the PDF doc to convert to multipage TIFF |
Filter | out_filter | the output filter where the TIFF data will be written |
Exceptions
Type | Condition |
---|---|
PDFNetException | PDFNetException the PDFNet exception |
ToTiff(PDFDoc, Filter, TiffOutputOptions)
Convert the PDF to multipage TIFF and write to the provided filter.
Declaration
public static void ToTiff(PDFDoc in_pdfdoc, Filter out_filter, Convert.TiffOutputOptions options)
Parameters
Type | Name | Description |
---|---|---|
PDFDoc | in_pdfdoc | the PDF doc to convert to multipage TIFF |
Filter | out_filter | the output filter where the TIFF data will be written |
Convert.TiffOutputOptions | options | the conversion options |
Exceptions
Type | Condition |
---|---|
PDFNetException | PDFNetException the PDFNet exception |
ToWord(string, string)
Convert a PDF file to Word and save to the specified path.
This conversion requires that the optional PDFTron StructuredOutput add-on module is available.
See also: the StructuredOutputModule
class
Declaration
public static void ToWord(string in_filename, string output_path)
Parameters
Type | Name | Description |
---|---|---|
string | in_filename | the file to convert to Word |
string | output_path | the path to where generated content will be stored |
Exceptions
Type | Condition |
---|---|
PDFNetException | PDFNetException the PDFNet exception |
ToWord(string, string, WordOutputOptions)
Convert a PDF file to Word and save to the specified path.
This conversion requires that the optional PDFTron StructuredOutput add-on module is available.
See also: the StructuredOutputModule
class
Declaration
public static void ToWord(string in_filename, string output_path, Convert.WordOutputOptions options)
Parameters
Type | Name | Description |
---|---|---|
string | in_filename | the file to convert to Word |
string | output_path | the path to where generated content will be stored |
Convert.WordOutputOptions | options | the conversion options |
ToWord(PDFDoc, string)
Convert the PDF to Word and save to the specified path.
This conversion requires that the optional PDFTron StructuredOutput add-on module is available.
See also: the StructuredOutputModule
class
Declaration
public static void ToWord(PDFDoc in_pdfdoc, string output_path)
Parameters
Type | Name | Description |
---|---|---|
PDFDoc | in_pdfdoc | the PDF doc to convert to Word |
string | output_path | the path to where generated content will be stored |
Exceptions
Type | Condition |
---|---|
PDFNetException | PDFNetException the PDFNet exception |
ToWord(PDFDoc, string, WordOutputOptions)
Convert the PDF to Word and save to the specified path.
This conversion requires that the optional PDFTron StructuredOutput add-on module is available.
See also: the StructuredOutputModule
class
Declaration
public static void ToWord(PDFDoc in_pdfdoc, string output_path, Convert.WordOutputOptions options)
Parameters
Type | Name | Description |
---|---|---|
PDFDoc | in_pdfdoc | the PDF doc to convert to Word |
string | output_path | the path to where generated content will be stored |
Convert.WordOutputOptions | options | the conversion options |
Exceptions
Type | Condition |
---|---|
PDFNetException | PDFNetException the PDFNet exception |
ToXod(string)
Generate a stream that incrementally converts the input file to XOD format.
Declaration
public static Filter ToXod(string in_filename)
Parameters
Type | Name | Description |
---|---|---|
string | in_filename | the in_filename |
Returns
Type | Description |
---|---|
Filter | converted XPS file as Stream |
Remarks
Internally formats include BMP, EMF, JPEG, PNG, TIF, XPS, PDF. Formats that require external applications for conversion use the Convert::Printer class and the PDFNet printer to be installed. This is only supported on Windows platforms. Document formats in this category include RTF(MS Word or Wordpad), TXT (Notepad or Wordpad), DOC and DOCX (MS Word), PPT and PPTX (MS PowerPoint), XLS and XLSX (MS Excel), OpenOffice documents, HTML and MHT (Internet Explorer), PUB (MS Publisher), MSG (MS Outlook).
Exceptions
Type | Condition |
---|---|
PDFNetException | PDFNetException the PDFNet exception |
ToXod(string, string)
Convert the input file to XOD format and save to the specified path.
Declaration
public static void ToXod(string in_filename, string out_filename)
Parameters
Type | Name | Description |
---|---|---|
string | in_filename | the in_filename |
string | out_filename | the out_filename |
Remarks
Internally formats include BMP, EMF, JPEG, PNG, TIF, XPS, PDF. Formats that require external applications for conversion use the Convert::Printer class and the PDFNet printer to be installed. This is only supported on Windows platforms. Document formats in this category include RTF(MS Word or Wordpad), TXT (Notepad or Wordpad), DOC and DOCX (MS Word), PPT and PPTX (MS PowerPoint), XLS and XLSX (MS Excel), OpenOffice documents, HTML and MHT (Internet Explorer), PUB (MS Publisher), MSG (MS Outlook).
Exceptions
Type | Condition |
---|---|
PDFNetException | PDFNetException the PDFNet exception |
ToXod(string, string, XODOutputOptions)
Convert the input file to XOD format and save to the specified path.
Declaration
public static void ToXod(string in_filename, string out_filename, Convert.XODOutputOptions options)
Parameters
Type | Name | Description |
---|---|---|
string | in_filename | the in_filename |
string | out_filename | the out_filename |
Convert.XODOutputOptions | options | the conversion options |
Remarks
Internally formats include BMP, EMF, JPEG, PNG, TIF, XPS, PDF. Formats that require external applications for conversion use the Convert::Printer class and the PDFNet printer to be installed. This is only supported on Windows platforms. Document formats in this category include RTF(MS Word or Wordpad), TXT (Notepad or Wordpad), DOC and DOCX (MS Word), PPT and PPTX (MS PowerPoint), XLS and XLSX (MS Excel), OpenOffice documents, HTML and MHT (Internet Explorer), PUB (MS Publisher), MSG (MS Outlook).
Exceptions
Type | Condition |
---|---|
PDFNetException | PDFNetException the PDFNet exception |
ToXod(string, XODOutputOptions)
Generate a stream that incrementally converts the input file to XOD format.
Declaration
public static Filter ToXod(string in_filename, Convert.XODOutputOptions options)
Parameters
Type | Name | Description |
---|---|---|
string | in_filename | the in_filename |
Convert.XODOutputOptions | options | the conversion options |
Returns
Type | Description |
---|---|
Filter | converted file as Stream |
Remarks
Internally formats include BMP, EMF, JPEG, PNG, TIF, XPS, PDF. Formats that require external applications for conversion use the Convert::Printer class and the PDFNet printer to be installed. This is only supported on Windows platforms. Document formats in this category include RTF(MS Word or Wordpad), TXT (Notepad or Wordpad), DOC and DOCX (MS Word), PPT and PPTX (MS PowerPoint), XLS and XLSX (MS Excel), OpenOffice documents, HTML and MHT (Internet Explorer), PUB (MS Publisher), MSG (MS Outlook).
Exceptions
Type | Condition |
---|---|
PDFNetException | PDFNetException the PDFNet exception |
ToXod(PDFDoc)
Generate a stream that incrementally converts the input file to XOD format.
Declaration
public static Filter ToXod(PDFDoc in_pdfdoc)
Parameters
Type | Name | Description |
---|---|---|
PDFDoc | in_pdfdoc | the PDFDoc to convert to XPS |
Returns
Type | Description |
---|---|
Filter | converted file in Stream |
Remarks
Internally formats include BMP, EMF, JPEG, PNG, TIF, XPS, PDF. Formats that require external applications for conversion use the Convert::Printer class and the PDFNet printer to be installed. This is only supported on Windows platforms. Document formats in this category include RTF(MS Word or Wordpad), TXT (Notepad or Wordpad), DOC and DOCX (MS Word), PPT and PPTX (MS PowerPoint), XLS and XLSX (MS Excel), OpenOffice documents, HTML and MHT (Internet Explorer), PUB (MS Publisher), MSG (MS Outlook).
Exceptions
Type | Condition |
---|---|
PDFNetException | PDFNetException the PDFNet exception |
ToXod(PDFDoc, string)
Convert the PDFDoc to XOD format and save to the specified path.
Declaration
public static void ToXod(PDFDoc in_pdfdoc, string out_filename)
Parameters
Type | Name | Description |
---|---|---|
PDFDoc | in_pdfdoc | the PDFDoc to convert to XPS |
string | out_filename | the out_filename |
Remarks
Internally formats include BMP, EMF, JPEG, PNG, TIF, XPS, PDF. Formats that require external applications for conversion use the Convert::Printer class and the PDFNet printer to be installed. This is only supported on Windows platforms. Document formats in this category include RTF(MS Word or Wordpad), TXT (Notepad or Wordpad), DOC and DOCX (MS Word), PPT and PPTX (MS PowerPoint), XLS and XLSX (MS Excel), OpenOffice documents, HTML and MHT (Internet Explorer), PUB (MS Publisher), MSG (MS Outlook).
Exceptions
Type | Condition |
---|---|
PDFNetException | PDFNetException the PDFNet exception |
ToXod(PDFDoc, string, XODOutputOptions)
Convert the PDFDoc to XOD format and save to the specified path.
Declaration
public static void ToXod(PDFDoc in_pdfdoc, string out_filename, Convert.XODOutputOptions options)
Parameters
Type | Name | Description |
---|---|---|
PDFDoc | in_pdfdoc | the PDFDoc to convert to XPS |
string | out_filename | the out_filename |
Convert.XODOutputOptions | options | the conversion options |
Remarks
Internally formats include BMP, EMF, JPEG, PNG, TIF, XPS, PDF. Formats that require external applications for conversion use the Convert::Printer class and the PDFNet printer to be installed. This is only supported on Windows platforms. Document formats in this category include RTF(MS Word or Wordpad), TXT (Notepad or Wordpad), DOC and DOCX (MS Word), PPT and PPTX (MS PowerPoint), XLS and XLSX (MS Excel), OpenOffice documents, HTML and MHT (Internet Explorer), PUB (MS Publisher), MSG (MS Outlook).
Exceptions
Type | Condition |
---|---|
PDFNetException | PDFNetException the PDFNet exception |
ToXod(PDFDoc, XODOutputOptions)
Generate a stream that incrementally converts the input file to XOD format.
Declaration
public static Filter ToXod(PDFDoc in_pdfdoc, Convert.XODOutputOptions options)
Parameters
Type | Name | Description |
---|---|---|
PDFDoc | in_pdfdoc | the PDFDoc to convert to XPS |
Convert.XODOutputOptions | options | the conversion options |
Returns
Type | Description |
---|---|
Filter | converted file in Stream |
Remarks
Internally formats include BMP, EMF, JPEG, PNG, TIF, XPS, PDF. Formats that require external applications for conversion use the Convert::Printer class and the PDFNet printer to be installed. This is only supported on Windows platforms. Document formats in this category include RTF(MS Word or Wordpad), TXT (Notepad or Wordpad), DOC and DOCX (MS Word), PPT and PPTX (MS PowerPoint), XLS and XLSX (MS Excel), OpenOffice documents, HTML and MHT (Internet Explorer), PUB (MS Publisher), MSG (MS Outlook).
Exceptions
Type | Condition |
---|---|
PDFNetException | PDFNetException the PDFNet exception |
ToXps(string)
Generate a stream that incrementally converts the input file to XPS format.
Declaration
public static Stream ToXps(string in_inputFilename)
Parameters
Type | Name | Description |
---|---|---|
string | in_inputFilename | the path to the document to be converted to XPS |
Returns
Type | Description |
---|---|
Stream | converted file as Stream |
Remarks
Internally formats include BMP, EMF, JPEG, PNG, TIF, XPS. Formats that require external applications for conversion use the Convert::Printer class and the PDFNet printer to be installed. This is only supported on Windows platforms. Document formats in this category include RTF(MS Word or Wordpad), TXT (Notepad or Wordpad), DOC and DOCX (MS Word), PPT and PPTX (MS PowerPoint), XLS and XLSX (MS Excel), OpenOffice documents, HTML and MHT (Internet Explorer), PUB (MS Publisher), MSG (MS Outlook).
Exceptions
Type | Condition |
---|---|
PDFNetException | PDFNetException the PDFNet exception |
ToXps(string, string)
Convert the file or document to XPS and write to the specified file.
Declaration
public static void ToXps(string in_inputFilename, string in_outputFilename)
Parameters
Type | Name | Description |
---|---|---|
string | in_inputFilename | the path to the document to be converted to XPS |
string | in_outputFilename | the path to the output XPS file |
Remarks
Internally formats include BMP, EMF, JPEG, PNG, TIF, XPS. Formats that require external applications for conversion use the Convert::Printer class and the PDFNet printer to be installed. This is only supported on Windows platforms. Document formats in this category include RTF(MS Word or Wordpad), TXT (Notepad or Wordpad), DOC and DOCX (MS Word), PPT and PPTX (MS PowerPoint), XLS and XLSX (MS Excel), OpenOffice documents, HTML and MHT (Internet Explorer), PUB (MS Publisher), MSG (MS Outlook).
Exceptions
Type | Condition |
---|---|
PDFNetException | PDFNetException the PDFNet exception |
ToXps(string, string, XPSOutputOptions)
Convert the file or document to XPS and write to the specified file.
Declaration
public static void ToXps(string in_inputFilename, string in_outputFilename, Convert.XPSOutputOptions options)
Parameters
Type | Name | Description |
---|---|---|
string | in_inputFilename | the path to the document to be converted to XPS |
string | in_outputFilename | the path to the output XPS file |
Convert.XPSOutputOptions | options | the conversion options |
Remarks
Internally formats include BMP, EMF, JPEG, PNG, TIF, XPS. Formats that require external applications for conversion use the Convert::Printer class and the PDFNet printer to be installed. This is only supported on Windows platforms. Document formats in this category include RTF(MS Word or Wordpad), TXT (Notepad or Wordpad), DOC and DOCX (MS Word), PPT and PPTX (MS PowerPoint), XLS and XLSX (MS Excel), OpenOffice documents, HTML and MHT (Internet Explorer), PUB (MS Publisher), MSG (MS Outlook).
Exceptions
Type | Condition |
---|---|
PDFNetException | PDFNetException the PDFNet exception |
ToXps(string, XPSOutputOptions)
Generate a stream that incrementally converts the input file to XPS format.
Declaration
public static Stream ToXps(string in_inputFilename, Convert.XPSOutputOptions options)
Parameters
Type | Name | Description |
---|---|---|
string | in_inputFilename | the path to the document to be converted to XPS |
Convert.XPSOutputOptions | options | the conversion options |
Returns
Type | Description |
---|---|
Stream | converted file as Stream |
Exceptions
Type | Condition |
---|---|
PDFNetException | PDFNetException the PDFNet exception |
ToXps(PDFDoc)
Generate a stream that incrementally converts the input file to XPS format.
Declaration
public static Stream ToXps(PDFDoc in_pdfdoc)
Parameters
Type | Name | Description |
---|---|---|
PDFDoc | in_pdfdoc | the PDFDoc to convert to XPS |
Returns
Type | Description |
---|---|
Stream | stream contains the converted document |
Exceptions
Type | Condition |
---|---|
PDFNetException | PDFNetException the PDFNet exception |
ToXps(PDFDoc, string)
Convert the PDFDoc to XPS and save to the specified path.
Declaration
public static void ToXps(PDFDoc in_pdfdoc, string in_filename)
Parameters
Type | Name | Description |
---|---|---|
PDFDoc | in_pdfdoc | the PDFDoc to convert to XPS |
string | in_filename | the path to the document to create |
Exceptions
Type | Condition |
---|---|
PDFNetException | PDFNetException the PDFNet exception |
ToXps(PDFDoc, string, XPSOutputOptions)
Convert the PDFDoc to XPS and save to the specified path.
Declaration
public static void ToXps(PDFDoc in_pdfdoc, string in_filename, Convert.XPSOutputOptions options)
Parameters
Type | Name | Description |
---|---|---|
PDFDoc | in_pdfdoc | the PDFDoc to convert to XPS |
string | in_filename | the path to the document to create |
Convert.XPSOutputOptions | options | the conversion options |
Exceptions
Type | Condition |
---|---|
PDFNetException | PDFNetException the PDFNet exception |
ToXps(PDFDoc, XPSOutputOptions)
Generate a stream that incrementally converts the input file to XPS format.
Declaration
public static Stream ToXps(PDFDoc in_pdfdoc, Convert.XPSOutputOptions options)
Parameters
Type | Name | Description |
---|---|---|
PDFDoc | in_pdfdoc | the PDFDoc to convert to XPS |
Convert.XPSOutputOptions | options | the conversion options |
Returns
Type | Description |
---|---|
Stream | converted file as Stream |
Exceptions
Type | Condition |
---|---|
PDFNetException | PDFNetException the PDFNet exception |
UniversalConversion(string, ConversionOptions)
Declaration
public static DocumentConversion UniversalConversion(string path, ConversionOptions options)
Parameters
Type | Name | Description |
---|---|---|
string | path | |
ConversionOptions | options |
Returns
Type | Description |
---|---|
DocumentConversion |
WordToPDF(PDFDoc, string, WordToPDFOptions)
Convert the a Word document (in .docx format) to pdf and append to the specified PDF document. This conversion is performed entirely within PDFNet, and does not rely on Word interop or any other external functionality.
Font requirements: on some systems you may need to specify extra font resources to aid in conversion. Please see http://www.pdftron.com/kb_fonts_and_builtin_office_conversion
Declaration
public static void WordToPDF(PDFDoc doc, string filePath, WordToPDFOptions options)
Parameters
Type | Name | Description |
---|---|---|
PDFDoc | doc | the conversion result will be appended to this pdf |
string | filePath | the path to the source document. The source must be in .docx format. |
WordToPDFOptions | options | the conversion options |
Remarks
see WordToPdfConversion() if you would like more control over the conversion process
WordToPDF(PDFDoc, Filter, WordToPDFOptions)
Convert the a Word document (in .docx format) to pdf and append to the specified PDF document. This conversion is performed entirely within PDFNet, and does not rely on Word interop or any other external functionality.
Font requirements: on some systems you may need to specify extra font resources to aid in conversion. Please see http://www.pdftron.com/kb_fonts_and_builtin_office_conversion
Declaration
public static void WordToPDF(PDFDoc doc, Filter in_stream, WordToPDFOptions options)
Parameters
Type | Name | Description |
---|---|---|
PDFDoc | doc | the conversion result will be appended to this pdf |
Filter | in_stream | the source data stream. The source must be in .docx format. |
WordToPDFOptions | options | the conversion options |
Remarks
see WordToPdfConversion() if you would like more control over the conversion process
WordToPDFConversion(PDFDoc, string, WordToPDFOptions)
Create a DocumentConversion object suitable for converting a Word document (in .docx format) to pdf and appending to the specified PDF document. This conversion will be performed entirely within PDFNet, and does not rely on Word interop or any other external functionality.
This method allows for more control over the conversion process than the single call WordToPDF() interface. This method does not perform any conversion logic and can be expected to return quickly. To do the actual conversion, use the returned DocumentConversion object (see PDF.DocumentConversion)
Font requirements: on some systems you may need to specify extra font resources to aid in conversion. Please see http://www.pdftron.com/kb_fonts_and_builtin_office_conversion
Declaration
public static DocumentConversion WordToPDFConversion(PDFDoc doc, string filePath, WordToPDFOptions options)
Parameters
Type | Name | Description |
---|---|---|
PDFDoc | doc | the conversion result will be appended to this pdf |
string | filePath | the path to the source document. The source must be in .docx format. |
WordToPDFOptions | options | the conversion options |
Returns
Type | Description |
---|---|
DocumentConversion | A DocumentConversion object which encapsulates this particular conversion |
Remarks
see WordToPdfConversion() if you would like more control over the conversion process
WordToPDFConversion(PDFDoc, Filter, WordToPDFOptions)
Create a DocumentConversion object suitable for converting a Word document (in .docx format) to pdf and appending to the specified PDF document. This conversion will be performed entirely within PDFNet, and does not rely on Word interop or any other external functionality.
This method allows for more control over the conversion process than the single call WordToPDF() interface. This method does not perform any conversion logic and can be expected to return quickly. To do the actual conversion, use the returned DocumentConversion object (see PDF.DocumentConversion)
Font requirements: on some systems you may need to specify extra font resources to aid in conversion. Please see http://www.pdftron.com/kb_fonts_and_builtin_office_conversion
Declaration
public static DocumentConversion WordToPDFConversion(PDFDoc doc, Filter in_stream, WordToPDFOptions options)
Parameters
Type | Name | Description |
---|---|---|
PDFDoc | doc | the conversion result will be appended to this pdf |
Filter | in_stream | the source data stream. The source must be in .docx format. |
WordToPDFOptions | options | the conversion options |
Returns
Type | Description |
---|---|
DocumentConversion | A DocumentConversion object which encapsulates this particular conversion |
Remarks
see WordToPdfConversion() if you would like more control over the conversion process