Print Page | Close Window

CJK characters don't appear

Printed From: Debenu Quick PDF Library - PDF SDK Community Forum
Category: For Users of the Library
Forum Name: I need help - I can help
Forum Description: Problems and solutions while programming with the Debenu Quick PDF Library and Debenu PDF Viewer SDK
URL: http://www.quickpdf.org/forum/forum_posts.asp?TID=3786
Printed Date: 29 Apr 24 at 6:26AM
Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com


Topic: CJK characters don't appear
Posted By: samv
Subject: CJK characters don't appear
Date Posted: 24 Feb 20 at 5:39PM
With QPDF v16.11 I'm using LoadFromCanvasDC() to save a PDF file, but Japanese and Chinese characters appear as blocks.  I've tried
1. excluding embedded fonts with NoEmbedFontListAdd().  That removes the boxes, but nothing is rendered in their place.
2. explicitly loading "Noto*.ttf" fonts.  No change.
3. calling AddCJKFont().  No change.

Any hints?  Thanks.




Replies:
Posted By: Ingo
Date Posted: 24 Feb 20 at 6:44PM
Hi Sam,

what's your dev environment?
You have to deal with unicode strings - otherwise no success.
You're sample code was great for better advice.

Cheers and welcome here,
Ingo



-------------
Cheers,
Ingo



Posted By: samv
Date Posted: 24 Feb 20 at 7:03PM
Thanks for the quick reply.

We're using Visual Studio 2015.  The strings come from UTF-16 resource files.  In the code, all strings are wide.  Does that count?



Posted By: Ingo
Date Posted: 25 Feb 20 at 5:29PM
Where the strings come from doesn't matter.
It's important how to handle inside your app.
You can search hear through the threads (top, right, enhanced search option) or here:
https://www.debenu.com/docs/pdf_library_reference/Search.php
BTW: I think utf8 should be better


-------------
Cheers,
Ingo




Print Page | Close Window

Forum Software by Web Wiz Forums® version 11.01 - http://www.webwizforums.com
Copyright ©2001-2014 Web Wiz Ltd. - http://www.webwiz.co.uk