I am working on a project to load files with different formats and display them on a Java component, such as Canvas, JPanel, or JavaFX panes. I can use Aspose.Words to load DOCX, XML, TXT, HTML with Document’s constructor and render them with the Document.renderToScale() or renderToSize() method.
I was trying to do the same for PDF with Aspose.Pdf. After checking the JavaDoc it seems PdfDocument can do this. However, I have two issues:
- I have not found any method that can render a PDF, like what Aspose.Words does. What class can do this?
- The aspose-pdf-jdk16.jar does not have the com.aspose.pdf.engine package. So PdfDocument class dose not exist and I could not even test if any PDF file can be loaded with PdfDocument class.