Skip to content

Fixed #14744 and #17808 - Added CJK and Arabic font support for asset acceptance#17866

Merged
snipe merged 10 commits intodevelopfrom
_reworked_tcpdf
Sep 16, 2025
Merged

Fixed #14744 and #17808 - Added CJK and Arabic font support for asset acceptance#17866
snipe merged 10 commits intodevelopfrom
_reworked_tcpdf

Conversation

@snipe
Copy link
Copy Markdown
Member

@snipe snipe commented Sep 15, 2025

This is a rework of my first attempt (rebase was messy so I just started again). Right now only the acceptance PDFs are generated, but I'm going to see if I can use these new detection methods in the labels as well.

As mentioned in some of the other issues, this was particularly tricky since the user in question had mixed English and Arabic, which domPDF just does not handle properly.

The end result is that instead of using the acceptance HTML template, we have to manually create the PDF in the controller itself, which I mostly hate, but I don't see another way around it.

Example text:

### Hello! This is a EULA!

Hi, At last Problem of Persian PDF Solved completely. This is an example for it.
Problem of "jeh" letter in some word like "ویژه" (=special) fix too.

The joining of laa and alf letter fix now.
Special thanks to "Nicola Asuni" and "Mohamad Ali Golkar" for Persian support.

سلام بالاخره مشکل PDF فارسی به طور کامل حل شد. اینم یک نمونش.
مشکل حرف \"ژ\" در بعضی کلمات مانند کلمه ویژه نیز بر طرف شد.<br />نگارش حروف لام و الف پشت سر هم نیز تصحیح شد.
با تشکر از  "Asuni Nicola" و محمد علی گل کار برای پشتیبانی زبان فارسی

וָאֵרֶא כְּעֵין חַשְׁמַל כְּמַרְאֵה־אֵשׁ בֵּית־לָהּ סָבִיב מִמַּרְאֵה מָתְנָיו וּלְמָעְלָה

한국어

- here
- is 
- some
- more
- markdown

床前明月光

疑是地上霜

举头望明月

低头思故乡

卧槽 ( wǒ cáo)the third tone , and the second tone : it means " what???" " whats it ??"

Здравствуйте! Меня зовут Маша. Мне восемнадцать лет. Я живу в России. Я из города Липецк. Липецк находится в четырехстах километрах к югу от Москвы. Но по Российским меркам это не очень большое расстояние. Я окончила школу, когда мне было 16 лет, хотя в России большинство учеников выпускаются из школы в семнадцать. Это потому, что мой день рождения приходится на первую часть учебного года. Он в декабре. Но мне всегда нравилось быть младшей ученицей в классе. Не знаю почему. В школе я начала учить английский. На сегодняшний день я изучаю английский уже более десяти лет.
FireShot Capture 065 - Accept (1668530452) - Macbook Pro 13_ __ Snipe-IT Demo - snipe-it test

2-accepted-eula-2025-09-15-08-55-05

Rework of #17817 and #14235
Fixes #14744 and #17808

@snipe
Copy link
Copy Markdown
Member Author

snipe commented Sep 15, 2025

This seems ready to go, but in my regular tests, I'm not seeing a checkout notification go out to the user when acceptance isn't required. I don't think that's related, but not sure yet.

@snipe snipe requested a review from uberbrady September 15, 2025 19:42
@snipe
Copy link
Copy Markdown
Member Author

snipe commented Sep 15, 2025

I'll fix the labels in a different PR I think

@snipe snipe requested a review from marcusmoore September 15, 2025 19:58
@snipe snipe merged commit c7d8203 into develop Sep 16, 2025
3 of 8 checks passed
@snipe snipe deleted the _reworked_tcpdf branch September 16, 2025 11:04
@snipe snipe mentioned this pull request Sep 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant