Commit Graph

23 Commits

Author SHA1 Message Date
Lukas Selch
bf1c4d85cf fix: update ImageUtils namespace in PDF blade templates (#695)
The ImageUtils class was moved from App\Services\Pdf to App\Support\Pdf
but the blade templates were not updated to reflect this change.

This caused 'Class App\Services\Pdf\ImageUtils not found' errors when
generating PDFs for invoices, estimates, and payments.

Updated namespace in 7 blade template files:
- invoice1.blade.php
- invoice2.blade.php
- invoice3.blade.php
- estimate1.blade.php
- estimate2.blade.php
- estimate3.blade.php
- payment.blade.php
2026-07-28 19:39:06 +02:00
Darko Gjorgjijoski
ba5c6c39ba Add multilingual PDF font system with Noto Sans and on-demand CJK packages
Bundle Noto Sans (Regular/Bold/Italic/BoldItalic) under resources/static/fonts/ as the default PDF face — it covers Latin, Cyrillic, Greek, Arabic, Thai and Hindi out of the box, replacing the limited DejaVu Sans fallback. Move all @font-face declarations into app.pdf.partials.fonts and include it from every invoice/estimate/payment/report template, dropping per-template font-family hardcodes and the conditional Thai locale include.

Introduce FontService + FontController to download static Noto Sans CJK packages (zh, zh_CN, ja, ko) from life888888/cjk-fonts-ttf on demand. GeneratesPdfTrait::ensureFontsForLocale primes the family before rendering and the partial emits @font-face rules for installed packages so dompdf resolves them through standard CSS — no separate registerFont() instance required. Static TTFs are mandatory because dompdf's PHP-Font-Lib does not parse variable fonts (fvar/gvar tables), which is why Google Fonts' NotoSansTC[wght].ttf rendered empty boxes.

Expose status/install via /api/v1/fonts/status and /api/v1/fonts/{package}/install with matching FONTS_STATUS / FONTS_INSTALL constants in scripts-v2/api/endpoints.ts. Flip DOMPDF_ENABLE_REMOTE default to true for remote asset loading.
2026-04-06 23:32:00 +02:00
Darko Gjorgjijoski
0ce88ab817 Remove app/Space folder and extract model business logic into services
Relocate all 14 files from the catch-all app/Space namespace into proper
locations: data providers to Support/Formatters, installation utilities to
Services/Installation, PDF utils to Services/Pdf, module/update classes to
Services/Module and Services/Update, SiteApi trait to Traits, and helpers
to Support.

Extract ~1,400 lines of business logic from 8 fat models (Invoice, Payment,
Estimate, RecurringInvoice, Company, Customer, Expense, User) into 9 new
service classes with constructor injection. Controllers now depend on
services instead of calling static model methods. Shared item/tax creation
logic consolidated into DocumentItemService.
2026-04-03 15:37:22 +02:00
klittle81
c70e2abf8a Apply suggestion from @klittle81
remove the <br> at end as its not needed
2026-02-27 22:43:40 -05:00
klittle81
fc05cf61fa Patch to update reciept PDF generated by payment.blade.php to include Invoice Total, Balance Due, and Invoice Status 2026-02-27 22:06:27 -05:00
SpeedX
022769ba38 Fix Logo render in Payment PDF (#162)
* Fix logo render in Payment PDF

* Fix CSS to make it consistent with other templates
2024-10-14 11:47:10 +02:00
Darko Gjorgjijoski
cec86c39ed Update logo/screenshots 2024-01-28 02:59:42 +01:00
Ritthikrai W
204483836a 🌐Update: support Thai language (#768)
* add thai language config

* update thai translation

* update thai translation

* add THSarabunNew fonts to using in pdf

* update: pdf file to support thai language by checking isLocale('th') and include thai font-family

* update: thai translation

* remove the index.php file (not used)

* move THSarabunNew fonts to resoureces/static/fonts

* Add .gitkeep to storage/fonts to pre-build the fonts directory

Co-authored-by: Ritthikrai (Champ) Wiengchai <ritthikrai.w@aware.co.th>
2022-06-15 18:17:36 +05:30
Harsh Jagad
a14655d73b Update dompdf version 2022-01-12 11:44:45 +00:00
harshjagad20
725afa9f65 fix pdf issue & payment update issue 2021-12-09 18:06:25 +05:30
Mohit Panjwani
082d5cacf2 v5.0.0 update 2021-11-30 18:58:19 +05:30
Florian Gareis
cea8405ace Translate PDF titles 2021-03-20 14:35:22 +01:00
Mohit Panjwani
7f0da9dc36 fix conflict 2021-02-12 13:19:56 +05:30
Sebastian Cretu
375a59a504 fix(payments): display the currency in receipts 2021-02-08 20:42:10 +01:00
brijraj_04
3695e7d075 fix payment currency issue 2021-02-02 17:22:44 +05:30
edevrob
8dee0da434 PDF templates fix
DomPDF font-weight problems fix
2020-12-09 21:13:56 +02:00
Mohit Panjwani
89ee58590c build version 400 2020-12-02 17:54:08 +05:30
Jay Makwana
0f3e8fce3b refactor heading text in payment 2020-05-08 20:55:00 +05:30
radhu587
325f90bba5 Fix issues on invoice template 2020-05-08 18:49:02 +05:30
radhu587
6046113cb1 Refactor Invoice and Payment templates 2020-05-07 16:42:04 +05:30
Mohit Panjwani
f8ccfece09 update templates 2020-05-05 13:12:26 +05:30
raishvaria
d9b175a676 fix payment issue & build version 300 2020-01-06 14:08:29 +05:30
Jay Makwana
4c33a5d88c Fix Invoice/Estimate template issues and Add Payment Receipt, Custom Payment Modes and Item units 2020-01-05 07:22:36 +00:00