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

# Large image in word file fails to save as pdf in newer versions of Aspose

With version 19.3.0 this file converts correctly to pdf.
With version 22.8.0 and 23.3.0 only the top half of the image is shown and all data that follows that image in the word document is not added to the pdf.

We use
AsposeNative.Words.Document.Save is used to save as pdf with

PdfSaveOptions options = new PdfSaveOptions();


See result:

@Sindre Unfortunately, I cannot reproduce the problem on my side. I have used the following simple code for testing and the output document looks fine:

Document doc = new Document(@"C:\Temp\in.docx");
PdfSaveOptions opt = new PdfSaveOptions();
doc.Save(@"C:\Temp\out.pdf", opt);


out.pdf (1.0 MB)

I see now that the issue only occurs when the document is opened from certain types of streams, in our case

Azure.Storage.LazyLoadingReadOnlyStream<Azure.Storage.Blobs.Models.BlobProperties>


Copying the file to a MemoryStream First and passing Document constructor solves the issue, however version 19.3.0 does correctly handle these streams.

See attached generated pdf
out.pdf (373.3 KB)

@Sindre The problem might occur because LazyLoadingReadOnlyStream does not support random positioning. To read the document from the stream it must support random positioning.

LazyLoadingReadOnlyStream does support seeking. CanSeek of the stream is true, and both setting Position and calling Seek works. See also this workflow adding the functionality in 2020.

@Sindre If possible, could you please create a simple console application that will allow us to reproduce the problem? We will further investigate the issue and provide you more information.

PDFErrorApp.zip (124.7 KB)

@Sindre Thank you for additional information.
We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): WORDSNET-25139


You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.