sylvainboisse@hotmail.com
November 28th, 2008, 03:17 PM
Hello
I am trying to change the DPI resolution of the metafile produced when rendering a LocalReport using LocalReport.Render("Image");
with the following DeviceInfo
// Build Device Info string.
string deviceInfo = string.Format(
"<DeviceInfo>\r\n" +
" <OutputFormat>EMF</OutputFormat>\r\n" +
" <PageWidth>{0}in</PageWidth>\r\n" +
" <PageHeight>{1}in</PageHeight>\r\n" +
" <MarginLeft>{2}in</MarginLeft>\r\n" +
" <MarginRight>{3}in</MarginRight>\r\n" +
" <MarginTop>{4}in</MarginTop>\r\n" +
" <MarginBottom>{5}in</MarginBottom>\r\n" +
" <DpiX>{6}</DpiX>\r\n" +
" <DpiY>{7}</DpiY>\r\n" +
"</DeviceInfo>",
(float) mPageSettings.Bounds.Width / 100,
(float) mPageSettings.Bounds.Height / 100,
(float) mPageSettings.Margins.Left / 100,
(float) mPageSettings.Margins.Right / 100,
(float) mPageSettings.Margins.Top / 100,
(float) mPageSettings.Margins.Bottom / 100,
mPageSettings.PrinterResolution.X,
mPageSettings.PrinterResolution.Y);
When executing this, DpiX and DpiY get set to 600. However the rendered metafile remains to 72 Dpi. Is there a way to make it render using other dpi settings as rendering in 72 dpi seems to make every line of the document to appear bolder than it should. the minimum line width that can be set in an RDLC report is 1pt. When printing, the lines are far from being as thin as the printer can as they do appear to be 1/72 of an inch thick.
Thanks
I am trying to change the DPI resolution of the metafile produced when rendering a LocalReport using LocalReport.Render("Image");
with the following DeviceInfo
// Build Device Info string.
string deviceInfo = string.Format(
"<DeviceInfo>\r\n" +
" <OutputFormat>EMF</OutputFormat>\r\n" +
" <PageWidth>{0}in</PageWidth>\r\n" +
" <PageHeight>{1}in</PageHeight>\r\n" +
" <MarginLeft>{2}in</MarginLeft>\r\n" +
" <MarginRight>{3}in</MarginRight>\r\n" +
" <MarginTop>{4}in</MarginTop>\r\n" +
" <MarginBottom>{5}in</MarginBottom>\r\n" +
" <DpiX>{6}</DpiX>\r\n" +
" <DpiY>{7}</DpiY>\r\n" +
"</DeviceInfo>",
(float) mPageSettings.Bounds.Width / 100,
(float) mPageSettings.Bounds.Height / 100,
(float) mPageSettings.Margins.Left / 100,
(float) mPageSettings.Margins.Right / 100,
(float) mPageSettings.Margins.Top / 100,
(float) mPageSettings.Margins.Bottom / 100,
mPageSettings.PrinterResolution.X,
mPageSettings.PrinterResolution.Y);
When executing this, DpiX and DpiY get set to 600. However the rendered metafile remains to 72 Dpi. Is there a way to make it render using other dpi settings as rendering in 72 dpi seems to make every line of the document to appear bolder than it should. the minimum line width that can be set in an RDLC report is 1pt. When printing, the lines are far from being as thin as the printer can as they do appear to be 1/72 of an inch thick.
Thanks