Email conversion to A4-PDF centers content on the page in .NET

Converting any email (.msg/.eml) to PDF with “A4” size, (vertically) centers the content on the page.
Email to PDF centered.zip (81.1 KB)

The following code was used for conversion:

            using (var conv = new Converter(documentPath))
            {
                var options = new PdfConvertOptions()
                {
                    PageWidth = 750, // A4 width for portrait mode
                    PageHeight = 1061, // A4 height for portrait mode
                    MarginLeft = 15,
                    MarginRight = 15,
                    MarginBottom = 15,
                    MarginTop = 15
                };
                conv.Convert(Path.GetFileNameWithoutExtension(documentPath) + ".pdf", options);
            }

To my surprise, when using GroupDocs.Total 24.9.1 package, the bug was fixed.
In my opinion, it should not matter if I use GroupDocs.Conversion 24.9 (or 24.10) or the total package.
The code was not changed, so it was using the same “GroupDocs.Converter” class and underlying Aspose.DLLs.
The real difference I could see between the outputs, was PDF version 1.7 for Total and PDF version 1.5 for Conversion.

@Clemens_Pestuka
This issue is reproduced at our end. Therefore, 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): CONVERSIONNET-7280

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.

1 Like