Thanks for sharing the sample file. I have tested the scenario and have managed to replicate the same problem that HTML to PDF conversion process takes around 14 seconds. For the sake of correction, I have logged it as PDFJAVA-37112 in our issue tracking system. We will further look into the details of this problem and will keep you updated on the status of correction. Please be patient and spare us little time. We are sorry for this inconvenience.
One of the reasons is that fonts used inside PDF file are not available on Linux machine, whereas they exist over Windows machine. In order to generate correct output, please install required fonts over Linux and then test the scenario.
Furthermore, when creating PDF files from scratch or manipulating existing PDF files on Non-Windows platform, you need to have fonts installed on your system and you need to specify the path where fonts used inside PDF file are installed. You can use following methods to get system folder of fonts or set font path to font folders. Furthermore, the code snippet which you have shared earlier is based on legacy aspose.pdf package and we recommend using new Document Object Model of com.aspose.pdf package.
The following details are based on new DOM approach.
Document.getLocalFontPath () - shows the system folder in which project will look for fonts.
Document.setLocalFontPath (String) - Setting font path to custom folder
// Set font folder path String path = “/usr/share/fonts/truetype/msttcorefonts/”;
// Adding a single font directory //
// setting the user list for standard font directories
java.util.List list = com.aspose.pdf.Document.getLocalFontPaths();