Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature proposal: Add DomPdfOutput #178

Open
liedekef opened this issue Aug 15, 2022 · 6 comments
Open

Feature proposal: Add DomPdfOutput #178

liedekef opened this issue Aug 15, 2022 · 6 comments
Labels
enhancement New feature or request

Comments

@liedekef
Copy link

Is it possible to support dompdf as output, next to pdf and tcpdf? See https://github.com/dompdf/dompdf
It has svg support, should have no issues with utf-8 etc ...

@sprain sprain added the enhancement New feature or request label Aug 16, 2022
@sprain
Copy link
Owner

sprain commented Aug 16, 2022

Possibly.

I do not know DomPdf and I am currently unsure whether I want to support more Output types right within this library. But you surely could build a DomPdfOutput as a standalone enhancement to this library.

@sprain sprain changed the title dompdf as pdf output engine Add DomPdfOutput Aug 16, 2022
@sprain sprain changed the title Add DomPdfOutput Feature proposal: Add DomPdfOutput Aug 16, 2022
@kohlerdominik
Copy link
Contributor

@sprain Dompdf is very popular. If I would use a PHP-based PDF converter in a project, I would eiter use TCPDF or DOMPDF, depending which renders better for the given use case.

Therefore, I think adding Dompdf as output wouldn't be a bad idea. Especially if @liedekef would create a PR :).

@sprain
Copy link
Owner

sprain commented Aug 16, 2022

Especially if @liedekef would create a PR :).

I would definitely consider merging a PR :)

@liedekef
Copy link
Author

Well, since dompdf is like "converting html to pdf", I would need to know the complete output requirements before starting to work on this. If then dompdf is able to deliver, I'll create a PR.

@sprain
Copy link
Owner

sprain commented Aug 16, 2022

since dompdf is like "converting html to pdf"

In that case it‘s worth trying what happens if you feed the output of HtmlOutput to DomPdf. Maybe this already does the trick and no specific DomPdfOutput is needed?

@ckoGH
Copy link

ckoGH commented Aug 22, 2022

DomPdf is usable with php-swiss-qr-bill and HtmlOutput. Changes recommended:
1)
Use FILE_FORMAT_PNG instead of FILE_FORMAT_SVG.
2)
CSS Extension:
#qr-bill-currency { float: none !important; display: inline-block; }
#qr-bill-amount { display: inline-block; }
This solves the effect mentioned in Issue #122.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants