Create PDF with PHP

There exist several library:

http://www.fpdf.org/

https://github.com/mpdf/mpdf

https://github.com/tecnickcom/tc-lib-pdf

To process html and convert as pdf there is also https://www.msweet.org/htmldoc/

mpdf seems to allow html to pdf conversion.

Fpdf for instance clearly state that it doesn’t support that features and suggest using htmldoc (that they present as a gpl utility).

There are packages specifically for laravel such as
https://github.com/niklasravnsborg/laravel-pdf which is a package for mpdf

Everything worked prefectly with Niklas package

EU VAT ID for Woocommerce

Do you want to write your own VAT ID plugin for woocommerce?

Here are some useful link that will help you in this task and helped me succesfully add a custom VAT ID field in woocommerce checkout page. It checks if the VAT ID is valid and remove the VAT accordingly from the price:

1- Add a VAT ID field to the checkout page

https://www.wpdesk.net/blog/vat-eu-woocommerce/

Check the DIY part! You will need to edit the hook action with a proper hook so that the field display. https://businessbloomer.com/woocommerce-visual-hook-guide-checkout-page/

2- Perform the VAT ID validation

https://www.ptmr.io/blog/php-vies-vat-number-validation-european-vat-id/

3- Exempt customer from TAX if the EU VAT check out.

https://businessbloomer.com/woocommerce-remove-tax-checkout-field-value-exists/

4- refresh the total on change