why image not clear in PDF, while it's clear in excel

Not Answered This post has 0 verified answers | 5 Replies | 2 Followers Thread's RSS feed.

wangbenson
Points 125
Replied On: Mon, Mar 26 2012 11:07 PM Reply

after i use "Infragistics.Documents.Reports.Graphics.Image" to add one image to PDF report, the image is not clear enough, but it's clear in excel.2816.details.zip

  • Post Points: 5

All Replies

wangbenson
Points 125
Replied On: Mon, Mar 26 2012 11:10 PM Reply

maybe this is the causes:

1. image size in excel is        H:  3.91"         W: 7.81"

2. Image size in PDF is          H: 5.2"            W: 10.45"

why the original size changed???

  • Post Points: 5
wangbenson
Points 125
Replied On: Mon, Mar 26 2012 11:20 PM Reply

image width in pix is 750, height is 375

  • Post Points: 20
Mike Saltzman
Points 434,980
Infragistics Employee
Replied On: Tue, Mar 27 2012 9:57 AM Reply

I don't know why the size of the image is changing. That probably has to do with where you placing it in the document.You determine the size of the image when you export it.

As for the image quality, you may be losing quality because, by default, the documents engine uses a JPEG compressor, which compresses the image and may lose a little quality. If you want to use a lossless compressor, then you can switch to the Flate compressor.

Infragistics.Documents.Reports.Graphics.Image image = section.AddImage(myImage);

image.Preferences.Compressor = Infragistics.Documents.Reports.Graphics.ImageCompressors.Flate;

 

 

Mike Saltzman

Manager - Windows Forms Development

Infragistics, Inc.

  • Post Points: 20
wangbenson
Points 125
Replied On: Tue, Mar 27 2012 9:41 PM Reply

I have set the Compressor as Flate, it 's not clear though.

Found this: image DPI changed from 96 to 72

I need redraw the image with classes under the namespace "Infragistics.Documents.Reports.Graphics" ?

  • Post Points: 20
Mike Saltzman
Points 434,980
Infragistics Employee
Replied On: Wed, Mar 28 2012 9:55 AM Reply

wangbenson:
Found this: image DPI changed from 96 to 72

I'm not sure what you mean by that. How can you determine the DPI of the image in the document?

I suppose it's possible that something in the documents engine or in the PDF reader is changing the DPI of the image, but I am not aware of any reason why that should happen.

Mike Saltzman

Manager - Windows Forms Development

Infragistics, Inc.

  • Post Points: 5
Page 1 of 1 (6 items) | RSS