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)