Hi @vsevolod.orefin
We are currently encountering an issue with GroupDocs Viewer (version 24.12) when attempting to retrieve dimensions from an EML file. Upon execution, we receive the following error message:
com.groupdocs.viewer.internal.c.a.w.cR: The document appears to be corrupted and cannot be loaded.
We are using the following code snippet to extract the dimensions:
try (Viewer viewer = new Viewer(inputFilePath)) {
ViewInfoOptions viewInfoOptions = ViewInfoOptions.forPdfView();
ViewInfo viewInfo = viewer.getViewInfo(viewInfoOptions);convetOptions.setPageWidth(viewInfo.getPages().get(0).getWidth()); if (FilenameUtils.getExtension(inputFilePath).equals("eml")) { convetOptions.setPageHeight((int) (viewInfo.getPages().get(0).getHeight() * (viewInfo.getPages().size() * 0.6))); } else { convetOptions.setPageHeight(viewInfo.getPages().get(0).getHeight() * viewInfo.getPages().size()); } }
The EML file can be accessed here: EML File – Google Drive
Could you please advise if we are missing anything or suggest a solution to resolve this error?
Thank You!
Vaibhav
This Topic is created by evgen.efimov using Email to Topic tool.