Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

idolan's avatar

Creating invoices

Hi, I've been looking the best way to generate an pdf-invoice. I have found dompdf and snappy to create pdfs but im looking a way to put via coordinates strings of text because i print it on a already printed invoice. I also saw the cashier package but i didnt find specific way to coordinates. What do you think the best practice is?

0 likes
8 replies
idolan's avatar

None of the above allows to use coordinates to put strings. But thanks for the reply!

deadlockgB's avatar

You can use (allthough it's quite messy) absolute positioning of div containers in the html. So you "can" use coordinates

1 like
idolan's avatar

Yes, you are right, but I dont think is the best practice for my case. I am looking something like "cell(x,y, string)". I found fpdf allows it but not sure how to install the library not using composer (because https://packagist.org/packages/anouar/fpdf is on L4) any ideas? Thanks!

smccoy78's avatar

@anam Does your package allow passing a view? Or is it just straight html?

Please or to participate in this conversation.