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

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

The plain text usage works because no attempt is made to read the TTC file as a 
ttf font again. I expect that the problem would come when reading the PDF after 
saving. The problem you got was because when using fields, the font is read 
again. (Yes this is inefficient, I can't remember what the reason was. If you 
are creating many fields, the best is to save the PDF first before setting the 
values)

> 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
>          Components: Writing
>    Affects Versions: 2.0.19
>            Reporter: bai yuan
>            Assignee: Tilman Hausherr
>            Priority: Major
>             Fix For: 2.0.21, 3.0.0 PDFBox
>
>         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