How to stop blurring of barcode images
Using SSRS 2008 ... I have a custom DLL that has a function that takes a string and returns a raster image(PNG) of a Code 128 barcode. That works fine, no problem. The barcode rendered does *not* use a font, it physically renders rectangles with precise pixel widths to generate the barcode. This is necessary because the laser expects a discrete stop of a "bar" and beginning of a "space". -- Image properties->Size is set to "Original Size" So I look at the report viewer, and I see barcodes. Cool. HOWEVER ... when I zoom in at about 400% I start to see blurring at the edges of the bars. It also prints this way. This is unacceptable. So then, within report viewer, (this is the same report!) I export the report to PDF. No blurring, not at 500%, not at 2000% not at any zoom level. In the PDF, there is a sharp, precise, quantum drop from black to white with *no* blurring whatsoever. On pixel is 0x000000 and the next is 0xFFFFFF. The PDF also prints this way. This is correct behavior. I cannot have the user export the report to PDF before printing it. This is a production shop, and I can't have folks taking twice as long to do a task. MY QUESTION: How do I instruct, how do I force SSRS to simply render the image as I have presented it and not tinker with it? This is a bit annoying. If my function returns a 200x50 image, SSRS may trust that that is what is to be displayed. I do not want it feathered, enhanced, pixelated, blurred, skrunkled, folded, spindled, mutilated, spozzled, or chinked. I do not want spuzzling, bopling, prinkling, dazzling or snubnation. Neither do I want any spabbits, nurplets, or boppling or any of that business. I wish to say to SSRS: "Hey SSRS, when you print this, don't attempt to "improve" the image. Just read the image and stamp it on the report, please." Sorry ... a little frustrated :-)
August 27th, 2010 11:23pm

Hi, Try to increase the image rendering dpi for your barcode images. Follow these sample code at http://msdn.microsoft.com/en-us/library/ms156281.aspx on how to do it, and also read this article http://msdn.microsoft.com/en-us/library/ms155373.aspx about image device information settings. thanks, Jerry
Free Windows Admin Tool Kit Click here and download it now
August 31st, 2010 8:52am

Thanks for the reply. It seems like this is talking about changing the reporting services configuration file. I don't want to be making changes that will impact multiple reports in ways that I can't predict. Really, I just need to tell RS that, for this report, when I supply an image that has a bar of precisely one pixel in width ... I want EXACTLY ONE PIXEL set to the printer. And, further, why does it render correctly in PDF, but not in RS?
August 31st, 2010 5:55pm

Hi, What version of the ReportViewer control are you using in your application? Thanks, Cathy Miller
Free Windows Admin Tool Kit Click here and download it now
September 1st, 2010 9:08pm

Actually I'm not sure of the version of the specific Report Viewer control. Do you know offhand how I can find that? However, I can tell you that we are using Visual Studio 2008 with SQL SSRS 2008 R2.
September 1st, 2010 9:16pm

Are you integrating your own application with Reporting Services or are you working directly with reports in Report Manager? 1. Open a report for viewing on a client machine. 2. Then right click on the report and select “View Source”. Locate the line that looks like this: <script src="http://blogs.msdn.com/TestRSClientPrintReportViewer/Reserved.ReportViewerWebControl.axd?OpType=Resource&amp;Version=X.Y.ZZZZ What is the version?
Free Windows Admin Tool Kit Click here and download it now
September 2nd, 2010 9:09pm

Hello Thomas, I wonder how you were able to convert a string into an image(PNG) and if you could send me back this 'nice' function? By the way, I have the famous barcode issue while rendering the report in PDF: the barcode is badly displayed... So if I could convert this string into an image before rendering the report, perhaps it will work... Note: I'm running SQL Server 2008 R2 64b build 10.50.1600.1, Report Viewer 9.0.30729 under MS Windows 2003 Server 64b. Looking forward, Vince
September 28th, 2010 6:56pm

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

Other recent topics Other recent topics