Gopi Lal Gopi Lal - 3 years ago 195
Java Question

Connot extract NotoSansCJKsc-Regular font error in adobe reader?

I am able to display the Chinese,japanses and all other Asian langauages in IE,Chrome but when I open the PDF
In abode reader it throws me following error...

I am using GOOGLE NOTO FONTS.

Error

Here is my sample code...

Font asianFont = FontFactory.getFont("path\NotoSansCJKsc-Regular.otf", BaseFont.IDENTITY_H , BaseFont.EMBEDDED,8);

Please help on this.

Answer Source

I am an employee at iText that recently saw this issue (in a different font) come up as a subsection of a larger issue.

If you are using iText 5: Upgrade to the most recent version of 5.5.12.

If you are using iText 7: The fix will be in our next release- 7.0.5. There are currently SNAPSHOT builds available that contain this fix.

You can update your pom.xml to use the 7.0.5 snapshot version if you use Maven:

<project>
   <!-- Required for the access to the iText SNAPSHOT dependency -->
   <repositories>
        <repository>
            <id>itext</id>
            <name>iText Repository - snapshots</name>
            <url>https://repo.itextsupport.com/snapshots</url>
        </repository>
    </repositories>
...    
    <!-- Dependency for the SNAPSHOT build -->
    <dependencies>
        <dependency>
            <groupId>com.itextpdf</groupId>
            <artifactId>itext7-core</artifactId>
            <version>7.0.5-SNAPSHOT</version>
            <type>pom</type>
        </dependency>
    </dependencies>
</project>

Or you can download the snapshot jars directly from our artifact server: https://repo.itextsupport.com/webapp/#/artifacts/browse/simple/General/snapshot/com/itextpdf

7.0.5 is currently planned to be officially released later next month (October '17)

I just tried both the versions above with the NotoSansCJKsc-Regular font, and was able to produce a document without error.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download