Skip to content

Update qrcode.php#524

Closed
markusramsak wants to merge 1 commit intotecnickcom:mainfrom
markusramsak:patch-2
Closed

Update qrcode.php#524
markusramsak wants to merge 1 commit intotecnickcom:mainfrom
markusramsak:patch-2

Conversation

@markusramsak
Copy link
Copy Markdown
Contributor

Deprecation warning PHP 8.1
Deprecated (8192): Implicit conversion from float 4.833333333333333 to int loses precision

Deprecation warning PHP 8.1
Deprecated (8192): Implicit conversion from float 4.833333333333333 to int loses precision
@williamdes
Copy link
Copy Markdown
Contributor

Do you have some example code on how you build a qrcode using tcpdf?

@markusramsak
Copy link
Copy Markdown
Contributor Author

Example:

        $pdf = new TCPDF();
        $pdf->AddPage();
        $style = [
            'position' => 'L',
            'border' => 0,
            'padding' => 0,
            'fgcolor' => [0, 0, 0], // schwarz
            'bgcolor' => false,
            'module_width' => 1,
            'module_height' => 1,
        ];

        // QRCODE,H : QR-CODE Best error correction
        $qrCodeString = 'Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Test String to be encoded in QR-Code.';
        $pdf->write2DBarcode($qrCodeString, 'QRCODE,H', '', '', 50, 50, $style, 'N');

@geoalexidis
Copy link
Copy Markdown

Hi,
When do you plan to merge this PR?
Thx

@williamdes
Copy link
Copy Markdown
Contributor

Hi, When do you plan to merge this PR? Thx

Hi @nicolaasuni
Would you mind having a look at some PRs?

@nicolaasuni
Copy link
Copy Markdown
Member

The barcodes in this library are outdated and unmaintained.
Please use tc-lib-barcode instead.

@markusramsak
Copy link
Copy Markdown
Contributor Author

The barcodes in this library are outdated and unmaintained. Please use tc-lib-barcode instead.

Can I use tc-lib-barcode in combination with "old" TCPDF https://github.com/tecnickcom/TCPDF ?
Because I have a PDF-Document created with "old" TCPDF (an invoice) and wanted to add an QR-Code (to pay). It is actually working. I just get the deprecation warnings. If you add me as maintainer for this project I can happily fix this by myself for all people using it. I am a PHP programmer for 15 years and I am using TCPDF for 8 years now, so I am sure I could figure out a good fix.

@williamdes
Copy link
Copy Markdown
Contributor

The barcodes in this library are outdated and unmaintained. Please use tc-lib-barcode instead.

Should we drop some code to focus on PDFs and release a new major version ?

@markusramsak
Copy link
Copy Markdown
Contributor Author

I would love to keep the "old" TCPDF maintained and I would love to be a maintainer. I am always using the latest versions of PHP so I would find a lot of things to fix to keep TCPDF usable for the next years until the new TCPDF library is really stable and feature complete.

@nicolaasuni
Copy link
Copy Markdown
Member

This has been already fixed by another PR.

@nicolaasuni nicolaasuni closed this Dec 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants