Hi to all,
I've done some test to put images on Report and seems that the images are handled at 96 DPI (standard Graphic resolution) also if the report is printed on a 1200 DPI laser color or other device different from the screen.
This means that in some situations the quality of printed images is very poor, also using img.Preferences.Compressor = Infragistics.Documents.Graphics.ImageCompressors.Flate.
Anyone have any idea to bypass this?
Eg: if you have bmp logo of 735x93 pix at 150DPI (4.90x0.62 inches) it on Report, and on paper, is printed 7.66 x 0.97 inches -> at 96 DPI WHY?
Thanks in advance.Davide
Hi to all to replies and sorry for the late in my reply.
Torrey,I think not, because I print directly the report or get a preview via Infragistics.Win.Printing.UltraPrintDocument and UltraPrintPreviewDialog.
About DPI... it's simple try to create an image with any ImageEditor (like .Net Paint for eg.) and create two image from the same one with 96 DPI and other with 150 DPI put them in the report and you will se two images with different size!!!
The class Image don't have a props to set the size and all of my test confirm that the Document engine generate the doc with a 96DPI point of view. This is ok when you work on the graphics result for the screen, but when you want to print to a 1200DPI, or greather device, like a Laser that dont do a great job.
About your code... you dont need the set the converter or the compressor to a new JPEGCompressor, you can use the Infragistics.Documents.Graphics.ImageCompressors.Flate.
In synthesis I can affirm that if you want to put some images on the reports (also the charts drawed by UltraChart) they will be at 96DPI or will be printed bigger that they are on the Report.An issue with a 96DPI problem I also had with UltraChart that it rendered the charts at 96DPI and when I went to print them were was crap.
We wait some news from our test or from Infrangistics guys ... and as soon as I get time I will open an official bug.
I attach an image with the two result,the first with the red image at 96 e the other with the same image at 150DPI.
Thanks to all for your time.Davide.
solarflare,
How are you testing the DPI? When you select and save out the image from the PDF make sure it's in JPG format, and then check the properties of that file. If you're using a high resolution image, then your DPI should be higher than 96 in the summary of those properties.
Davide Dolla,
Are you possibly being affected by page scaling in Adobe Reader when printing?
Thanks Torrey, that really cleans up the artefacting and improves the output. Didn't fix the dpi issue but definitely helps.
I had a scenerio work while testing out some ideas. Try something similar to what I paste below, and let me know if it works for you.
img.Preferences.Converter = Infragistics.Documents.Graphics.ImageConverters.RGB;
img.Preferences.Compressor = acompressor;
The JPEGCompressor constructor takes quality as the input, and I have it set to full quality.
I was looking through the documentation tonight and saw in the Infragistics.Documents.Graphics namespace there is an enumeration for quality. It has high, medium, and low. I'll have to experiment with code tomorrow morning to see if I can figure out how to set quality, or maybe you can figure it out before me?