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

Howto set Pixels per inch/cm

9 Answers 1179 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
joeldickson
Top achievements
Rank 1
joeldickson asked on 10 Oct 2009, 02:24 PM

I'm wokring on an application for a client that wants some high res print media PDFs generated. I am trying to use telerik reports for this.

I have all my elements added to the report using cm so the elements will all fit correctly on the page. However when adding the images i have into picture boxes, I have them exported based on 300 dpi, and telerik reports seems to default to 96 dpi, so they do not fit in the designer. If i reduce them to 96 dpi the do fit but come of rat shit on the PDF and when printed (and yes i have read this article http://blogs.telerik.com/blogs/posts/09-01-07/the_strange_case_of_adobe_acrobat_or_why_do_images_in_telerik_reports_get_fuzzy_when_exported_to_pdf.aspx).

Can someone please tell me how to specific the pixels per inch/cm for telerik reports?

Thanks,

Joel

9 Answers, 1 is accepted

Sort by
0
Grant Henderson
Top achievements
Rank 1
answered on 24 Oct 2009, 01:30 AM
Hi Joel,

We're experiencing the same problem.  Did you ever resolve it?

If we set a Report Background Image it MUST be 96 dpi.  Anything with a higher resolution doesn't scale.  It's as though the PDF rendering process decides that the background image must be 96 dpi.  96 dpi is extremely poor quality for print media.  We need at least 300 dpi or 600 dpi.

Having said this, other images seem to scale and keep their resolutions.  The problem appears to be just the Background Image.  Also, the background image lacks a Sizing property (AutoSize, Center, Normal, Stretch, ScaleProportional) which other Image objects appear to have.

Can anyone at Telerik confirm that the Background Image resolution is incorrect when rendered to PDF ?  Are there plans to include a BackgroundSizing property?

Regards,  Grant.

0
Massimiliano Bassili
Top achievements
Rank 1
answered on 26 Oct 2009, 04:16 PM
As far as I know there is no limitation on the images resolution, except when the report is rendered in html as browsers tend to use 72 or 96 dpi by default.
I've worked with Crystal and SSRS and have not seen sizing option for background images anywhere, but since you sound pretty flamed up about this I guess there is, so I am a bit curious which reporting product has it and most importantly - how it behaves, especially now that you've mentioned scaling according to report size.

Cheers
0
Grant Henderson
Top achievements
Rank 1
answered on 04 Nov 2009, 11:46 PM
I've attached two sample PNG's - a 96 dpi background and a 300 dpi background.

The 96 dpi background is 794x1123 on A4 and renders correctly.

The 300 dpi background is 2480x3508 on A4 but renders at 96 dpi.

The problem is that 96 dpi simply isn't suitable for production quality print jobs.

If those same two images are placed as foreground image objects they scale correctly.  However, that doesn't suit our needs as these images need to underlay the report sections.  We did the same thing in Crystal but Crystal has the ability to overlay report sections while Telerik does not.  In Crystal we included the image in the Page Header and then overlayed the report sections getting the desired results.  Of course, Telerik has an image background (which is even better), it just doesn't work properly!

I'll escalate this to support.

Regards,  Grant.



0
Adriano
Top achievements
Rank 1
answered on 12 Jan 2010, 02:21 AM
Useful links

http://www.telerik.com/help/reporting/device-information-settings.html

http://www.telerik.com/help/reporting/programmatic-exporting-report.html

http://en.wikipedia.org/wiki/Dots_per_inch

Code:



        ReportTest report = new ReportTest();
        report.DataSource = data;

        ReportViewer1.Report = report;

        // Dots per inch
        Hashtable settings = new Hashtable();
        format["OutputFormat"] = "GIF";
        format["DpiX"] = "300";
        format["DpiY"] = "300";
        ReportProcessor reportProcessor = new ReportProcessor();
        RenderingResult result = reportProcessor.RenderReport("IMAGE", report, settings);



Kind regards,

Adrian
0
Grant Henderson
Top achievements
Rank 1
answered on 13 Jan 2010, 11:58 PM
We logged a ticket with Telerik back in November and they confirmed that the inability to change resolution of the background image is a bug.  As of this date it is not fixed but Support indicated that it may be resolved with the next release.  We can only hope!

So the current state is that you can only use 96dpi as the background image.

You can certainly change resolution of the report as Adriano has suggested but that doesn't fix this problem.  That'll simply scale the 96dpi background image up to 300dpi which looks fuzzy.  As with all image manipulation, scaling down is okay but scaling up is evil.  All other images have a resolution property that seems to work correctly.

Regards,  Grant.

0
Christopher
Top achievements
Rank 1
answered on 21 Apr 2011, 09:57 PM
Has there been any update on this issue?
0
Massimiliano Bassili
Top achievements
Rank 1
answered on 22 Apr 2011, 01:01 PM
This works correctly on my end with Q1 2011. The resolution is respected as long as the image you're using has the correct resolution specified.
0
Christopher
Top achievements
Rank 1
answered on 22 Apr 2011, 03:53 PM
After trying a few different file types I find that dpi in GIF and PNG are not respected, but JPG dpi is respected.  However, this is only on PDF render or print, NOT in the HTML renderer.
0
Massimiliano Bassili
Top achievements
Rank 1
answered on 27 Apr 2011, 03:33 PM
Not surprising, browsers use 72 or 96 dpi and this cannot be changed.
Tags
General Discussions
Asked by
joeldickson
Top achievements
Rank 1
Answers by
Grant Henderson
Top achievements
Rank 1
Massimiliano Bassili
Top achievements
Rank 1
Adriano
Top achievements
Rank 1
Christopher
Top achievements
Rank 1
Share this question
or