Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.
Use the EPUB Converter guides to convert an EPUB e-book to PDF, XPS, DOCX, JPG, PNG, BMP, TIFF, and GIF in Java. Open the EPUB as a stream, create save options for the target format, and call Converter.convertEPUB().
EPUB is an open e-book standard that packages HTML, CSS, images, and other publication resources into one file. Aspose.HTML for Java provides convertEPUB() overloads for converting EPUB content to fixed-layout documents and raster images.
PdfSaveOptions or ImageSaveOptions.Converter.convertEPUB(stream, options, outputPath) to convert the EPUB content.The following Java example opens input.epub, creates PdfSaveOptions, and converts the e-book to output-epub-to-pdf.pdf.
1// Convert EPUB to PDF in Java
2
3// Open an existing EPUB file for reading
4java.io.FileInputStream fileInputStream = new java.io.FileInputStream("input.epub");
5
6// Create an instance of the PdfSaveOptions class
7PdfSaveOptions options = new PdfSaveOptions();
8
9// Call the convertEPUB() method to convert EPUB to PDF
10Converter.convertEPUB(fileInputStream, options, "output-epub-to-pdf.pdf");PdfSaveOptions.ImageSaveOptions.ImageSaveOptions.The Java API also provides convertEPUB() overloads that accept XpsSaveOptions, DocSaveOptions, other ImageFormat values, and output stream providers. The articles above document the EPUB output formats currently covered by Java examples in this section.
Use the free online EPUB Converter for quick manual conversion without writing Java code. Use Aspose.HTML for Java when EPUB conversion must run programmatically.
Download complete Java examples and data files from GitHub.
Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.