Click or drag to resize

Convert Class

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.
Inheritance Hierarchy
SystemObject
  pdftron.PDFConvert

Namespace:  pdftron.PDF
Assembly:  pdftron (in pdftron.dll) Version: 255.255.255.255
Syntax
public sealed class Convert : IClosable

The Convert type exposes the following members.

Methods
  NameDescription
Public methodClose
Public methodStatic memberCreateReflow
Create a Reflow object.
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Public methodStatic memberFromEmf
Converts the specified EMF file to PDF and append converted pages to the specified PDF document. The EMF will be fitted to the page.
Public methodStatic memberFromEmfAsync(PDFDoc, IFilter)
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
Public methodStatic memberFromEmfAsync(PDFDoc, IStorageFile)
Converts the specified EMF file to PDF and append converted pages to the specified PDF document. The EMF will be fitted to the page.
Public methodStatic memberFromText
Convert the specified plain text file to PDF and append converted pages to the specified PDF document.
Public methodStatic memberFromTextAsync
Convert the specified plain text file to PDF and append converted pages to the specified PDF document.
Public methodStatic memberFromXps(PDFDoc, Byte)
Converts the specified XPS document contained in memory to PDF and append converted pages to the specified PDF document.
Public methodStatic memberFromXps(PDFDoc, String)
Convert the specified XPS document to PDF and append converted pages to the specified PDF document.
Public methodStatic memberFromXpsAsync(PDFDoc, IFilter)
Converts the specified XPS file to PDF and append converted pages to the specified PDF document. The EMF will be fitted to the page.
Public methodStatic memberFromXpsAsync(PDFDoc, IStorageFile)
Converts the specified XPS file to PDF and append converted pages to the specified PDF document. The EMF will be fitted to the page.
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodStatic memberOfficeToPDF(PDFDoc, IFilter, IConversionOptions)
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
Public methodStatic memberOfficeToPDF(PDFDoc, String, IConversionOptions)
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

Public methodStatic memberStreamingPDFConversion(String, IConversionOptions)
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, .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
Public methodStatic memberStreamingPDFConversion(IFilter, IConversionOptions)
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, .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
Public methodStatic memberStreamingPDFConversion(PDFDoc, IFilter, IConversionOptions)
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, .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
Public methodStatic memberStreamingPDFConversion(PDFDoc, String, IConversionOptions)
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, .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
Public methodStatic memberStreamingPDFConversionAsync(IStorageFile, IConversionOptions)
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, .png, .jpg, .bmp, .gif, .jp2 and .tif 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
Public methodStatic memberStreamingPDFConversionAsync(PDFDoc, IStorageFile, IConversionOptions)
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, .png, .jpg, .bmp, .gif, .jp2 and .tif 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
Public methodStatic memberToEpub
Convert the PDFDoc to Epub and save to the specified path.
Public methodStatic memberToEpubAsync
Convert the PDFDoc to Epub and save to the specified path.
Public methodStatic memberToPdf
Converts the file or document to PDF and append to the specified PDF document.
Public methodStatic memberToPdfAsync(PDFDoc, IStorageFile)
Converts the file or document to PDF and append to the specified PDF document.
Public methodStatic memberToPdfAsync(PDFDoc, IFilter, String)
Converts the file or document to PDF and append to the specified PDF document.
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Public methodStatic memberToSvg(Page, String)
Convert the Page to SVG and save to the specified path.
Public methodStatic memberToSvg(PDFDoc, String)
Convert the PDFDoc to SVG and save to the specified path.
Public methodStatic memberToSvg(Page, String, SVGOutputOptions)
Convert the Page to SVG and save to the specified path.
Public methodStatic memberToSvg(PDFDoc, String, SVGOutputOptions)
Public methodStatic memberToSvgAsync(Page, String)
Convert the Page to SVG and save to the specified path.
Public methodStatic memberToSvgAsync(Page, String, SVGOutputOptions)
Convert the Page to SVG and save to the specified path.
Public methodStatic memberToXod(String)
Generate a stream that incrementally converts the input file to XOD format.
Public methodStatic memberToXod(PDFDoc)
Converts the input PDFDoc to XOD format.
Public methodStatic memberToXod(String, XODOutputOptions)
Generate a stream that incrementally converts the input file to XOD format.
Public methodStatic memberToXod(String, String)
Converts the input to XOD format.
Public methodStatic memberToXod(PDFDoc, XODOutputOptions)
Generate a stream that incrementally converts the input file to XOD format.
Public methodStatic memberToXod(String, String, XODOutputOptions)
Converts the input to XOD format.
Public methodStatic memberToXodAsync(IFilter)
Converts the input Filter to XOD format.
Public methodStatic memberToXodAsync(PDFDoc)
Converts the input PDFDoc to XOD format.
Public methodStatic memberToXodAsync(IFilter, IFilter)
Converts the input to XOD format.
Public methodStatic memberToXodAsync(IFilter, XODOutputOptions)
Converts the input Filter to XOD format.
Public methodStatic memberToXodAsync(PDFDoc, XODOutputOptions)
Converts the input PDFDoc to XOD format.
Public methodStatic memberToXodAsync(IFilter, IFilter, XODOutputOptions)
Converts the input to XOD format.
Public methodStatic memberToXodWithMonitor
Converts the input PDFDoc to XOD format.
Public methodStatic memberToXps(String, String)
Converts an input file to XPS format.
Public methodStatic memberToXps(String, String, XPSOutputOptions)
Converts an input file to XPS format.
Public methodStatic memberUniversalConversion(String, WordToPDFOptions)
Create a DocumentConversion object suitable for converting a document to pdf.

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

Public methodStatic memberUniversalConversion(IFilter, WordToPDFOptions)
Create a DocumentConversion object suitable for converting a document to pdf.

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

Public methodStatic memberWordToPDF(PDFDoc, IFilter, 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

Public methodStatic memberWordToPDF(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

Public methodStatic memberWordToPDFConversion(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

Public methodStatic memberWordToPDFConversion(IFilter, 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

Top
Examples
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);
See Also