xing Wang commented on PDFBOX-4116:

Hi Tilman, 

Thanks for your response.

I am working on extracting information from PDF publications. It seems very 
common that the subsetted fonts are "embedded" (not sure whether I used the 
right word). I agree that some missing information did cause great trouble in 
my analysis. 

May I ask why they should not be reused? Why the "first" time use works?

Another thing is that you mentioned "This may or may not work", do you mean the 
appendRawCommands is not stable? As later I managed to convert string PDF 
command into bytes and change the content of a page. 


> could not add text without unicode in the font
> ----------------------------------------------
>                 Key: PDFBOX-4116
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-4116
>             Project: PDFBox
>          Issue Type: Wish
>          Components: PDModel
>    Affects Versions: 2.0.8
>         Environment: Windows
>            Reporter: xing Wang
>            Priority: Minor
>         Attachments: image-2018-02-19-09-23-00-110.png
> !image-2018-02-19-09-23-00-110.png!
> As shown in the debugger, that the PDFType1Font map the code of 33 to 
> "minus", but there is no unicode value associated with it. 
> If we use the code `contentStream.showText("\u0021");` to add content, it 
> will cause an error of following. 
> Exception in thread "main" java.lang.IllegalArgumentException: U+0021 
> ('exclam') is not available in this font AMZNGR+CMSY10 (generic: 
> FREBPT+CMSY10) encoding: built-in (Type 1) with differences
> at org.apache.pdfbox.pdmodel.font.PDType1Font.encode(PDType1Font.java:439)
> at org.apache.pdfbox.pdmodel.font.PDFont.encode(PDFont.java:323)
> at org.apache.pdfbox.debugger.CreatePDF.main(CreatePDF.java:63)
> The best way I could do is used the "appendRawCommands", but I find it's 
> marked as deprecated. I am wondering why or is there any replacement for this 
> function?

This message was sent by Atlassian JIRA

To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org

Reply via email to