import com.aspose.pdf.License; import com.aspose.pdf.Document; import com.aspose.pdf.EpubLoadOptions; import com.aspose.pdf.MarginInfo; public class AsposeTest { public static void main(String[] args) throws Exception {//Main function to Convert EPUB to a PDF file // Instantiate the license License license = new License(); license.setLicense("Aspose.Total.lic"); // Instantiate EpubLoadOptions object EpubLoadOptions epubLoadOptions = new EpubLoadOptions(); // Create and set margin info MarginInfo margin = new MarginInfo(); margin.setTop(200); epubLoadOptions.setMargin(margin); // Load the input EPUB file Document document = new Document("template.epub", epubLoadOptions); // Save the loaded document as a PDF file document.save("output.pdf"); System.out.println("Done"); } }