We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

This code works on my computer, but nothing happens on the server

public static void main(String[] args) throws Exception {
        String inputFileName = Paths.get("").toString();
        final Document document = new Document(inputFileName);
        final com.aspose.words.ImageSaveOptions options = new com.aspose.words.ImageSaveOptions(
        log.info("document size:"+document.getPageCount());
        for (int i = 0; i < document.getPageCount(); i++) {
            options.setPageSet(new PageSet(i));
            final Instant now = Instant.now();

ppt, pdf, excel to pictures all work very well, but the words are not good, I am very abnormal, the code seems to be no problem, and it runs normally on my computer, but it just doesn’t work on the server. Doument (“srcPath”) is stuck here, I don’t know why.


Please try the latest version of Aspose.Words for Java 21.6. Hope this helps you.

Please note that Aspose.Words requires TrueType fonts when rendering document to fixed-page formats (JPEG, PNG, JPEG or PDF). You need to install fonts that are used in your document on the machine where you are converting documents to PDF. Please refer to the following articles:
Using TrueType Fonts
Manipulating and Substitution TrueType Fonts

If you still face problem, please share your working environment detail e.g. operating system, Java version etc. where you are facing this issue. We will investigation the issue and provide you more information on it.

It’s weird, just change the version. I used 21.5 words before. I don’t know why, but it feels like it was not read when the file stream was read.


Please share the requested detail for testing.