Free Support Forum - groupdocs.com

Problem printing jpeg file


#1

Hello, we detected a problem when printing the attached jpeg file.
As you can see from the screenshot, the preview of the browser print is zoomed and so is also in the actual print.
Can you verify?

Thank you
1.jpeg (461.2 KB)
Screenshot_preview.png (87.1 KB)


#2

We also noticed that the same problem of printing with eml/msg files.

Thanks


#3

@gian_boscolo_hotmail_it,

Would you please share with us the platform (.NET or Java) and version of GroupDocs.Viewer you are using? Furthermore, please also share the problematic eml/msg files for which you are getting the printing issue.


#4

We are using .NET and we are using 17.12 version of Groupdocs.Viewer.
The problem with eml files is reproducible with every eml file, however I attach one example.
527438.zip (5.5 KB)

Thank you


#5

@gian_boscolo_hotmail_it,

Thanks for providing the required files. We are able to observe your reported behavior when rendering the files as HTML. However, for getting the HTML output that is optimized for printing, the API provides GetPrintableHtml methods. These methods generate the HTML content that is suitable for printing. We recommend you to use GetPrintableHtml methods to resolve the issue.

ViewerHtmlHandler htmlHandler = new ViewerHtmlHandler(config);
// Get printable HTML                  
PrintableHtmlContainer printableHtml = htmlHandler.GetPrintableHtml("sample.eml"); 
// Save as HTML file
File.WriteAllText("Printable.html", printableHtml.HtmlContent, Encoding.UTF8);

#6

Hi Usman,
we don’t use html mode to render eml and jpeg files.
Also, we don’t call an action on server side to print but we call the function printDocument() of viewer.js, so we don’t have any control of the file that the user want to print, because it’s already viewed… it appears that only a portion of the file is sent to print.
Can you be more precise about the change we should make?

Thank you


#7

@gian_boscolo_hotmail_it,

Thanks for providing some more details. Would you please confirm if you are using any of our open source document viewer applications hosted on GitHub? If yes, please mention its name.


#8

Hi, we use Groupdocs.Viewer-for-.NET-MVC that came out in conjunction with version 17.12.

Thank you


#9

@gian_boscolo_hotmail_it,

We are able to reproduce the issue for the JPEG files using the latest version of GroupDocs.Viewer-for-.NET-MVC. However, the issue doesn’t appear for the eml files (see this). We would recommend you to use the latest version of the application to avoid the issue for the eml files.

Furthermore, we have logged the issue for the JPEG files in our GitHub issues as https://github.com/groupdocs-viewer/GroupDocs.Viewer-for-.NET-MVC/issues/39 for further investigation. We shall keep sharing with you the updates.


#10

@gian_boscolo_hotmail_it,

The issue you have faced earlier, logged as https://github.com/groupdocs-viewer/GroupDocs.Viewer-for-.NET-MVC/issues/39, has been fixed. Please download the latest release of the application or clean and rebuild your solution to load updated front-end resources.