Accurate printing of PDF documents containing barcode.

Q: I want to print a document containing a barcode with adequate
The document is printed using the GDI+ interface very well. I add a
barcode image to the document and it is created correct but when I
print this document (using PDFDraw and GDI+ rasterizer) the barcode
looks like it is changed a little bit on the print (Barcode Reader
can't read it). When I print the whole page as bitmap the print is
correct (Barcode Reader can read it) but we can't do that because of
the huge size which is send to the printer.

Calling SetImageSmoothing(false) on GDI+ PDF rasterizer is equivalent
to calling 'Gdiplus::InterpolationModeNearestNeighbor' in

Unfortunately we don't have control over how Windows GDI+ renders the
bitmap. The problem most likely occurs because the barcode bitmap in
scaled (and offset) by a floating point amount so that boundaries of
the barcode are not exactly aligned with the raster grid of the

The anti-aliasing mode is simulating the barcode offset with a fuzzy
boundary and will produce better machine-recognition results than if
turned off.

Another approach would be to print at higher resolution (if this is
possible and supported by the printer). In this case the error
introduced by NearestNeighbor interpolation will be minimized.