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

Free Support Forum - aspose.com

Contents are lost after MHTML to PDF conversion using Java

Hello!

I convert MHTML to PDF this way:

LoadOptions loadOptions = new LoadOptions();
loadOptions.setLoadFormat(LoadFormat.MHTML);
Document document = new Document(new ByteArrayInputStream(this.sourceContent), loadOptions);
document.save("output.pdf", SaveFormat.PDF);

As you can see in the output.pdf, there is a lot of content missing. What is going wrong here?
Attached are input.mhtml and output.pdf: mhtmlToPdf.zip (65.3 KB)

Kind regards!

@dvtdaten

We have tested the scenario and have managed to reproduce the same issue at our side. For the sake of correction, we have logged this problem in our issue tracking system as WORDSNET-21365. You will be notified via this forum thread once this issue is resolved.

We apologize for your inconvenience.

Hello!

Are there any news on this case?
I detected the same problem with a html file which contains similar content, so the problem obviously also occurs during HTML to PDF conversion: html2pdf.zip (21.5 KB)

@dvtdaten

Currently, your issue is under development phase. We will inform you via this forum thread once there is any update available on it.

We have tested the scenario and have managed to reproduce the same issue at our side. For the sake of correction, we have logged this problem in our issue tracking system as WORDSNET-22118. You will be notified via this forum thread once this issue is resolved.

We apologize for your inconvenience.

Hello!

I can see WORDSNET-21365 has been closed. Are there news on this case?

@dvtdaten

Yes, the fix of WORDSNET-21365 will be available in the next version of Aspose.Words i.e. 21.8. You will be notified via this forum thread once new version of Aspose.Words is released.

The issues you have found earlier (filed as WORDSNET-21365) have been fixed in this Aspose.Words for .NET 21.8 update and this Aspose.Words for Java 21.8 update.