Hello,
Converting the attached MSG file to PDF, creates a document with as size of 10.42 x 14.74 inch, according to Adobe Reader.
image.png (66.0 KB)
With the specified 750 x 1061 pixels at the default 96 dpi, that should be 7.81 x 11.05 inch.
Changing the DPI value does not make any difference.
It seems to use 72 dpi internally, although 96 should be the default.
We were using that sample code for conversion:
using (var conv = new Converter(documentPath))
{
var options = new PdfConvertOptions()
{
//Dpi = 96
PageWidth = 750,
PageHeight = 1061,
MarginLeft = 15,
MarginRight = 15,
MarginBottom = 15,
MarginTop = 15
};
conv.Convert("Conversion.pdf", options);
}
We’re using GroupDocs.Conversion from GroupDocs.Total.NETFramework package 25.6.
Can you please check that issue?
Here is some sample MSG, but the problem seems to happen with any email:
Webinar Introduction to Therefore.zip (36.7 KB)
@Clemens_Pestuka
It seems that you are experiencing issues with the DPI setting being ignored when converting MSG files to PDF using the GroupDocs.Conversion library in .NET. The output PDF is larger than expected, and changing the DPI value does not seem to affect the conversion.
To address this issue, you can try the following steps:
-
Ensure Proper DPI Setting: Make sure that you are correctly setting the DPI in the PdfConvertOptions
. The DPI property should be set explicitly in your options. For example:
var options = new PdfConvertOptions()
{
Dpi = 96, // Set the desired DPI
PageWidth = 750,
PageHeight = 1061,
MarginLeft = 15,
MarginRight = 15,
MarginBottom = 15,
MarginTop = 15
};
-
Check for Updates: Since you are using version 25.6 of the GroupDocs.Total.NETFramework package, consider checking if there are any updates or newer versions available. Sometimes, issues like these are resolved in later releases.
-
Review Documentation: The GroupDocs documentation provides detailed information on how to customize the conversion options, including DPI settings. You can refer to the section on converting to PDF with advanced options for more insights on how to properly configure your conversion settings here.
-
Testing with Different DPI Values: If the DPI setting is still being ignored, try testing with different DPI values to see if there is any change in the output size. Sometimes, specific values may yield unexpected results.
-
Contact Support: If the issue persists after trying the above steps, consider reaching out to GroupDocs support for further assistance. They may have more insights or solutions specific to your version and use case.
By following these steps, you should be able to troubleshoot the DPI issue during the MSG to PDF conversion process. If you have any further questions or need additional assistance, feel free to ask!
Sources:
[1]: Convert MSG to PDF | GroupDocs.Conversion .NET API
[2]: Convert to PDF with advanced options | Documentation