public class

Convert

extends Object
java.lang.Object
   ↳ com.pdftron.pdf.Convert

Class Overview

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, SDF::SDFDoc::e_remove_unused, NULL);
 pdfdoc.close();
 
 
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();
 
 

Summary

Nested Classes
class Convert.EPUBOutputOptions A class containing options common to ToEpub functions  
class Convert.HTMLOutputOptions A class containing options common to ToHtml and ToEpub functions  
class Convert.SVGOutputOptions A class containing options for ToSvg functions  
class Convert.TiffOutputOptions A class containing options common to ToTiff functions  
class Convert.XODOutputOptions A class containing options for ToXod functions  
class Convert.XPSOutputCommonOptions A class containing options common to ToXps and ToXod functions  
class Convert.XPSOutputOptions A class containing options for ToXps functions  
Constants
int e_default Render text that are somewhat clipped or occluded.
int e_fast Feature reduce PDF while trying to preserve some complex PDF features (such as vector figures, transparency, shadings, blend modes, Type3 fonts etc.) for pages that are already fast to render.
int e_high_quality Preserve vector content where possible.
int e_keep_all Only render text that are completely occluded, or used as a clipping path.
int e_keep_most Only render text that are seriously clipped or occluded.
int e_off Disable flattening and convert all content as is.
int e_simple Feature reduce PDF to a simple two layer representation consisting of a single background RGB image and a simple top text layer.
int e_strict Render text that are marginally clipped or occluded.
int e_very_strict Render (flatten) any text that is clipped or occluded.
Public Constructors
Convert()
Public Methods
static DocumentConversion appendUniversalConversion(DocumentConversion initial_conversion, Filter in_stream, ConversionOptions options)
Create a DocumentConversion object suitable for converting a document to pdf and appending the result to an existing conversion.
static DocumentConversion appendUniversalConversion(DocumentConversion initial_conversion, String in_filename, ConversionOptions options)
Create a DocumentConversion object suitable for converting a document to pdf and appending the result to an existing conversion.
static BlackBoxContext createBlackBoxContext(String in_filename)
static BlackBoxContext createBlackBoxContextConvert(String src_filename, String dest_filename)
static void fromCAD(Doc in_doc, String in_filename, CADConvertOptions cad_options)
Convert the specified CAD file to PDF and append converted pages to the specified PDF document.
static void fromEmf(Doc in_doc, String in_filename)
Convert the specified EMF to PDF and append converted pages to to the specified PDF document.
static void fromText(Doc in_doc, String in_filename, Obj text_options)
static void fromXps(Doc in_doc, byte[] buf)
Convert the specified XPS document contained in memory to PDF and append converted pages to the specified PDF document.
static void fromXps(Doc in_doc, String in_filename)
Convert the specified XPS document to PDF and append converted pages to to the specified PDF document.
static void officeToPdf(Doc in_doc, String in_filename, ConversionOptions options)
Convert the an office document (in .docx, .xlsx, pptx, or .doc format) to pdf and append to the specified PDF document.
static void officeToPdf(Doc in_doc, Filter in_stream, ConversionOptions options)
Convert the an office document (in .docx, .xlsx, pptx, or .doc format) to pdf and append to the specified PDF document.
static boolean requiresPrinter(String in_filename)
Utility function to determine if ToPdf will require the PDFNet printer to convert a specific file to PDF.
static DocumentConversion streamingPdfConversion(Doc in_doc, Filter in_stream, ConversionOptions options)
Create a DocumentConversion object suitable for converting a document to pdf and appending the result to an existing PDF.
static DocumentConversion streamingPdfConversion(Doc in_doc, String in_filename, ConversionOptions options)
Create a DocumentConversion object suitable for converting a document to pdf and appending the result to an existing PDF.
static DocumentConversion streamingPdfConversion(Filter in_stream, ConversionOptions options)
Create a DocumentConversion object suitable for converting a document to pdf.
static DocumentConversion streamingPdfConversion(String in_filename, ConversionOptions options)
Create a DocumentConversion object suitable for converting a document to pdf.
static void toEmf(Doc in_doc, String in_filename)
Convert the PDFDoc to EMF and save to the specified path.
static void toEmf(Page in_page, String in_filename)
Convert the Page to EMF and save to the specified path.
static void toEpub(Doc in_doc, String out_path)
Convert the PDFDoc to EPUB format and save to the specified path
static void toEpub(String in_filename, String out_path, Convert.HTMLOutputOptions html_options, Convert.EPUBOutputOptions epub_options)
Convert a file to EPUB format and save to the specified path

Note: Requires the Convert::Printer class for all file formats that ToPdf also requires.

static void toEpub(String in_filename, String out_path)
Convert a file to EPUB format and save to the specified path

Note: Requires the Convert::Printer class for all file formats that ToPdf also requires.

static void toEpub(Doc in_doc, String out_path, Convert.HTMLOutputOptions html_options, Convert.EPUBOutputOptions epub_options)
Convert the PDFDoc to EPUB format and save to the specified path
static void toEpub(Doc in_doc, String out_path, Convert.HTMLOutputOptions html_options)
Convert the PDFDoc to EPUB format and save to the specified path
static void toEpub(String in_filename, String out_path, Convert.EPUBOutputOptions epub_options)
Convert a file to EPUB format and save to the specified path

Note: Requires the Convert::Printer class for all file formats that ToPdf also requires.

static void toEpub(Doc in_doc, String out_path, Convert.EPUBOutputOptions epub_options)
Convert the PDFDoc to EPUB format and save to the specified path
static void toEpub(String in_filename, String out_path, Convert.HTMLOutputOptions html_options)
Convert a file to EPUB format and save to the specified path

Note: Requires the Convert::Printer class for all file formats that ToPdf also requires.

static void toHtml(Doc in_doc, String out_path)
Convert the PDF to HTML and save to the specified path
static void toHtml(String in_filename, String out_path)
Convert a file to HTML and save to the specified path

Note: Requires the Convert::Printer class for all file formats that ToPdf also requires.

static void toHtml(Doc in_doc, String out_path, Convert.HTMLOutputOptions options)
Convert the PDF to HTML and save to the specified path
static void toHtml(String in_filename, String out_path, Convert.HTMLOutputOptions options)
Convert a file to HTML and save to the specified path

Note: Requires the Convert::Printer class for all file formats that ToPdf also requires.

static void toPdf(Doc in_doc, String in_filename)
Convert the file or document to PDF and append to the specified PDF document.
static void toSvg(Page in_page, String in_filename, Convert.SVGOutputOptions in_options)
Convert the Page to SVG and save to the specified path.
static void toSvg(Doc in_doc, String in_filename, Convert.SVGOutputOptions in_options)
Convert the PDFDoc to SVG and save to the specified path.
static void toSvg(Page in_page, String in_filename)
Convert the Page to SVG and save to the specified path.
static void toSvg(Doc in_doc, String in_filename)
Convert the PDFDoc to SVG and save to the specified path.
static void toTiff(String in_filename, String out_path)
Convert a file to multipage Tiff and save to the specified path
static void toTiff(Doc in_doc, String out_path, Convert.TiffOutputOptions options)
Convert the PDF to multipage Tiff and save to the specified path
static void toTiff(Doc in_doc, String out_path)
Convert the PDF to multipage Tiff and save to the specified path
static void toTiff(String in_filename, String out_path, Convert.TiffOutputOptions options)
Convert a file to multipage Tiff and save to the specified path
static Filter toXod(String in_filename)
Generate a stream that incrementally converts the input file to XOD format.
static Filter toXod(Doc in_doc, Convert.XODOutputOptions options)
Generate a stream that incrementally converts the input file to XOD format.
static Filter toXod(String in_filename, Convert.XODOutputOptions options)
Generate a stream that incrementally converts the input file to XOD format.
static void toXod(Doc in_doc, String out_filename)
Convert the input file to XOD format and save to the specified path.
static Filter toXod(Doc in_doc)
Generate a stream that incrementally converts the input file to XOD format.
static void toXod(Doc in_doc, String out_filename, Convert.XODOutputOptions options)
Convert the input file to XOD format and save to the specified path.
static void toXod(String in_filename, String out_filename)
Convert the input file to XOD format and save to the specified path.
static void toXod(String in_filename, String out_filename, Convert.XODOutputOptions options)
Convert the input file to XOD format and save to the specified path.
static void toXps(String in_inputFilename, String in_outputFilename)
Convert the file or document to XPS and write to the specified file.
static void toXps(Doc in_doc, String in_filename)
Convert the PDFDoc to XPS and save to the specified path.
static void toXps(Doc in_doc, String in_filename, Convert.XPSOutputOptions options)
Convert the PDFDoc to XPS and save to the specified path.
static void toXps(String in_inputFilename, String in_outputFilename, Convert.XPSOutputOptions options)
Convert the file or document to XPS and write to the specified file.
static DocumentConversion universalConversion(Filter in_stream, ConversionOptions options)
Create a DocumentConversion object suitable for converting a document to pdf.
static DocumentConversion universalConversion(String in_filename, ConversionOptions options)
Create a DocumentConversion object suitable for converting a document to pdf.
static void wordToPdf(Doc in_doc, Filter in_stream, WordToPDFOptions options)
Convert the a Word document (in .docx format) to pdf and append to the specified PDF document.
static void wordToPdf(Doc in_doc, String in_filename, WordToPDFOptions options)
Convert the a Word document (in .docx format) to pdf and append to the specified PDF document.
static DocumentConversion wordToPdfConversion(Doc in_doc, String in_filename, WordToPDFOptions options)
Create a DocumentConversion object suitable for converting a Word document (in .docx format) to pdf and appending to the specified PDF document.
static DocumentConversion wordToPdfConversion(Doc in_doc, Filter in_stream, WordToPDFOptions options)
Create a DocumentConversion object suitable for converting a Word document (in .docx format) to pdf and appending to the specified PDF document.
[Expand]
Inherited Methods
From class java.lang.Object

Constants

public static final int e_default

Render text that are somewhat clipped or occluded.

Constant Value: 2 (0x00000002)

public static final int e_fast

Feature reduce PDF while trying to preserve some complex PDF features (such as vector figures, transparency, shadings, blend modes, Type3 fonts etc.) for pages that are already fast to render. This option can also result in smaller & faster files compared to e_simple, but the pages may have more complex structure.

Constant Value: 2 (0x00000002)

public static final int e_high_quality

Preserve vector content where possible. In particular only feature reduce PDF files containing overprint or very complex vector content. Currently this option can only be used with XODOutputOptions.

Constant Value: 3 (0x00000003)

public static final int e_keep_all

Only render text that are completely occluded, or used as a clipping path.

Constant Value: 4 (0x00000004)

public static final int e_keep_most

Only render text that are seriously clipped or occluded.

Constant Value: 3 (0x00000003)

public static final int e_off

Disable flattening and convert all content as is.

Constant Value: 0 (0x00000000)

public static final int e_simple

Feature reduce PDF to a simple two layer representation consisting of a single background RGB image and a simple top text layer.

Constant Value: 1 (0x00000001)

public static final int e_strict

Render text that are marginally clipped or occluded.

Constant Value: 1 (0x00000001)

public static final int e_very_strict

Render (flatten) any text that is clipped or occluded.

Constant Value: 0 (0x00000000)

Public Constructors

public Convert ()

Public Methods

public static DocumentConversion appendUniversalConversion (DocumentConversion initial_conversion, Filter in_stream, ConversionOptions options)

Create a DocumentConversion object suitable for converting a document to pdf and appending the result to an existing conversion. 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

Note: 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

Parameters
initial_conversion the existing conversion to which the newly created conversion will be appended.
in_stream the stream representing the content of the source document. The source must be in a format that is supported for universal conversion.
options the conversion options
Returns
  • A DocumentConversion object which represents the converted contents of in_stream appended to initial_conversion.

public static DocumentConversion appendUniversalConversion (DocumentConversion initial_conversion, String in_filename, ConversionOptions options)

Create a DocumentConversion object suitable for converting a document to pdf and appending the result to an existing conversion. 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

Note: 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

Parameters
initial_conversion the existing conversion to which the newly created conversion will be appended.
in_filename the path to the source document. The source must be in a format that is supported for universal conversion.
options the conversion options
Returns
  • A DocumentConversion object which represents the converted contents of in_filename appended to initial_conversion.

public static BlackBoxContext createBlackBoxContext (String in_filename)

public static BlackBoxContext createBlackBoxContextConvert (String src_filename, String dest_filename)

public static void fromCAD (Doc in_doc, String in_filename, CADConvertOptions cad_options)

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 avaialable. ee the `CADConvertOptions` class for the available options. See also: the 'CADModule' class

Parameters
in_doc the PDFDoc to append to
in_filename the path to the CAD document to convert
cad_options The options to use when converting.

public static void fromEmf (Doc in_doc, String in_filename)

Convert the specified EMF to PDF and append converted pages to to the specified PDF document. EMF will be fitted to the page.

Note: This method is available only on Windows platforms.

Parameters
in_doc the PDFDoc to append to
in_filename the path to the EMF document to convert

public static void fromText (Doc in_doc, String in_filename, Obj text_options)

public static void fromXps (Doc in_doc, byte[] buf)

Convert the specified XPS document contained in memory to PDF and append converted pages to the specified PDF document.

Parameters
in_doc the PDFDoc to append to
buf the buffer containing the xps document

public static void fromXps (Doc in_doc, String in_filename)

Convert the specified XPS document to PDF and append converted pages to to the specified PDF document.

Parameters
in_doc the PDFDoc to append to
in_filename the path to the XPS document to convert

public static void officeToPdf (Doc in_doc, String in_filename, ConversionOptions options)

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.

Note: 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

Parameters
in_doc the conversion result will be appended to this pdf.
in_filename the path to the source document.
options the conversion options

public static void officeToPdf (Doc in_doc, Filter in_stream, ConversionOptions options)

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.

Note: 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

Parameters
in_doc the conversion result will be appended to this pdf.
in_stream a stream providing input data.
options the conversion options

public static boolean requiresPrinter (String in_filename)

Utility function to determine if ToPdf will require the PDFNet printer to convert a specific file to PDF.

Note: Current implementation looks only at the file extension not file contents. If the file extension is missing, false will be returned

Parameters
in_filename the path to the document to be checked
Returns
  • true if ToPdf requires the printer to convert the file, false otherwise.

public static DocumentConversion streamingPdfConversion (Doc in_doc, Filter in_stream, ConversionOptions options)

Create a DocumentConversion object suitable for converting a document to pdf and appending the result to an existing 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.

Note: 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

Parameters
in_doc the conversion result will be appended to this pdf.
in_stream a stream providing input data.
options the conversion options
Returns
  • A DocumentConversion object which encapsulates this particular conversion.

public static DocumentConversion streamingPdfConversion (Doc in_doc, String in_filename, ConversionOptions options)

Create a DocumentConversion object suitable for converting a document to pdf and appending the result to an existing 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.

Note: 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

Parameters
in_doc the conversion result will be appended to this pdf.
in_filename the path to the source document.
options the conversion options
Returns
  • A DocumentConversion object which encapsulates this particular conversion.

public static DocumentConversion streamingPdfConversion (Filter in_stream, ConversionOptions options)

Create a DocumentConversion object suitable for converting a document 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.

Note: 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

Parameters
in_stream a stream providing input data.
options the conversion options
Returns
  • A DocumentConversion object which encapsulates this particular conversion.

public static DocumentConversion streamingPdfConversion (String in_filename, ConversionOptions options)

Create a DocumentConversion object suitable for converting a document 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.

Note: 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

Parameters
in_filename the path to the source document.
options the conversion options
Returns
  • A DocumentConversion object which encapsulates this particular conversion.

public static void toEmf (Doc in_doc, String in_filename)

Convert the PDFDoc to EMF and save to the specified path.

Note: This method is available only on Windows platforms.

Parameters
in_doc the PDFDoc to convert to EMF
in_filename the path to the EMF files to create, one file per page

public static void toEmf (Page in_page, String in_filename)

Convert the Page to EMF and save to the specified path.

Note: This method is available only on Windows platforms.

Parameters
in_page the Page to convert to EMF
in_filename the path to the EMF file to create

public static void toEpub (Doc in_doc, String out_path)

Convert the PDFDoc to EPUB format and save to the specified path

Parameters
in_doc the PDFDoc to convert to EPUB
out_path the path to where generated content will be stored

public static void toEpub (String in_filename, String out_path, Convert.HTMLOutputOptions html_options, Convert.EPUBOutputOptions epub_options)

Convert a file to EPUB format and save to the specified path

Note: Requires the Convert::Printer class for all file formats that ToPdf also requires.

Parameters
in_filename the PDFDoc to convert to EPUB
out_path the path to where generated content will be stored
html_options the HTML conversion options
epub_options the EPUB conversion options

public static void toEpub (String in_filename, String out_path)

Convert a file to EPUB format and save to the specified path

Note: Requires the Convert::Printer class for all file formats that ToPdf also requires.

Parameters
in_filename the PDFDoc to convert to EPUB
out_path the path to where generated content will be stored

public static void toEpub (Doc in_doc, String out_path, Convert.HTMLOutputOptions html_options, Convert.EPUBOutputOptions epub_options)

Convert the PDFDoc to EPUB format and save to the specified path

Parameters
in_doc the PDFDoc to convert to EPUB
out_path the path to where generated content will be stored
html_options the HTML conversion options
epub_options the EPUB conversion options

public static void toEpub (Doc in_doc, String out_path, Convert.HTMLOutputOptions html_options)

Convert the PDFDoc to EPUB format and save to the specified path

Parameters
in_doc the PDFDoc to convert to EPUB
out_path the path to where generated content will be stored
html_options the HTML conversion options

public static void toEpub (String in_filename, String out_path, Convert.EPUBOutputOptions epub_options)

Convert a file to EPUB format and save to the specified path

Note: Requires the Convert::Printer class for all file formats that ToPdf also requires.

Parameters
in_filename the PDFDoc to convert to EPUB
out_path the path to where generated content will be stored
epub_options the EPUB conversion options

public static void toEpub (Doc in_doc, String out_path, Convert.EPUBOutputOptions epub_options)

Convert the PDFDoc to EPUB format and save to the specified path

Parameters
in_doc the PDFDoc to convert to EPUB
out_path the path to where generated content will be stored
epub_options the EPUB conversion options

public static void toEpub (String in_filename, String out_path, Convert.HTMLOutputOptions html_options)

Convert a file to EPUB format and save to the specified path

Note: Requires the Convert::Printer class for all file formats that ToPdf also requires.

Parameters
in_filename the PDFDoc to convert to EPUB
out_path the path to where generated content will be stored
html_options the HTML conversion options

public static void toHtml (Doc in_doc, String out_path)

Convert the PDF to HTML and save to the specified path

Parameters
in_doc the PDF doc to convert to HTML
out_path the path to where generated content will be stored

public static void toHtml (String in_filename, String out_path)

Convert a file to HTML and save to the specified path

Note: Requires the Convert::Printer class for all file formats that ToPdf also requires.

Parameters
in_filename the file to convert to HTML
out_path the path to where generated content will be stored

public static void toHtml (Doc in_doc, String out_path, Convert.HTMLOutputOptions options)

Convert the PDF to HTML and save to the specified path

Parameters
in_doc the PDF doc to convert to HTML
out_path the path to where generated content will be stored
options the conversion options

public static void toHtml (String in_filename, String out_path, Convert.HTMLOutputOptions options)

Convert a file to HTML and save to the specified path

Note: Requires the Convert::Printer class for all file formats that ToPdf also requires.

Parameters
in_filename the file to convert to HTML
out_path the path to where generated content will be stored
options the conversion options

public static void toPdf (Doc in_doc, String in_filename)

Convert the file or document to PDF and append to the specified PDF document.

Note: Internally formats include BMP, EMF, JPEG, PNG, TIF, XPS.

Note: 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).

Parameters
in_doc 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.
in_filename the path to the document to be converted to XPS

public static void toSvg (Page in_page, String in_filename, Convert.SVGOutputOptions in_options)

Convert the Page to SVG and save to the specified path.

Parameters
in_page the Page to convert to SVG
in_filename the path to the SVG file to create
in_options the conversion options

public static void toSvg (Doc in_doc, String in_filename, Convert.SVGOutputOptions in_options)

Convert the PDFDoc to SVG and save to the specified path.

Parameters
in_doc the PDFDoc to convert to SVG
in_filename the path to the SVG files to create, one file per page
in_options the conversion options

public static void toSvg (Page in_page, String in_filename)

Convert the Page to SVG and save to the specified path.

Parameters
in_page the Page to convert to SVG
in_filename the path to the SVG file to create

public static void toSvg (Doc in_doc, String in_filename)

Convert the PDFDoc to SVG and save to the specified path.

Parameters
in_doc the PDFDoc to convert to SVG
in_filename the path to the SVG files to create, one file per page

public static void toTiff (String in_filename, String out_path)

Convert a file to multipage Tiff and save to the specified path

Parameters
in_filename the file to convert to Tiff
out_path the path to where generated content will be stored

public static void toTiff (Doc in_doc, String out_path, Convert.TiffOutputOptions options)

Convert the PDF to multipage Tiff and save to the specified path

Parameters
in_doc the PDF doc to convert to Tiff
out_path the path to where generated content will be stored
options the conversion options

public static void toTiff (Doc in_doc, String out_path)

Convert the PDF to multipage Tiff and save to the specified path

Parameters
in_doc the PDF doc to convert to Tiff
out_path the path to where generated content will be stored

public static void toTiff (String in_filename, String out_path, Convert.TiffOutputOptions options)

Convert a file to multipage Tiff and save to the specified path

Parameters
in_filename the file to convert to Tiff
out_path the path to where generated content will be stored
options the conversion options

public static Filter toXod (String in_filename)

Generate a stream that incrementally converts the input file to XOD format.

Note: Internally formats include BMP, EMF, JPEG, PNG, TIF, XPS, PDF.

Note: 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).

Parameters
in_filename the in_filename
Returns
  • A filter from which the file can be read incrementally.

public static Filter toXod (Doc in_doc, Convert.XODOutputOptions options)

Generate a stream that incrementally converts the input file to XOD format.

Parameters
in_doc the PDFDoc to convert to XOD
options the conversion options
Returns
  • A filter from which the file can be read incrementally.

public static Filter toXod (String in_filename, Convert.XODOutputOptions options)

Generate a stream that incrementally converts the input file to XOD format.

Note: Internally formats include BMP, EMF, JPEG, PNG, TIF, XPS, PDF.

Note: 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).

Parameters
in_filename the in_filename
options the conversion options
Returns
  • A filter from which the file can be read incrementally.

public static void toXod (Doc in_doc, String out_filename)

Convert the input file to XOD format and save to the specified path.

Parameters
in_doc the PDFDoc to convert to XOD
out_filename the out_filename

public static Filter toXod (Doc in_doc)

Generate a stream that incrementally converts the input file to XOD format.

Parameters
in_doc the PDFDoc to convert to XOD
Returns
  • A filter from which the file can be read incrementally.

public static void toXod (Doc in_doc, String out_filename, Convert.XODOutputOptions options)

Convert the input file to XOD format and save to the specified path.

Parameters
in_doc the PDFDoc to convert to XOD
out_filename the out_filename
options the conversion options

public static void toXod (String in_filename, String out_filename)

Convert the input file to XOD format and save to the specified path.

Note: Internally formats include BMP, EMF, JPEG, PNG, TIF, XPS, PDF.

Note: 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).

Parameters
in_filename the in_filename
out_filename the out_filename

public static void toXod (String in_filename, String out_filename, Convert.XODOutputOptions options)

Convert the input file to XOD format and save to the specified path.

Note: Internally formats include BMP, EMF, JPEG, PNG, TIF, XPS, PDF.

Note: 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).

Parameters
in_filename the in_filename
out_filename the out_filename
options the conversion options

public static void toXps (String in_inputFilename, String in_outputFilename)

Convert the file or document to XPS and write to the specified file.

Note: Internally formats include BMP, EMF, JPEG, PNG, TIF, XPS.

Note: 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).

Parameters
in_inputFilename the path to the document to be converted to XPS
in_outputFilename the path to the output XPS file

public static void toXps (Doc in_doc, String in_filename)

Convert the PDFDoc to XPS and save to the specified path.

Parameters
in_doc the PDFDoc to convert to XPS
in_filename the path to the document to create

public static void toXps (Doc in_doc, String in_filename, Convert.XPSOutputOptions options)

Convert the PDFDoc to XPS and save to the specified path.

Parameters
in_doc the PDFDoc to convert to XPS
in_filename the path to the document to create
options the conversion options

public static void toXps (String in_inputFilename, String in_outputFilename, Convert.XPSOutputOptions options)

Convert the file or document to XPS and write to the specified file.

Note: Internally formats include BMP, EMF, JPEG, PNG, TIF, XPS.

Note: 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).

Parameters
in_inputFilename the path to the document to be converted to XPS
in_outputFilename the path to the output XPS file
options the conversion options

public static DocumentConversion universalConversion (Filter in_stream, ConversionOptions options)

Create a DocumentConversion object suitable for converting a document 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.

Note: 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

Parameters
in_stream the stream representing the content of the source document. The source must be in a format that is supported for universal conversion.
options the conversion options
Returns
  • A DocumentConversion object which encapsulates this particular conversion.

public static DocumentConversion universalConversion (String in_filename, ConversionOptions options)

Create a DocumentConversion object suitable for converting a document 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.

Note: 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

Parameters
in_filename the path to the source document. The source must be in a format that is supported for universal conversion.
options the conversion options
Returns
  • A DocumentConversion object which encapsulates this particular conversion.

public static void wordToPdf (Doc in_doc, Filter in_stream, WordToPDFOptions options)

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.

Note: 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

Parameters
in_doc the conversion result will be appended to this pdf.
in_stream a stream providing input data. The source must be in .docx format.
options the conversion options
See Also

public static void wordToPdf (Doc in_doc, String in_filename, WordToPDFOptions options)

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.

Note: 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

Parameters
in_doc the conversion result will be appended to this pdf.
in_filename the path to the source document. The source must be in .docx format.
options the conversion options
See Also

public static DocumentConversion wordToPdfConversion (Doc in_doc, String in_filename, WordToPDFOptions options)

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.

Note: 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

Parameters
in_doc the conversion result will be appended to this pdf.
in_filename the path to the source document. The source must be in .docx format.
options the conversion options
Returns
  • A DocumentConversion object which encapsulates this particular conversion.

public static DocumentConversion wordToPdfConversion (Doc in_doc, Filter in_stream, WordToPDFOptions options)

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.

Note: 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

Parameters
in_doc the conversion result will be appended to this pdf.
in_stream a stream providing input data. The source must be in .docx format.
options the conversion options
Returns
  • A DocumentConversion object which encapsulates this particular conversion.