[ 
https://issues.apache.org/jira/browse/PDFBOX-4887?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17137823#comment-17137823
 ] 

Tilman Hausherr commented on PDFBOX-4887:
-----------------------------------------

Sadly, you can't embed fonts from TrueType collections for forms because "not 
subsetting" isn't supported.

PDFBox fails to detect that this is a TTC file. While these can be used as 
TrueType fonts logically and subsetting works, they can't be embedded as 
individual full TrueType files, because PDFBox has no such feature (in theory, 
one might implement it by expanding TrueTypeEmbedder; but you can convert ttc 
files to ttf with online converters). And the PDF specification does not 
support TTC files. Solution: PDFBox must detect this. That is easy, because TTC 
files begin with "ttcf".

> Using the same font  fully embedded in plain text and PDTextField, it throws 
> an exception in PDTextField.setValue
> -----------------------------------------------------------------------------------------------------------------
>
>                 Key: PDFBOX-4887
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-4887
>             Project: PDFBox
>          Issue Type: Bug
>    Affects Versions: 2.0.19
>            Reporter: bai yuan
>            Priority: Major
>         Attachments: image-2020-06-16-12-25-47-482.png, msyh.ttc, pdfbox.java
>
>
> # Run the code in the attachment(pdfbox.java).
>  # The exception as follows: !image-2020-06-16-12-25-47-482.png!



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to