chillerlan / php-qrcode

A PHP QR Code generator and reader with a user-friendly API.
https://smiley.codes/qrcode/
Apache License 2.0
2.01k stars 302 forks source link

PDF output PR welcome or should we keep it separated? #48

Closed JanSlabon closed 4 years ago

JanSlabon commented 4 years ago

We think about creating a PDF output module for this library but I'm not sure if we should keep it as an external repository/module or if you are willed to accept a PR for a default implementation?

We would use FPDF under the hood and the QR codes will be created as simple vector based PDF files. I'm also not sure if (in case for a default implementation) the dependency to FPDF should be hard (in the composer.json) or optional.

The class name for a default implementation would be chillerlan\QRCode\Output\QRFpdf.

If the created QR codes needs to be reused in dynamic created PDFs they can be reimported by FPDI.

What do you think? Separate repository/module or default implementation? :-)

codemasher commented 4 years ago

Hey, this is a great idea - I'd gladly accept a PR to offer it as another built-in output module! I'd keep the dependency optional under require-dev, with additional info in the readme, so that users can decide for themselves whether or not to install it.

codemasher commented 4 years ago

Done! It's now released as v4.1.0 (PHP 7.4+) and v3.3.0 (PHP 7.2+). Again, thank you for the contribution!