Patch (to be ported)
Project:
UPC Barcode Field
Version:
6.x-1.0-beta1
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
6 Dec 2009 at 05:28 UTC
Updated:
6 Dec 2009 at 05:28 UTC
The width of the barcode is hardcoded in the img tag. This means the browser scales the image and this can make the lines fuzzy and less reliable to scan (if printing from the browser).
This patch is trivial, but it does remove the width from the image tag.
The javascript is bombing on me so here it is linline:
index 116f6aa..68ec0ec 100644
--- a/sites/all/modules/upcfield/upcfield.module
+++ b/sites/all/modules/upcfield/upcfield.module
@@ -377,7 +377,7 @@ function theme_upcfield_formatter_default($element) {
* @ingroup themeable
*/
function theme_upcfield_formatter_image($element) {
- return '<img alt="Barcode '. $element['#item']['safe']['value'] .'" src="/'. file_directory_path() .'/'. $element['#item']['safe']['image_path'] .'/'. $element['#item']['safe']['value'] .'.png" style="width: 4.0cm" />';
+ return '<img alt="Barcode '. $element['#item']['safe']['value'] .'" src="/'. file_directory_path() .'/'. $element['#item']['safe']['image_path'] .'/'. $element['#item']['safe']['value'] .'.png" style="" />';
}
| Comment | File | Size | Author |
|---|