TCPDF icon indicating copy to clipboard operation
TCPDF copied to clipboard

Implemented rectangular data matrix barcode

Open w512work opened this issue 1 year ago • 7 comments

Implemented support for rectangular data matrix code. Corrected values in code definition table and corrected modulo 254 operation in function get253StateCodeword.

w512work avatar Jan 19 '24 15:01 w512work

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Jan 19 '24 15:01 CLAassistant

Do you have an ouput to show here and some example code ? It would be great to have a new example in the examples/ folder

williamdes avatar Jan 19 '24 21:01 williamdes

This feature is already present in https://github.com/tecnickcom/tc-lib-barcode that is already integrated with tc-lib-pdf. The current datamatrix implementation in TCPDF is not maintained and contains other bugs. If you want to use datamatrix with TCPDF it is easier to import the tc-lib-barcode and integrate it like in tc-lib-pdf.

nicolaasuni avatar Jan 24 '24 15:01 nicolaasuni

@w512work it is probably best that you migrate to the new library for data matrix and close this PR

williamdes avatar Jan 25 '24 10:01 williamdes

Thank you @nicolaasuni for the hint.

I do not only need barcodes. If I have understood correctly, tc-lib-pdf is the top level for generating comprehensive PDFs. In its readme it says at the top that the library is not yet ready. I would have liked to take a look at the examples of this version to get an idea of the current status. I installed the current version of the lib via composer and tried for about an hour without success to get the example script in the examples folder displayed im my browser. I failed because the autoloader could not be loaded. I'm not sure if it's a good idea to change everything at this point without causing various other problems that will significantly increase the development and maintenance effort of my project...

Can I view the examples anywhere on the net without spending 2 hours coding, like on https://tcpdf.org/examples/ ?

w512work avatar Jan 26 '24 07:01 w512work

Can I view the examples anywhere on the net without spending 2 hours coding, like on https://tcpdf.org/examples/ ?

Just tried the command make server mentioned in the readme. Unfortunately it gives me the error:

Directory example does not exist. make: *** [Makefile:250: server] Error 1

The manual approach php -t examples -S 10.0.0.251:8888 throws another error when I try to access from the browser:

[Fri Jan 26 09:55:16 2024] PHP Fatal error: Uncaught Com\Tecnick\Pdf\Font\Exception: unable to read file: helvetica.json in /var/www/html/test-uw/tc-lib-pdf/vendor/tecnickcom/tc-lib-pdf-font/src/Stack.php:183 Stack trace: #0 /var/www/html/test-uw/tc-lib-pdf/vendor/tecnickcom/tc-lib-pdf/examples/index.php(46): Com\Tecnick\Pdf\Font\Stack->insert() #1 {main} thrown in /var/www/html/test-uw/tc-lib-pdf/vendor/tecnickcom/tc-lib-pdf-font/src/Stack.php on line 183 [Fri Jan 26 09:55:16 2024] 10.0.2.121:49293 [500]: GET / - Uncaught Com\Tecnick\Pdf\Font\Exception: unable to read file: helvetica.json in /var/www/html/test-uw/tc-lib-pdf/vendor/tecnickcom/tc-lib-pdf-font/src/Stack.php:183 Stack trace: #0 /var/www/html/test-uw/tc-lib-pdf/vendor/tecnickcom/tc-lib-pdf/examples/index.php(46): Com\Tecnick\Pdf\Font\Stack->insert() #1 {main} thrown in /var/www/html/test-uw/tc-lib-pdf/vendor/tecnickcom/tc-lib-pdf-font/src/Stack.php on line 183

w512work avatar Jan 26 '24 09:01 w512work

Please try to resolve the conflicts.

nicolaasuni avatar Apr 20 '24 17:04 nicolaasuni