Saving to PDF results in large file


we convert MSG to PDF via MHTML. If I convert the msg in attached zip-file a get a >50MB Output. The MHTML has about 5MB.

Why does the PDF-file has such a size?

File: (4.9 MB)


    MhtSaveOptions mhtmlSaveOptions = SaveOptions.getDefaultMhtml();
    mhtmlSaveOptions.setMhtFormatOptions(0);, mhtmlSaveOptions);

    bais = new ByteArrayInputStream(baos.toByteArray());

    Document doc = new Document(bais, getDocLoadOptions());

    Iterator<Section> sectionIt = doc.getSections().iterator();
    while (sectionIt.hasNext()) {
	Section sec =;
	PageSetup pageSetup = sec.getPageSetup();

    PdfSaveOptions options = new PdfSaveOptions();
    options.setOptimizeOutput(true);, options);
    return baos2.toByteArray();

Thanks in advance,


If I do not use PDF-Compliance A-1-A it is about 3 MB. Why is the PDF file with compliance A-1-A that large?

We need PDFs for long term preservation.


Thanks for your inquiry. We tested the scenario and have managed to reproduce the same problem on our end. For the sake of correction, we have logged this problem in our issue tracking system. The ID of this issue is WORDSNET-16968. We will further look into the details of this problem and will keep you updated on the status of correction. We apologize for your inconvenience.

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