Class Convert
Encapsulates the conversion of a single document from one format to another.
Implements
Inherited Members
Namespace: pdftron.PDF
Assembly: PDFTronDotNet.dll
Syntax
public class Convert : IDisposable
Methods
CreateOfficeTemplate(string, ConversionOptions)
Create a TemplateDocument object from an office file suitable for generating any number of PDFs from supplied template data.
Template filling will be performed entirely within PDFNet, and handles incoming files in .docx, .xlsx, .pptx, .doc, .ppt, and .xls format
This method does not perform any template filling and can be expected to return quickly. To do the actual work, use the returned TemplateDocument object (see PDF.TemplateDocument)
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 TemplateDocument CreateOfficeTemplate(string filePath, ConversionOptions options)
Parameters
| Type | Name | Description |
|---|---|---|
| string | filePath | the path to the source document |
| ConversionOptions | options | the office to pdf conversion options |
Returns
| Type | Description |
|---|---|
| TemplateDocument | A TemplateDocument object which encapsulates this particular office template |
CreateOfficeTemplate(Filter, ConversionOptions)
Create a TemplateDocument object from an office file suitable for generating any number of PDFs from supplied template data.
Template filling will be performed entirely within PDFNet, and handles incoming files in .docx, .xlsx, .pptx, .doc, .ppt, and .xls format
This method does not perform any template filling and can be expected to return quickly. To do the actual work, use the returned TemplateDocument object (see PDF.TemplateDocument)
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 TemplateDocument CreateOfficeTemplate(Filter inData, ConversionOptions options)
Parameters
| Type | Name | Description |
|---|---|---|
| Filter | inData | |
| ConversionOptions | options | the office to pdf conversion options |
Returns
| Type | Description |
|---|---|
| TemplateDocument | A TemplateDocument object which encapsulates this particular office template |
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(bool)
Declaration
protected virtual void Dispose(bool disposing)
Parameters
| Type | Name | Description |
|---|---|---|
| bool | disposing |
~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. Note that, the file name should include its extension. |
| CADConvertOptions | options | The options to use when converting. |
Remarks
See the CADConvertOptions class for the available options.
FromDICOM(PDFDoc, string, AdvancedImagingConvertOptions)
Convert the specified DICOM or another Image format 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 DICOM 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 inDoc, string inFilename, ConversionOptions options)
Parameters
| Type | Name | Description |
|---|---|---|
| PDFDoc | inDoc | |
| string | inFilename | |
| 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 inDoc, Filter inData, ConversionOptions options)
Parameters
| Type | Name | Description |
|---|---|---|
| PDFDoc | inDoc | |
| Filter | inData | |
| 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 inData, ConversionOptions options)
Parameters
| Type | Name | Description |
|---|---|---|
| Filter | inData | |
| ConversionOptions | options | the conversion options |
Returns
| Type | Description |
|---|---|
| DocumentConversion | A DocumentConversion object which encapsulates this particular conversion |
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 inData, ConversionOptions options)
Parameters
| Type | Name | Description |
|---|---|---|
| PDFDoc | doc | the conversion result will be appended to this pdf |
| Filter | inData | |
| 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 |
ToExcel(PDFDoc, Filter)
Convert the PDF to Excel and write to the provided filter
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, Filter output_filter)
Parameters
| Type | Name | Description |
|---|---|---|
| PDFDoc | in_pdfdoc | the PDF doc to convert to Excel |
| Filter | output_filter | the filter to which generated content will be written |
Exceptions
| Type | Condition |
|---|---|
| PDFNetException | PDFNetException the PDFNet exception |
ToExcel(PDFDoc, Filter, ExcelOutputOptions)
Convert the PDF to Excel and write to the provided filter
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, Filter output_filter, Convert.ExcelOutputOptions options)
Parameters
| Type | Name | Description |
|---|---|---|
| PDFDoc | in_pdfdoc | the PDF doc to convert to Excel |
| Filter | output_filter | the filter to which generated content will be written |
| 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, 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 |
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 |
ToPowerPoint(PDFDoc, Filter)
Convert the PDF to PowerPoint and write to the provided filter
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, Filter output_filter)
Parameters
| Type | Name | Description |
|---|---|---|
| PDFDoc | in_pdfdoc | the PDF doc to convert to PowerPoint |
| Filter | output_filter | the filter to which generated content will be written |
Exceptions
| Type | Condition |
|---|---|
| PDFNetException | PDFNetException the PDFNet exception |
ToPowerPoint(PDFDoc, Filter, PowerPointOutputOptions)
Convert the PDF to PowerPoint and write to the provided filter
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, Filter output_filter, Convert.PowerPointOutputOptions options)
Parameters
| Type | Name | Description |
|---|---|---|
| PDFDoc | in_pdfdoc | the PDF doc to convert to PowerPoint |
| Filter | output_filter | the filter to which generated content will be written |
| 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 |
ToWord(PDFDoc, Filter)
Convert the PDF to Word and write to the provided filter
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, Filter output_filter)
Parameters
| Type | Name | Description |
|---|---|---|
| PDFDoc | in_pdfdoc | the PDF doc to convert to Word |
| Filter | output_filter | the filter to which generated content will be written |
Exceptions
| Type | Condition |
|---|---|
| PDFNetException | PDFNetException the PDFNet exception |
ToWord(PDFDoc, Filter, WordOutputOptions)
Convert the PDF to Word and write to the provided filter
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, Filter output_filter, Convert.WordOutputOptions options)
Parameters
| Type | Name | Description |
|---|---|---|
| PDFDoc | in_pdfdoc | the PDF doc to convert to Word |
| Filter | output_filter | the filter to which generated content will be written |
| 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, 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(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 |
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 inDoc, string inFilename, WordToPDFOptions options)
Parameters
| Type | Name | Description |
|---|---|---|
| PDFDoc | inDoc | |
| string | inFilename | |
| 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 inDoc, Filter inData, WordToPDFOptions options)
Parameters
| Type | Name | Description |
|---|---|---|
| PDFDoc | inDoc | |
| Filter | inData | |
| 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 inData, WordToPDFOptions options)
Parameters
| Type | Name | Description |
|---|---|---|
| PDFDoc | doc | the conversion result will be appended to this pdf |
| Filter | inData | |
| 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