SSRS PDF DeviceInfo DPI settings - for high resolution images

 have attempted to create a SSRS report that is exported using c#. I've set the device info DpiX and DpiY settings and attempted to render my report but it seems these settings have no effect.

The images in my report are JPEG and my settings look like so:

                string deviceInfo = null;
                var sb = new System.Text.StringBuilder(1024);
                var xr = System.Xml.XmlWriter.Create(sb);
                xr.WriteStartElement("DeviceInfo");
                xr.WriteElementString("DpiX", "620");
                xr.WriteElementString("DpiY", "620");
                xr.Close();

                deviceInfo = sb.ToString();

                results = rs.Render(format, deviceInfo, out extension, out encoding, out mimeType, out warnings,
                    out streamIDs);

The report runs fine and outputs as PDF. The size of the report and resolution of the images inside it stay the same regardless of the deviceInfo settings.

Any help would be greatly appreciated!!!

February 5th, 2015 3:02am

Hi CliveOld,

According to your description, you are exporting SSRS report with C# code, you set DpiX and DpiY in the code and attempt to export it to pdf, resolution of the images inside report stay the same regardless of the deviceInfo settings.

The DeviceInfo XML structure defines the device information settings that are used by a rendering extension. To modify default device information settings that are used by a rendering extension that is already deployed on report server, we must type the DeviceInfo XML structure into the RSReportServer.Config files. Please refer to the following example of the XML structure and syntax that modifies the default settings of the Image rendering extension:

<Render>
    <Extension Name="IMAGE (EMF)" Type="Microsoft.ReportingServices.Rendering.ImageRenderer.ImageRenderer,Microsoft.ReportingServices.ImageRendering">
        <OverrideNames>
            <Name Language="en-US">Image (EMF)</Name>
        </OverrideNames>
        <Configuration>
            <DeviceInfo>
                <ColorDepth>32</ColorDepth>
                <DpiX>300</DpiX>
                <DpiY>300</DpiY>
                <OutputFormat>EMF</OutputFormat>
            </DeviceInfo>
        </Configuration>
    </Extension>
</Render>

Here are relevant threads you can reference:
https://social.msdn.microsoft.com/Forums/sqlserver/en-US/0d9d2b53-117c-4cec-9e51-3b678720a75e/ssrs-2008-dpi-confusion
http://stackoverflow.com/questions/3578087/has-anyone-figured-out-a-way-to-render-a-reporting-services-report-at-a-resoluti

For more information about Customize Rendering Extension Parameters in RSReportServer.Config, please refer to the following document:
https://msdn.microsoft.com/en-us/library/ms156281.aspx

If you have any more questions, please feel free to ask.

Thanks,
Wendy Fu

If you have any feedback on our support, please click here.
February 7th, 2015 7:15am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics