If you embed a subset of arial-unicode-ms.ttf then the prefilled fields are sure to be rendered, but you can't use the embedded subset to change field values because the characters you need may not be in the subset.

Adobe Acrobat (I don't know which viewer you are expecting your users to invoke) will NOT use an embedded font (subset or full) for field changes unless the same font is available on the user's machine. A typical Adobe disclaimer is: "This PDF file may contain embedded typefaces. In accordance with Adobe's licensing policy, this file may be printed or viewed but shall not be edited unless the typefaces which are embedded are licensed to and installed on the computer performing the editing. In downloading this file, parties accept therein the responsibility of not infringing Adobe's licensing policy."

YMMV, Marc

On 6/3/2024 5:23 AM, Anil Basavaraju wrote:
Hi Pdfbox team,

Can you please check our request below.

Thank You,
Anil B

From: Anil Basavaraju
Sent: Thursday, May 30, 2024 9:06 PM
To:users@pdfbox.apache.org
Cc: Sudarshan Desai<sde...@accurate.com>
Subject: File size issue when we use arial-unicode-ms font with pdfbox

Hi Pdfbox team,

We have a requirement to prefill the pdf with different languages including CJK 
(Chinese, Japanese, Korean) and some special characters.
So we embedded arial-unicode-ms.ttf with pdfbox. The ttf file is about 22.7 MB. 
We are able to prefill the pdf form with the languages and special characters.
But the issue is the size of the pdf file becomes around 27 MB. Before 
prefilling the pdf file size is around 2 MB.
We need to upload this pdf file after prefilling, which is taking more time 
which is not a good user experience.
Is there any way where we can reduce the pdf file size using pdfbox?

Note: If we use any other font/ttf file which is smaller in size, it is not 
supporting CJK.

Thanks,
Anil

Reply via email to