jbdemonte / barcode Goto Github PK
View Code? Open in Web Editor NEWLibraries to create barcode in few languages (js:jQuery...)
Libraries to create barcode in few languages (js:jQuery...)
Can you make this support call in vue2.0? Can you support generating jpg images?(您能把这个在vue2.0中支持调用吗?能支持生成jpg的图片?)
Hi! In my app i need to draw UPC barcode, and the problem is, that it computes checksum even if it's already appended to the end.
For example, this is a correct barcode 210000001147 and when i'm passing it to drawing function, i'm getting this 100000011162. Seems like it is removing first digit and calculating checksum again.
Any help will be really appreciated.
The library doesn't work because the FPDF author made private some variables and functions.
The private items accessed by barcode library are :
line 205 : $pdf->h;
line 206 : $pdf->k;
line 212 : $pdf->_out();
I generate bar code from ID of a items, the items have max lenght of 4 chars, but I fill the other spaces using 0 but when the bar code is generate show another number diferent to the ID. I try in the generator online and the issue is the same. Try using 0000000001998 in the online generator and show 0000000001991.
PD. My english skills are too bad.
Hello,
I am trying to output barcode in pdf using fpdf. I went through your sample-fpdf.php. In my case user will enter number of barcode to be generated. Based on the number same barcode will be generated x no. of time. I tried to modify the code by adding these two line multiple time with value of $y different
$data = Barcode::fpdf($pdf, $black, $x, $y, $angle, $type, array('code'=>$code), $width, $height);
$pdf->TextWithRotation($x + $xt, $y + $yt, $data['hri'], $angle);
My question is how will i determine that page is filled and i have to add new page and continue with barcode printing
Hi!
Sry for my bad english.
I HAD an issue with tiny size bar (used PHP liblary):
Barcode::gd($image, $black, $col+150, $p*$k+120, 0, "code128", $bankAccount, 1.5, 10)
bars for width between 1 and 3 was a problem.
How do I fix that?
// GD barcode renderer
private static function digitToGDRenderer($gd, $color, $xi, $yi, $angle, $mw, $mh, $digit){
$fn = function($points) use ($gd, $color) {
$points[2]--; //////////////////////////////////////////// Added that (second X)
$points[4]--; //////////////////////////////////////////// Added that (third X)
//print_r($points);
//exit();
imagefilledpolygon($gd, $points, 4, $color);
};
return self::digitToRenderer($fn, $xi, $yi, $angle, $mw, $mh, $digit);
}
After that its fine!
Tested with: Honeywell Voyager 1250g
Hi,
during the generation of datamatrix code in FPDF istance the execution trig an notice error of undefined offset.
The datamatrix generated seems doesn't have any problem under read with an 2Dbarcode scanner.
I attach the code above
require_once('fpdf17/efpdf.php'); //FPDF with TextWithRotation method
require_once('php-barcode.php'); // The class :-)
$type = 'datamatrix';
$black = '000000';
$height = null;
$width = 0.7;
$angle = 0;
$pdf = new eFPDF();
$pdf->AddPage();
$x_barcode = 123;
$y_barcode = 49;
$barcode_string = "LYDAGAAVVISLTP0141002000158";
$codice = array('code'=>$barcode_string,'rect' => true);
$datamatrix = Barcode::fpdf($pdf, $black, $x_barcode , $y_barcode, $angle, $type, $codice , $width, $height);
$pdf->SetFont('Arial','',3);
$pdf->TextWithRotation($datamatrix['p4']['x'] + 1, $datamatrix['p4']['y'] + 2, $datamatrix['hri'], 0,0);
$pdf->Output("test.pdf");
Thanks for your attention
Gabri
Hi,
I am using the following version:
BarCode Coder Library (BCC Library)
Porting : jQuery barcode plugin
Version : 2.0.3
Date : 2013-01-06
Found incorrect function call in getDigit function for "msi" barcode type,
getDigit: function(code, crc){
var table = "0123456789";
var index = 0;
var result = "";
//code = this.compute(code, false); // old code
code = this.compute(code, crc); // suggest the fix
...
},
Best Regards,
Joseph Ou
The barcode is genetated, but when I'm gonna read the barcode an error message is displayed
! 49c37381-2649-4105-bad4-5e21d8741515
Hi, how can I auto detect scanner and acquire the data to input box, then submit to server
In the transition from 98 to 99 errors occur. There is no indication where is that you may only use 98 characters.
Test setup:
$IMAGE_RESOURCE = imagecreatetruecolor( 600, 600 );
$black = imagecolorallocate( $IMAGE_RESOURCE, 0x00, 0x00, 0x00 );
$white = imagecolorallocate( $IMAGE_RESOURCE, 0xff, 0xff, 0xff );
imagefilledrectangle( $IMAGE_RESOURCE, 0, 0, 600, 600, $white );
$x = 300;
$y = 300;
$angle = 0;
$property_array = array( 'code' => str_repeat( '1', 99 ), 'rect' => true );
$width = null;
$height = null;
$data = Barcode::gd( $IMAGE_RESOURCE, $black, $x, $y, $angle, 'datamatrix', $property_array, $width, $height );
Notice: Undefined offset: -1 in /Applications/XAMPP/xamppfiles/htdocs/php-barcode-2.0.5/php-barcode.php on line 2275
Notice: Undefined offset: -1 in /Applications/XAMPP/xamppfiles/htdocs/php-barcode-2.0.5/php-barcode.php on line 2281
Notice: Undefined offset: -1 in /Applications/XAMPP/xamppfiles/htdocs/php-barcode-2.0.5/php-barcode.php on line 2293
Notice: Undefined offset: -1 in /Applications/XAMPP/xamppfiles/htdocs/php-barcode-2.0.5/php-barcode.php on line 2295
Notice: Undefined offset: -1 in /Applications/XAMPP/xamppfiles/htdocs/php-barcode-2.0.5/php-barcode.php on line 2301
Notice: Undefined offset: -1 in /Applications/XAMPP/xamppfiles/htdocs/php-barcode-2.0.5/php-barcode.php on line 2303
Notice: Undefined offset: -1 in /Applications/XAMPP/xamppfiles/htdocs/php-barcode-2.0.5/php-barcode.php on line 2305
Notice: Undefined offset: -1 in /Applications/XAMPP/xamppfiles/htdocs/php-barcode-2.0.5/php-barcode.php on line 2307
Notice: Undefined offset: -1 in /Applications/XAMPP/xamppfiles/htdocs/php-barcode-2.0.5/php-barcode.php on line 2321
Warning: Division by zero in /Applications/XAMPP/xamppfiles/htdocs/php-barcode-2.0.5/php-barcode.php on line 2323
Warning: array_fill() expects parameter 2 to be integer, float given in /Applications/XAMPP/xamppfiles/htdocs/php-barcode-2.0.5/php-barcode.php on line 1844
Warning: Division by zero in /Applications/XAMPP/xamppfiles/htdocs/php-barcode-2.0.5/php-barcode.php on line 1870
October 23, 2015 DIN will publish the new standard DIN 16587 Rectangular Extension of Data Matrix.
http://www.eurodatacouncil.org/en/news/46-extended-rectangular-data-matrix.html
Hello,
Function works until i refresh a website, then I get this error:
Parse error: syntax error, unexpected T_FUNCTION in /my/ftp_address/www/barcode/php-barcode.php on line 166
The "php-barcode.php" didn't touched. Can you help?
Discovered with this error appearing:
XML Parsing Error: unclosed token
Location: data:image/svg+xml...
Pull request coming shortly with fix.
Dear All,
Are there any known issues on IE11 ? As my team has migrated to 11, and all barcodes are generated with small errors.
Thanks!
There's a parser error when generating a valid code in chrome's latest version:
This page contains the following errors:
error on line 1 at column 129: AttValue: ' expected
Below is a rendering of the page up to the first error.
Probably there are characters that have to be escaped or replaced.
Hello,
I need to know how many column my datamatrix will have in order to define my picture datamatrix size. It is possible ?
I have a rectangular datamatrix code, that gets unreadable if the user has zoomed in our out on the webpage. Problem is easily repeatable in Safari, Chrome and Firefox.
It should be noted that the php class seems to need PHP 5.3 (because of the "use" keyword).
Maybe the readme could be updated.
How can I add the $code text under the generated barcode?
Notice: iconv(): Wrong charset, conversion from CP852 to CP1250 is not allowed in /Applications/XAMPP/xamppfiles/htdocs/php-barcode-2.0.5/sample-fpdf-code128.php on line 79
FPDF error: Some data has already been output, can't send PDF file
When I create a datamatrix barcode using the jQuery library with version 2.2.0 the bmp image looks correctly on screen but the image size in the bitmap header is incorrect. This causes image parsing libraries like in Java to throw exceptions when parsing the image.
jQuery example to generate the barcode:
var settings = { output: 'bmp', moduleSize: 1, showHRI: false }; $('#barcode').barcode('000100011100000100000000ZV2OKP2L3T21F,375886182,305.81', 'datamatrix', settings);
When I try to parse it with Java I get this error:
javax.imageio.IIOException: Invalid width/height for BI_RGB image data. at java.desktop/com.sun.imageio.plugins.bmp.BMPImageReader.readHeader(BMPImageReader.java:600) at java.desktop/com.sun.imageio.plugins.bmp.BMPImageReader.getWidth(BMPImageReader.java:206)
The Java code recently includes a security fix that checks the bitmap size in the header if it is correct see: openjdk/jdk@c70f7ca Although the error messages talks about width and height the real error is the image data size check in that bit of the Java code.
That check fails because the size in the bitmap header is way too small only 782 (hex bytes 0E 03 00 00) while it should be 2134 (hex bytes 56 08 00 00). If I open the bitmap that the barcode library created in Paint and do a save as (still as bitmap) I can see that the size in the header is now correct and now Java doesn't throw the exception.
See the attached bmp barcodes.zip where one is created from the library and the other is a save as from paint.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.