将二维码作为位图添加到ABCPDF文档:
Doc pdf = new Doc();
pdf.Rendering.AntiAliasImages = false;
...
pdf.AddImageBitmap(bmp, true);渲染到PDF文件时,图像看起来已消除锯齿:

当直接打印到打印机时,同样的二维码也可以:

我的问题是:我做错了什么?
发布于 2019-02-19 21:35:52
你需要根据图像的大小和分辨率来调整Doc.Rect的大小。
// Set PDF image size from image size and resolution (PDF coord space is 72dpi)
doc.Rect.Height = bmp.Height * 72 / bmp.VerticalResolution;
doc.Rect.Width = bmp.Width * 72 / bmp.HorizontalResolution;
doc.AddImageBitmap(bmp, true);( Rendering类属性仅在从PDF导出到图像时才适用。)
https://stackoverflow.com/questions/53778944
复制相似问题