Package com.itextpdf.pdfoffice
Class OfficeConverter
java.lang.Object
com.itextpdf.pdfoffice.OfficeConverter
The main class for converting office files to PDF.
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidconvertOfficeDocumentToPdf(File docFile, File pdfFile) Converts an office document to a PDF.static voidconvertOfficeDocumentToPdf(File docFile, File pdfFile, OfficeDocumentConverterProperties properties) Converts an office document to a PDF with the specified conversion properties.static voidconvertOfficeDocumentToPdf(InputStream docInputStream, OutputStream pdfOutputStream) Converts an office document to a PDF.static voidconvertOfficeDocumentToPdf(InputStream docInputStream, OutputStream pdfOutputStream, OfficeDocumentConverterProperties properties) Converts an office document to a PDF with the specified conversion properties.static voidconvertOfficePresentationToPdf(File presentationFile, File pdfFile) Converts an office presentation to a PDF.static voidconvertOfficePresentationToPdf(File presentationFile, File pdfFile, OfficePresentationConverterProperties properties) Converts an office presentation to a PDF with the specified conversion properties.static voidconvertOfficePresentationToPdf(InputStream presentationInputStream, OutputStream pdfOutputStream) Converts an office presentation to a PDF.static voidconvertOfficePresentationToPdf(InputStream presentationInputStream, OutputStream pdfOutputStream, OfficePresentationConverterProperties properties) Converts an office presentation to a PDF with the specified conversion properties.static voidconvertOfficeSpreadsheetToPdf(File spreadsheetFile, File pdfFile) Converts an office spreadsheet to a PDF.static voidconvertOfficeSpreadsheetToPdf(File spreadsheetFile, File pdfFile, OfficeSpreadsheetConverterProperties properties) Converts an office spreadsheet to a PDF with the specified conversion properties.static voidconvertOfficeSpreadsheetToPdf(InputStream spreadsheetInputStream, OutputStream pdfOutputStream) Converts an office spreadsheet to a PDF.static voidconvertOfficeSpreadsheetToPdf(InputStream spreadsheetInputStream, OutputStream pdfOutputStream, OfficeSpreadsheetConverterProperties properties) Converts an office spreadsheet to a PDF with the specified conversion properties.
-
Method Details
-
convertOfficeDocumentToPdf
public static void convertOfficeDocumentToPdf(File docFile, File pdfFile) throws IOException, PdfOfficeException Converts an office document to a PDF.- Parameters:
-
docFile- input document file -
pdfFile- output PDF file - Throws:
-
IOException- signals that an I/O exception of some sort has occurred -
PdfOfficeException- runtime exception that gets thrown if something goes wrong in the office files to PDF conversion
-
convertOfficeDocumentToPdf
public static void convertOfficeDocumentToPdf(InputStream docInputStream, OutputStream pdfOutputStream) throws IOException, PdfOfficeException Converts an office document to a PDF.- Parameters:
-
docInputStream- input document stream. Note, that this method doesn't close the stream. -
pdfOutputStream- output PDF stream. Note, that this method doesn't close the stream. - Throws:
-
IOException- signals that an I/O exception of some sort has occurred -
PdfOfficeException- runtime exception that gets thrown if something goes wrong in the office files to PDF conversion
-
convertOfficeDocumentToPdf
public static void convertOfficeDocumentToPdf(File docFile, File pdfFile, OfficeDocumentConverterProperties properties) throws IOException, PdfOfficeException Converts an office document to a PDF with the specified conversion properties.- Parameters:
-
docFile- input document file -
pdfFile- output PDF file -
properties- properties to configure the conversion operation - Throws:
-
IOException- signals that an I/O exception of some sort has occurred -
PdfOfficeException- runtime exception that gets thrown if something goes wrong in the office files to PDF conversion
-
convertOfficeDocumentToPdf
public static void convertOfficeDocumentToPdf(InputStream docInputStream, OutputStream pdfOutputStream, OfficeDocumentConverterProperties properties) throws IOException, PdfOfficeException Converts an office document to a PDF with the specified conversion properties.- Parameters:
-
docInputStream- input document stream. Note, that this method doesn't close the stream. -
pdfOutputStream- output PDF stream. Note, that this method doesn't close the stream. -
properties- properties to configure the conversion operation - Throws:
-
IOException- signals that an I/O exception of some sort has occurred -
PdfOfficeException- runtime exception that gets thrown if something goes wrong in the office files to PDF conversion
-
convertOfficePresentationToPdf
public static void convertOfficePresentationToPdf(File presentationFile, File pdfFile) throws IOException Converts an office presentation to a PDF.- Parameters:
-
presentationFile- input presentation file -
pdfFile- output PDF file - Throws:
-
IOException- signals that an I/O exception of some sort has occurred -
PdfOfficeException- runtime exception that gets thrown if something goes wrong in the office files to PDF conversion
-
convertOfficePresentationToPdf
public static void convertOfficePresentationToPdf(InputStream presentationInputStream, OutputStream pdfOutputStream) throws IOException, PdfOfficeException Converts an office presentation to a PDF.- Parameters:
-
presentationInputStream- input presentation stream. Note, that this method doesn't close the stream. -
pdfOutputStream- output PDF stream. Note, that this method doesn't close the stream. - Throws:
-
IOException- signals that an I/O exception of some sort has occurred -
PdfOfficeException- runtime exception that gets thrown if something goes wrong in the office files to PDF conversion
-
convertOfficePresentationToPdf
public static void convertOfficePresentationToPdf(File presentationFile, File pdfFile, OfficePresentationConverterProperties properties) throws IOException Converts an office presentation to a PDF with the specified conversion properties.- Parameters:
-
presentationFile- input presentation file -
pdfFile- output PDF file -
properties- properties to configure the conversion operation - Throws:
-
IOException- signals that an I/O exception of some sort has occurred -
PdfOfficeException- runtime exception that gets thrown if something goes wrong in the office files to PDF conversion
-
convertOfficePresentationToPdf
public static void convertOfficePresentationToPdf(InputStream presentationInputStream, OutputStream pdfOutputStream, OfficePresentationConverterProperties properties) throws IOException, PdfOfficeException Converts an office presentation to a PDF with the specified conversion properties.- Parameters:
-
presentationInputStream- input presentation stream. Note, that this method doesn't close the stream. -
pdfOutputStream- output PDF stream. Note, that this method doesn't close the stream. -
properties- properties to configure the conversion operation - Throws:
-
IOException- signals that an I/O exception of some sort has occurred -
PdfOfficeException- runtime exception that gets thrown if something goes wrong in the office files to PDF conversion
-
convertOfficeSpreadsheetToPdf
public static void convertOfficeSpreadsheetToPdf(File spreadsheetFile, File pdfFile) throws IOException Converts an office spreadsheet to a PDF.- Parameters:
-
spreadsheetFile- input spreadsheet file -
pdfFile- output PDF file - Throws:
-
IOException- signals that an I/O exception of some sort has occurred -
PdfOfficeException- runtime exception that gets thrown if something goes wrong in the office files to PDF conversion
-
convertOfficeSpreadsheetToPdf
public static void convertOfficeSpreadsheetToPdf(InputStream spreadsheetInputStream, OutputStream pdfOutputStream) throws IOException, PdfOfficeException Converts an office spreadsheet to a PDF.- Parameters:
-
spreadsheetInputStream- input spreadsheet stream. Note, that this method doesn't close the stream. -
pdfOutputStream- output PDF stream. Note, that this method doesn't close the stream. - Throws:
-
IOException- signals that an I/O exception of some sort has occurred -
PdfOfficeException- runtime exception that gets thrown if something goes wrong in the office files to PDF conversion
-
convertOfficeSpreadsheetToPdf
public static void convertOfficeSpreadsheetToPdf(File spreadsheetFile, File pdfFile, OfficeSpreadsheetConverterProperties properties) throws IOException Converts an office spreadsheet to a PDF with the specified conversion properties.- Parameters:
-
spreadsheetFile- input spreadsheet file -
pdfFile- output PDF file -
properties- properties to configure the conversion operation - Throws:
-
IOException- signals that an I/O exception of some sort has occurred -
PdfOfficeException- runtime exception that gets thrown if something goes wrong in the office files to PDF conversion
-
convertOfficeSpreadsheetToPdf
public static void convertOfficeSpreadsheetToPdf(InputStream spreadsheetInputStream, OutputStream pdfOutputStream, OfficeSpreadsheetConverterProperties properties) throws IOException, PdfOfficeException Converts an office spreadsheet to a PDF with the specified conversion properties.- Parameters:
-
spreadsheetInputStream- input spreadsheet stream. Note, that this method doesn't close the stream. -
pdfOutputStream- output PDF stream. Note, that this method doesn't close the stream. -
properties- properties to configure the conversion operation - Throws:
-
IOException- signals that an I/O exception of some sort has occurred -
PdfOfficeException- runtime exception that gets thrown if something goes wrong in the office files to PDF conversion
-