This is a migrated thread and some comments may be shown as answers.

Image Sizing

12 Answers 1538 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Richard Brown
Top achievements
Rank 2
Richard Brown asked on 24 Sep 2007, 05:26 PM
I have a logo which renders at one size in the web report viewer and a much smaller size when exporting to PDF from the web viewer.  Any suggestions as to how to make them the same or at least close?

12 Answers, 1 is accepted

Sort by
0
Chavdar
Telerik team
answered on 25 Sep 2007, 04:04 PM
Hi Richard,

The PictureBox behavior can be modified by specifying different kinds of Sizing mode: AutoSize, Center, Normal, Stretch and ScaleProportional. You can try the different settings to see whether you can achieve a better result.

It's also possible that the problem is in the resolution of the image. While the Image rendering (PDF, TIFF) respects the image's resolution, the browser shows the image according to its pixels. In this way an image with a greater resolution becomes larger in a browser. To fix this problem you should use images either with the resolution of the screen or set the Sizing mode to Stretch or ScalePropoprtion with a fixed size of the PictureBox item.

Hope this helps.

 
Greetings,
Chavdar
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Richard Brown
Top achievements
Rank 2
answered on 25 Sep 2007, 05:34 PM
That does the job.  Thanks!
0
RK
Top achievements
Rank 1
answered on 27 Aug 2012, 09:20 PM
Tried the suggested solution. Still the stretching is not proportional.
0
Steve
Telerik team
answered on 28 Aug 2012, 02:29 PM
Hello RK,

Where do you observe the problematic behavior - does it occur when viewing a report in a report viewer or in a specific export format (e.g. PDF, RTF etc.). How is the PictureBox item getting the image? As we have not been able to reproduce the problem in our local tests, we would appreciate if you provide us with as much info as possible and possibly with a report that exhibits the issue.

Kind regards,
Steve
the Telerik team

BLOGGERS WANTED! Write a review about Telerik Reporting or the new Report Designer, post it on your blog and get a complimentary license for Telerik Reporting. We’ll even promote your blog and help bring you a few fresh readers. Yes, it’s that simple. And it’s free. Get started today >

0
RK
Top achievements
Rank 1
answered on 28 Aug 2012, 02:57 PM
Hello, please see my answers below:

Where do you observe the problematic behavior - does it occur when viewing a report in a report viewer or in a specific export format (e.g. PDF, RTF etc.).

Yes, this is when I export the report onto PDF. I cannot see the report contents on the screen because this is a large report having about 900 pictures placed in the report.


How is the PictureBox item getting the image?
Here is the sample
 //----------------------------------------------------------------------------------------
                string filePath = Server.MapPath("ImagesParts");
                filePath = Path.Combine(filePath, inf.PartNumber + ".jpg");
                if (false == File.Exists(filePath))
                {
                    filePath = Server.MapPath("ImagesParts");
                    filePath = Path.Combine(filePath, "PhotoUnavailable.jpg");
                }
                if (File.Exists(filePath))
                {
                    data = File.ReadAllBytes(filePath);
                    inf.FileContent = data;
                }
 //----------------------------------------------------------------------------------------

 As we have not been able to reproduce the problem in our local tests, we would appreciate if you provide us with as much info as possible and possibly with a report that exhibits the issue.
0
Steve
Telerik team
answered on 30 Aug 2012, 01:02 PM
Hi RK,

Thanks for the additional info, however we're still not able to observe such behavior locally. Please open a support ticket and attach a small sample report with a single image that exhibits the problem.

Regards,
Steve
the Telerik team

BLOGGERS WANTED! Write a review about Telerik Reporting or the new Report Designer, post it on your blog and get a complimentary license for Telerik Reporting. We’ll even promote your blog and help bring you a few fresh readers. Yes, it’s that simple. And it’s free. Get started today >

0
RK
Top achievements
Rank 1
answered on 30 Aug 2012, 02:22 PM
My support package is no more active. So, I cannot create a support ticket online.
0
Steve
Telerik team
answered on 30 Aug 2012, 02:25 PM
Hello RK,

Create a sample, remove all Telerik assemblies, zip it and attach it to one of the many free file servers and give us a link here. In this line of thoughts, what is the Telerik Reporting version you use?

All the best,
Steve
the Telerik team

BLOGGERS WANTED! Write a review about Telerik Reporting or the new Report Designer, post it on your blog and get a complimentary license for Telerik Reporting. We’ll even promote your blog and help bring you a few fresh readers. Yes, it’s that simple. And it’s free. Get started today >

0
RK
Top achievements
Rank 1
answered on 30 Aug 2012, 03:03 PM
Hi,

Here is the link to download the files

https://oceaneering.sharefile.com/d/s628aa5019a341349

Please let me know if you have any problems to download this.

Check default aspx and default.cs and App_Code/RptTelerik.cs, as the report file

I have also attached the 2 sample original images and the sample pdf report that uses those images.

BTW, the report version is 'Telerik Reporting Q2 2011', version 5.1.

Thanks.

0
Hrisi
Telerik team
answered on 04 Sep 2012, 01:24 PM
Hello RK,

I did not understand what is wrong with PictureBox Sizing modes. You can see a demo movie in the attached file ImageResizingExample.zip. Also see the simplified version of your report in the attached project.

Greetings,
Hrisi
the Telerik team

BLOGGERS WANTED! Write a review about Telerik Reporting or the new Report Designer, post it on your blog and get a complimentary license for Telerik Reporting. We’ll even promote your blog and help bring you a few fresh readers. Yes, it’s that simple. And it’s free. Get started today >

0
RK
Top achievements
Rank 1
answered on 04 Sep 2012, 02:05 PM
Do you have a later version of Telerik report  Component that will address this issue?
0
RK
Top achievements
Rank 1
answered on 05 Sep 2012, 06:08 PM
Also, in the report file, please see that the page is not skipped even after PageBreak property is set to 'Before' for the group header.
Tags
General Discussions
Asked by
Richard Brown
Top achievements
Rank 2
Answers by
Chavdar
Telerik team
Richard Brown
Top achievements
Rank 2
RK
Top achievements
Rank 1
Steve
Telerik team
Hrisi
Telerik team
Share this question
or