var gen = new BarcodeGenerator(EncodeTypes.QR, "12345678/ZZZ999/12345678");
gen.Parameters.Resolution = 300;
gen.Parameters.Barcode.XDimension.Millimeters = 0.2f;
gen.Save(@"C:\test\test.emf", BarCodeImageFormat.Emf);
hi amjad.sahi and alexander.gavriluk
Thanks for answering.
XDimension.Pixels could not make it any smaller,
I was able to make it even smaller by specifying Resolution and XDimension.Millimeters. thank you.
However, there is something I don’t quite understand about this parameter.
The attached files are the emf and svg files created with the settings “Resolution: 300” and “XDimension.Millimeters: 0.2f”.
QR size is
emf is 3.47mm
svg is 14.81mm
And there was a big difference.
Especially for svg, the size of one cell is 0.7056mm,
Since this is “XDimension.Millimeters: 0.2f”,
If “XDimension.Millimeters: 0.1f”, the size of one cell is 0.3527mm,
In other words, 1 point = 0.3527mm, the unit looks like a point.
After hearing your answer, I have more doubts and would like to ask you again,
In the end, aren’t they both “Millimeters”? I thought.
SVG format does not have embedded resolution and we generate them in pixels. But SVG is a vector format and you can scale it to any size.
SVG has embedded resolution 96dpi, but we renders with set resolution because in this way we can generate more precise image for text and some non-square barcodes like MaxiCode or DotCode.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
Enables storage, such as cookies, related to analytics.
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.