public class Convert
extends java.lang.Object
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();
Modifier and Type | Class and Description |
---|---|
static class |
Convert.EPUBOutputOptions
A class containing options common to ToEpub functions
|
static class |
Convert.HTMLOutputOptions
A class containing options common to ToHtml and ToEpub functions
|
static class |
Convert.SVGOutputOptions
A class containing options for ToSvg functions
|
static class |
Convert.TiffOutputOptions
A class containing options common to ToTiff functions
|
static class |
Convert.XODOutputOptions
A class containing options for ToXod functions
|
static class |
Convert.XPSOutputCommonOptions
A class containing options common to ToXps and ToXod functions
|
static class |
Convert.XPSOutputOptions
A class containing options for ToXps functions
|
Modifier and Type | Field and Description |
---|---|
static int |
e_default
Render text that are somewhat clipped or occluded.
|
static 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.
|
static int |
e_keep_all
Only render text that are completely occluded, or used as a clipping path.
|
static int |
e_keep_most
Only render text that are seriously clipped or occluded.
|
static int |
e_off
Disable flattening and convert all content as is.
|
static 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.
|
static int |
e_strict
Render text that are marginally clipped or occluded.
|
static int |
e_very_strict
Render (flatten) any text that is clipped or occluded.
|
Constructor and Description |
---|
Convert() |
Modifier and Type | Method and Description |
---|---|
static DocumentConversion |
appendUniversalConversion(DocumentConversion initial_conversion,
Filter in_stream,
WordToPDFOptions options)
Create a DocumentConversion object suitable for converting a document to pdf,
and append that conversion to an existing conversion.
|
static DocumentConversion |
appendUniversalConversion(DocumentConversion initial_conversion,
java.lang.String in_filename,
WordToPDFOptions options)
Create a DocumentConversion object suitable for converting a document to pdf,
and append that conversion to an existing conversion.
|
static void |
fromEmf(Doc in_doc,
java.lang.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,
java.lang.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,
java.lang.String in_filename)
Convert the specified XPS document to PDF and append converted pages to
to the specified PDF document.
|
static boolean |
requiresPrinter(java.lang.String in_filename)
Utility function to determine if ToPdf will require the PDFNet
printer to convert a specific file to PDF.
|
static void |
toEmf(Doc in_doc,
java.lang.String in_filename)
Convert the PDFDoc to EMF and save to the specified path.
|
static void |
toEmf(Page in_page,
java.lang.String in_filename)
Convert the Page to EMF and save to the specified path.
|
static void |
toEpub(Doc in_doc,
java.lang.String out_path)
Convert the PDFDoc to EPUB format and save to the specified path
|
static void |
toEpub(Doc in_doc,
java.lang.String out_path,
Convert.EPUBOutputOptions epub_options)
Convert the PDFDoc to EPUB format and save to the specified path
|
static void |
toEpub(Doc in_doc,
java.lang.String out_path,
Convert.HTMLOutputOptions html_options)
Convert the PDFDoc to EPUB format and save to the specified path
|
static void |
toEpub(Doc in_doc,
java.lang.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(java.lang.String in_filename,
java.lang.String out_path)
Convert a file to EPUB format and save to the specified path
|
static void |
toEpub(java.lang.String in_filename,
java.lang.String out_path,
Convert.EPUBOutputOptions epub_options)
Convert a file to EPUB format and save to the specified path
|
static void |
toEpub(java.lang.String in_filename,
java.lang.String out_path,
Convert.HTMLOutputOptions html_options)
Convert a file to EPUB format and save to the specified path
|
static void |
toEpub(java.lang.String in_filename,
java.lang.String out_path,
Convert.HTMLOutputOptions html_options,
Convert.EPUBOutputOptions epub_options)
Convert a file to EPUB format and save to the specified path
|
static void |
toHtml(Doc in_doc,
java.lang.String out_path)
Convert the PDF to HTML and save to the specified path
|
static void |
toHtml(Doc in_doc,
java.lang.String out_path,
Convert.HTMLOutputOptions options)
Convert the PDF to HTML and save to the specified path
|
static void |
toHtml(java.lang.String in_filename,
java.lang.String out_path)
Convert a file to HTML and save to the specified path
|
static void |
toHtml(java.lang.String in_filename,
java.lang.String out_path,
Convert.HTMLOutputOptions options)
Convert a file to HTML and save to the specified path
|
static void |
toPdf(Doc in_doc,
java.lang.String in_filename)
Convert the file or document to PDF and append to the specified PDF document.
|
static void |
toSvg(Doc in_doc,
java.lang.String in_filename)
Convert the PDFDoc to SVG and save to the specified path.
|
static void |
toSvg(Doc in_doc,
java.lang.String in_filename,
Convert.SVGOutputOptions in_options)
Convert the PDFDoc to SVG and save to the specified path.
|
static void |
toSvg(Page in_page,
java.lang.String in_filename)
Convert the Page to SVG and save to the specified path.
|
static void |
toSvg(Page in_page,
java.lang.String in_filename,
Convert.SVGOutputOptions in_options)
Convert the Page to SVG and save to the specified path.
|
static void |
toTiff(Doc in_doc,
java.lang.String out_path)
Convert the PDF to multipage Tiff and save to the specified path
|
static void |
toTiff(Doc in_doc,
java.lang.String out_path,
Convert.TiffOutputOptions options)
Convert the PDF to multipage Tiff and save to the specified path
|
static void |
toTiff(java.lang.String in_filename,
java.lang.String out_path)
Convert a file to multipage Tiff and save to the specified path
|
static void |
toTiff(java.lang.String in_filename,
java.lang.String out_path,
Convert.TiffOutputOptions options)
Convert a file to multipage Tiff 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 Filter |
toXod(Doc in_doc,
Convert.XODOutputOptions options)
Generate a stream that incrementally converts the input file to XOD format.
|
static void |
toXod(Doc in_doc,
java.lang.String out_filename)
Convert the input file to XOD format and save to the specified path.
|
static void |
toXod(Doc in_doc,
java.lang.String out_filename,
Convert.XODOutputOptions options)
Convert the input file to XOD format and save to the specified path.
|
static Filter |
toXod(java.lang.String in_filename)
Generate a stream that incrementally converts the input file to XOD format.
|
static Filter |
toXod(java.lang.String in_filename,
Convert.XODOutputOptions options)
Generate a stream that incrementally converts the input file to XOD format.
|
static void |
toXod(java.lang.String in_filename,
java.lang.String out_filename)
Convert the input file to XOD format and save to the specified path.
|
static void |
toXod(java.lang.String in_filename,
java.lang.String out_filename,
Convert.XODOutputOptions options)
Convert the input file to XOD format and save to the specified path.
|
static void |
toXps(Doc in_doc,
java.lang.String in_filename)
Convert the PDFDoc to XPS and save to the specified path.
|
static void |
toXps(Doc in_doc,
java.lang.String in_filename,
Convert.XPSOutputOptions options)
Convert the PDFDoc to XPS and save to the specified path.
|
static void |
toXps(java.lang.String in_inputFilename,
java.lang.String in_outputFilename)
Convert the file or document to XPS and write to the specified file.
|
static void |
toXps(java.lang.String in_inputFilename,
java.lang.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,
WordToPDFOptions options)
Create a DocumentConversion object suitable for converting a document to pdf.
|
static DocumentConversion |
universalConversion(java.lang.String in_filename,
WordToPDFOptions 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,
java.lang.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,
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.
|
static DocumentConversion |
wordToPdfConversion(Doc in_doc,
java.lang.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.
|
public static final int e_very_strict
public static final int e_strict
public static final int e_default
public static final int e_keep_most
public static final int e_keep_all
public static final int e_off
public static final int e_simple
public static final int e_fast
public static void fromXps(Doc in_doc, java.lang.String in_filename) throws PDFNetException
in_doc
- the PDFDoc to append toin_filename
- the path to the XPS document to convertPDFNetException
public static void fromXps(Doc in_doc, byte[] buf) throws PDFNetException
in_doc
- the PDFDoc to append tobuf
- the buffer containing the xps documentPDFNetException
public static void fromEmf(Doc in_doc, java.lang.String in_filename) throws PDFNetException
Note: This method is available only on Windows platforms.
in_doc
- the PDFDoc to append toin_filename
- the path to the EMF document to convertPDFNetException
public static void fromText(Doc in_doc, java.lang.String in_filename, Obj text_options) throws PDFNetException
PDFNetException
public static void toEmf(Doc in_doc, java.lang.String in_filename) throws PDFNetException
Note: This method is available only on Windows platforms.
in_doc
- the PDFDoc to convert to EMFin_filename
- the path to the EMF files to create, one file per pagePDFNetException
public static void toEmf(Page in_page, java.lang.String in_filename) throws PDFNetException
Note: This method is available only on Windows platforms.
in_page
- the Page to convert to EMFin_filename
- the path to the EMF file to createPDFNetException
public static void toSvg(Doc in_doc, java.lang.String in_filename) throws PDFNetException
in_doc
- the PDFDoc to convert to SVGin_filename
- the path to the SVG files to create, one file per pagePDFNetException
public static void toSvg(Doc in_doc, java.lang.String in_filename, Convert.SVGOutputOptions in_options) throws PDFNetException
in_doc
- the PDFDoc to convert to SVGin_filename
- the path to the SVG files to create, one file per pagein_options
- the conversion optionsPDFNetException
public static void toSvg(Page in_page, java.lang.String in_filename) throws PDFNetException
in_page
- the Page to convert to SVGin_filename
- the path to the SVG file to createPDFNetException
public static void toSvg(Page in_page, java.lang.String in_filename, Convert.SVGOutputOptions in_options) throws PDFNetException
in_page
- the Page to convert to SVGin_filename
- the path to the SVG file to createin_options
- the conversion optionsPDFNetException
public static void toXps(Doc in_doc, java.lang.String in_filename) throws PDFNetException
in_doc
- the PDFDoc to convert to XPSin_filename
- the path to the document to createPDFNetException
public static void toXps(Doc in_doc, java.lang.String in_filename, Convert.XPSOutputOptions options) throws PDFNetException
in_doc
- the PDFDoc to convert to XPSin_filename
- the path to the document to createoptions
- the conversion optionsPDFNetException
Convert.XPSOutputOptions
public static void toXps(java.lang.String in_inputFilename, java.lang.String in_outputFilename) throws PDFNetException
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).
in_inputFilename
- the path to the document to be converted to XPSin_outputFilename
- the path to the output XPS filePDFNetException
public static void toXps(java.lang.String in_inputFilename, java.lang.String in_outputFilename, Convert.XPSOutputOptions options) throws PDFNetException
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).
in_inputFilename
- the path to the document to be converted to XPSin_outputFilename
- the path to the output XPS fileoptions
- the conversion optionsPDFNetException
Convert.XPSOutputOptions
public static void toXod(java.lang.String in_filename, java.lang.String out_filename) throws PDFNetException
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).
in_filename
- the in_filenameout_filename
- the out_filenamePDFNetException
public static void toXod(java.lang.String in_filename, java.lang.String out_filename, Convert.XODOutputOptions options) throws PDFNetException
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).
in_filename
- the in_filenameout_filename
- the out_filenameoptions
- the conversion optionsPDFNetException
Convert.XODOutputOptions
public static void toXod(Doc in_doc, java.lang.String out_filename) throws PDFNetException
in_doc
- the PDFDoc to convert to XODout_filename
- the out_filenamePDFNetException
public static void toXod(Doc in_doc, java.lang.String out_filename, Convert.XODOutputOptions options) throws PDFNetException
in_doc
- the PDFDoc to convert to XODout_filename
- the out_filenameoptions
- the conversion optionsPDFNetException
Convert.XODOutputOptions
public static Filter toXod(Doc in_doc) throws PDFNetException
in_doc
- the PDFDoc to convert to XODPDFNetException
public static Filter toXod(Doc in_doc, Convert.XODOutputOptions options) throws PDFNetException
in_doc
- the PDFDoc to convert to XODoptions
- the conversion optionsPDFNetException
Convert.XODOutputOptions
public static Filter toXod(java.lang.String in_filename) throws PDFNetException
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).
in_filename
- the in_filenamePDFNetException
public static Filter toXod(java.lang.String in_filename, Convert.XODOutputOptions options) throws PDFNetException
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).
in_filename
- the in_filenameoptions
- the conversion optionsPDFNetException
Convert.XODOutputOptions
public static void toHtml(java.lang.String in_filename, java.lang.String out_path) throws PDFNetException
Note: Requires the Convert::Printer class for all file formats that ToPdf also requires.
in_filename
- the file to convert to HTMLout_path
- the path to where generated content will be storedPDFNetException
toPdf(Doc, String)
public static void toHtml(java.lang.String in_filename, java.lang.String out_path, Convert.HTMLOutputOptions options) throws PDFNetException
Note: Requires the Convert::Printer class for all file formats that ToPdf also requires.
in_filename
- the file to convert to HTMLout_path
- the path to where generated content will be storedoptions
- the conversion optionsPDFNetException
Convert.HTMLOutputOptions
,
toPdf(Doc, String)
public static void toHtml(Doc in_doc, java.lang.String out_path) throws PDFNetException
in_doc
- the PDF doc to convert to HTMLout_path
- the path to where generated content will be storedPDFNetException
public static void toHtml(Doc in_doc, java.lang.String out_path, Convert.HTMLOutputOptions options) throws PDFNetException
in_doc
- the PDF doc to convert to HTMLout_path
- the path to where generated content will be storedoptions
- the conversion optionsPDFNetException
Convert.HTMLOutputOptions
public static void toEpub(java.lang.String in_filename, java.lang.String out_path) throws PDFNetException
Note: Requires the Convert::Printer class for all file formats that ToPdf also requires.
in_filename
- the PDFDoc to convert to EPUBout_path
- the path to where generated content will be storedPDFNetException
toPdf(Doc, String)
public static void toEpub(java.lang.String in_filename, java.lang.String out_path, Convert.HTMLOutputOptions html_options) throws PDFNetException
Note: Requires the Convert::Printer class for all file formats that ToPdf also requires.
in_filename
- the PDFDoc to convert to EPUBout_path
- the path to where generated content will be storedhtml_options
- the HTML conversion optionsPDFNetException
Convert.HTMLOutputOptions
,
toPdf(Doc, String)
public static void toEpub(java.lang.String in_filename, java.lang.String out_path, Convert.EPUBOutputOptions epub_options) throws PDFNetException
Note: Requires the Convert::Printer class for all file formats that ToPdf also requires.
in_filename
- the PDFDoc to convert to EPUBout_path
- the path to where generated content will be storedepub_options
- the EPUB conversion optionsPDFNetException
Convert.EPUBOutputOptions
,
toPdf(Doc, String)
public static void toEpub(java.lang.String in_filename, java.lang.String out_path, Convert.HTMLOutputOptions html_options, Convert.EPUBOutputOptions epub_options) throws PDFNetException
Note: Requires the Convert::Printer class for all file formats that ToPdf also requires.
in_filename
- the PDFDoc to convert to EPUBout_path
- the path to where generated content will be storedhtml_options
- the HTML conversion optionsepub_options
- the EPUB conversion optionsPDFNetException
Convert.HTMLOutputOptions
,
Convert.EPUBOutputOptions
,
toPdf(Doc, String)
public static void toEpub(Doc in_doc, java.lang.String out_path) throws PDFNetException
in_doc
- the PDFDoc to convert to EPUBout_path
- the path to where generated content will be storedPDFNetException
public static void toEpub(Doc in_doc, java.lang.String out_path, Convert.HTMLOutputOptions html_options) throws PDFNetException
in_doc
- the PDFDoc to convert to EPUBout_path
- the path to where generated content will be storedhtml_options
- the HTML conversion optionsPDFNetException
Convert.HTMLOutputOptions
public static void toEpub(Doc in_doc, java.lang.String out_path, Convert.EPUBOutputOptions epub_options) throws PDFNetException
in_doc
- the PDFDoc to convert to EPUBout_path
- the path to where generated content will be storedepub_options
- the EPUB conversion optionsPDFNetException
Convert.EPUBOutputOptions
public static void toEpub(Doc in_doc, java.lang.String out_path, Convert.HTMLOutputOptions html_options, Convert.EPUBOutputOptions epub_options) throws PDFNetException
in_doc
- the PDFDoc to convert to EPUBout_path
- the path to where generated content will be storedhtml_options
- the HTML conversion optionsepub_options
- the EPUB conversion optionsPDFNetException
Convert.HTMLOutputOptions
,
Convert.EPUBOutputOptions
public static void toTiff(java.lang.String in_filename, java.lang.String out_path) throws PDFNetException
in_filename
- the file to convert to Tiffout_path
- the path to where generated content will be storedPDFNetException
public static void toTiff(java.lang.String in_filename, java.lang.String out_path, Convert.TiffOutputOptions options) throws PDFNetException
in_filename
- the file to convert to Tiffout_path
- the path to where generated content will be storedoptions
- the conversion optionsPDFNetException
Convert.TiffOutputOptions
public static void toTiff(Doc in_doc, java.lang.String out_path) throws PDFNetException
in_doc
- the PDF doc to convert to Tiffout_path
- the path to where generated content will be storedPDFNetException
public static void toTiff(Doc in_doc, java.lang.String out_path, Convert.TiffOutputOptions options) throws PDFNetException
in_doc
- the PDF doc to convert to Tiffout_path
- the path to where generated content will be storedoptions
- the conversion optionsPDFNetException
Convert.TiffOutputOptions
public static DocumentConversion universalConversion(java.lang.String in_filename, WordToPDFOptions options) throws PDFNetException
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
in_filename
- the path to the source document. The source must be in a format that
is supported for universal conversion.options
- the conversion optionsPDFNetException
DocumentConversion
,
WordToPDFOptions
public static DocumentConversion universalConversion(Filter in_stream, WordToPDFOptions options) throws PDFNetException
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
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 optionsPDFNetException
DocumentConversion
,
WordToPDFOptions
public static DocumentConversion appendUniversalConversion(DocumentConversion initial_conversion, java.lang.String in_filename, WordToPDFOptions options) throws PDFNetException
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
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 optionsPDFNetException
DocumentConversion
,
WordToPDFOptions
public static DocumentConversion appendUniversalConversion(DocumentConversion initial_conversion, Filter in_stream, WordToPDFOptions options) throws PDFNetException
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
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 optionsPDFNetException
DocumentConversion
,
WordToPDFOptions
public static void wordToPdf(Doc in_doc, java.lang.String in_filename, WordToPDFOptions options) throws PDFNetException
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
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 optionsPDFNetException
WordToPDFOptions
public static DocumentConversion wordToPdfConversion(Doc in_doc, java.lang.String in_filename, WordToPDFOptions options) throws PDFNetException
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
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 optionsPDFNetException
DocumentConversion
,
WordToPDFOptions
public static void wordToPdf(Doc in_doc, Filter in_stream, WordToPDFOptions options) throws PDFNetException
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
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 optionsPDFNetException
WordToPDFOptions
public static DocumentConversion wordToPdfConversion(Doc in_doc, Filter in_stream, WordToPDFOptions options) throws PDFNetException
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
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 optionsPDFNetException
DocumentConversion
,
WordToPDFOptions
public static void toPdf(Doc in_doc, java.lang.String in_filename) throws PDFNetException
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).
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 XPSPDFNetException
public static boolean requiresPrinter(java.lang.String in_filename) throws PDFNetException
Note: Current implementation looks only at the file extension not file contents. If the file extension is missing, false will be returned
in_filename
- the path to the document to be checkedPDFNetException