You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Archimedes Trajano (JIRA)" <ji...@apache.org> on 2018/11/21 14:08:00 UTC

[jira] [Commented] (PDFBOX-3903) Special symbols (Emoji icons) missing when printing in PDF

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

Archimedes Trajano commented on PDFBOX-3903:
--------------------------------------------

Since FOP-2734 is for FOP, I am attaching the details of what I did and where I suspect it is a PDFBOX issue here.  (I can't attach files so here's the gist [https://gist.github.com/trajano/8b1f4b5f961e867e6c78b581dba0ca72)]

 

I use OpenHtmlToPDF but it yielded similar output to FOP-2734.  I do use Noto Fonts and I can tell some of it are working namely the CJK, but some are not namely Khmer and Emoji.  These two lines

  .useFont(() -> Thread.currentThread().getContextClassLoader().getResourceAsStream("fonts/NotoColorEmoji.ttf"), "noto")
  .useFont(() -> Thread.currentThread().getContextClassLoader().getResourceAsStream("fonts/NotoEmoji-Regular.ttf"), "noto")

 

I tried to switch in and out to see if emojis work. but they didn't.  However

  .useFont(() -> Thread.currentThread().getContextClassLoader().getResourceAsStream("fonts/NotoSansKhmer-Regular.ttf"), "noto")

Do not render either.

As I noted in the other bug

 

14:23:24.631 [main] DEBUG org.apache.fontbox.ttf.GlyphSubstitutionTable - Type 3 GSUB lookup table is not supported and will be ignored
 14:23:24.631 [main] DEBUG org.apache.fontbox.ttf.GlyphSubstitutionTable - Type 4 GSUB lookup table is not supported and will be ignored
 14:23:24.631 [main] DEBUG org.apache.fontbox.ttf.GlyphSubstitutionTable - Type 6 GSUB lookup table is not supported and will be ignored
 14:23:24.632 [main] DEBUG org.apache.fontbox.ttf.GlyphSubstitutionTable - Type 7 GSUB lookup table is not supported and will be ignored

 

Probably indicates that the characters I am using are not supported yet.  However, what I provided may be a good unit test to add to the harness.

> Special symbols (Emoji icons) missing when printing in PDF
> ----------------------------------------------------------
>
>                 Key: PDFBOX-3903
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-3903
>             Project: PDFBox
>          Issue Type: Bug
>          Components: Documentation, FontBox, PDModel, Rendering, XmpBox
>    Affects Versions: 2.0.6, 2.0.7
>         Environment: Java , PDFBOX, 
>            Reporter: Nagendra
>            Priority: Major
>              Labels: Emoji, EmojiOne, Java, PDF, PDFLIB
>   Original Estimate: 72h
>  Remaining Estimate: 72h
>
> When I am trying to print special symbols like emoji icons on pdf by using *PDFBOX Library in Java environment *, Failing to print and able to print remaining text, Can you please suggest us the solution.
> Ex: "😃🐠😴🤧✍️👉👨‍🚒👨‍🏫👩‍👦👨‍👧‍👦🐥🐧🐾🐁🐕🎋🐲🐉 "  , I am trying to print these special symbols in pdf, I tried most of the ttf's, no one is supported to print.  Any quick response is appriciate. Thank you.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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