Why Can't I Export to a Foreign Language PDF Using This TTC File? Edited

I am having issues using Confluence to export foreign language pages to PDF using the NotoSansCJK.ttc collection ("My TTC").

The documentation for creating PDFs claims that:

the only font files supported are true type fonts and true type collections. The accepted file extensions are *.ttf and *.ttc

but when I upload My TTC via the "PDF Export Language Support" interface, attempting to "Export PDF" generates the following error:


com.atlassian.confluence.importexport.ImportExportException: com.lowagie.text.DocumentException: /var/atlassian/application-data/confluence/fonts/NotoSansCJK.ttc is not a valid TTF file.
at com.atlassian.confluence.extra.flyingpdf.FlyingSaucerXmlToPdfConverter.useCustomFontIfConfigured(FlyingSaucerXmlToPdfConverter.java:214)caused by: com.lowagie.text.DocumentException: /var/atlassian/application-data/confluence/fonts/NotoSansCJK.ttc is not a valid TTF file.
at com.lowagie.text.pdf.EnumerateTTC.findNames(Unknown Source)

Any thoughts about why Confluence isn't handling this TTC file correctly?


N.B., the only other seemingly pertinent enduser setting, i.e. the PDF Stylesheet CSS, appears to be correct:


img
{
-fs-fit-images-to-width: 100% !important;
}

body
{
font-family: ConfluenceInstalledFont;
}


And things look OK in the backend Bandana database as well:


confluence=> select BANDANAVALUE from BANDANA where BANDANAKEY = 'com.atlassian.confluence.extra.flyingpdf.fontname';
bandanavalue
--------------------------------------
<map> +
<entry> +
<string>customfont</string> +
<string>NotoSansCJK.ttc</string>+
</entry> +
</map>
(1 row)

1 answer

0 vote

Hi Ben,

It appears the .ttc file you're using may be corrupt. 

You can try to create your own .ttc file from the invididual .ttf files and see if this works better, or try with a different .ttc file so we can narrow down the issue.

Let us know how it goes!

Kind Regards,
Shannon

Ah!  I tested it with a different ttc file from Microsoft, YuGothB.ttc, and it indeed works.  It even renders both Chinese and Japanese correctly.  Thanks for the help, I couldn't imagine that it could be a problem with the Google font, but it was!

Glad to hear, Ben! If you prefer to use the NotoSans font, you can go ahead and try creating the .ttc with the Font Forge article I sent you.

Take care!

 

Kind Regards,
Shannon

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Kesha Thillainayagam
Posted Apr 13, 2018 in Confluence

We want to hear how your non-technical teams are using Confluence!

Hi Community! Kesha (kay-sha) from the Confluence marketing team here! Can you share stories with us on how your non-technical (think Marketing, Sales, HR, legal, etc.) teams are using Confluen...

2,821 views 27 11
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you