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

Free Support Forum - aspose.com

Inconsistent Number of Pages

My application runs on a number of servers generating Word documents and storing them to a shared network folder.

Part of the generation process renders each page of the document to a jpeg file. The file being generated should have 3 pages, on server 1, there are 3 jpg files, but server 2 creates 4 jpg files.

I have confirmed the same version of the aspose.words.dll file is on both servers (2016.11.01). I have confirmed both servers have the same version of my code as well.

The servers have the same version of Windows (2012 R2).

Is there anything else I should be comparing to explain the differences in output?

Here is my vb.net code that creates the Jpegs:

Private Sub CreateJPGs(ByVal WordDocument As Document, ByVal FileName As String)

Dim saveoptions As New ImageSaveOptions(SaveFormat.Jpeg)

Dim jpegFilename As String

saveoptions.Resolution = 90

saveoptions.JpegQuality = 100

For page As Integer = 0 To WordDocument.PageCount - 1

saveoptions.PageIndex = page

jpegFilename = FileName + “_p” + (page + 1).ToString() + “.jpg”

WordDocument.Save(jpegFilename, saveoptions)



End Sub

Hi there,

Thanks for your inquiry. Please note that Aspose.Words requires TrueType fonts when rendering documents to fixed-page formats (JPEG, PNG, PDF or XPS). You need to install fonts on the machine where you're converting documents to Jpg. Please refer to the following articles:

How Aspose.Words Uses True Type Fonts

If you still face problem, please attach your input Word document here for testing. We will investigate the issue on our side and provide you more information.

Thank you for your response. There was a font missing on some of the servers!

Hi there,

Thanks for your feedback. Please feel free to ask if you have any question about Aspose.Words, we will be happy to help you.