Print Page | Close Window

Support Chinese

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=1094
Printed Date: 29 Sep 24 at 12:16AM
Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com


Topic: Support Chinese
Posted By: terryhcw
Subject: Support Chinese
Date Posted: 01 Jun 09 at 3:22PM
Hi all,

    Can anyone know, whether QuickPDF support to make a Chinese  pdf file.

    I had try the demo version, but can not make it to disaplay chinese character in the PDF file.

    Does any one know how can I make it?

    Regards

Terry Ho



Replies:
Posted By: Ingo
Date Posted: 02 Jun 09 at 6:22AM
Hi Terry!

Please read about function "AddSubsettedFont". This should help ...
Here's a sample for writing chinese characters with unicode:

'The following VB example shows how to subset a font and
'draw text using Unicode characters.

Dim PDF As TQuickPDF0713
Set PDF = CreateObject("TQuickPDF0713")
Call PDF.UnlockKey (" - your license key here - " )
 
Dim S As String
'Say hello in english and chinese ...
S = "Hello: " & ChrW(&H4F60) & ChrW(&H597D)
Call PDF.AddSubsettedFont ("Verdana", 7, S)
Call PDF.DrawText (100, 500, PDFSq.GetSubsetString (S))
Call PDF.SaveToFile ("c:\unicode.pdf")
Set PDF = Nothing

Cheers, Ingo



Posted By: terryhcw
Date Posted: 02 Jun 09 at 3:46PM
Hi Ingo,

    Thanks your hits. How about if I had a report to print out, does it mean I need to draw text on each report line.

    Regards

Terry Ho


Posted By: Ingo
Date Posted: 02 Jun 09 at 3:53PM
yes ;-)


Posted By: terryhcw
Date Posted: 03 Jun 09 at 8:54AM
Hi Ingo,

     I had a Chinese WMF file. Can I use QuickPDF to convert this file to PDF?

     Before that, I had ask the same question to Leonid Chudakov (Which provide a solution in Clarion to call QuickPDF to make PDF report in Clarion). He told me that your company working on Wmf to pdf conversion. 

      To me, I'm a software developer, I'm using Clarion to develop business application. I use clarion to print some report, but it can not make Chinese PDF report. So I want to under the WMF file and convert such file to one PDF report.  I hope I can solve it under the use of QuickPDF.

      Regards.

Terry Ho


Posted By: Ingo
Date Posted: 03 Jun 09 at 9:03AM
Hi!

With the render-functions you can convert it to pdf.

Cheers, Ingo


Posted By: MTchary
Date Posted: 07 Aug 09 at 4:05AM
Indigo's code works fine with iSEDQuickPDF.DLL v. 5.11 but does not work with QuickPDF.DLL v. 7.15
Do I miss something?
Tnx


Posted By: MTchary
Date Posted: 07 Aug 09 at 4:32AM
I noticed that QuickPDFAddSubsettedFont() returns nothing. Here is the code:
 
lcText = CHR(0x4F) + CHR(0x60) + CHR(0x59) + CHR(0x7D)
lnResult = QuickPDFAddSubsettedFont(lnInstanceID, "Verdana", 7, lcText)
 
When I use follow code with iSEDQuickPDF.DLL v. 5.11: 
 
lcText = CHR(0x4F) + CHR(0x60) + CHR(0x59) + CHR(0x7D)
lnResult = iSEDAddSubsettedFont("Verdana", 7, lcText)
 
iSEDAddSubsettedFont returns numeric value - Font ID
 
  


Posted By: MTchary
Date Posted: 13 Aug 09 at 1:40AM

I see you the bug has been fixed  in v. Quick PDF Library 7.16 Beta 1

Now I am able to print Chinese characters. But when I try to print mixed string - something like:

"Hello: "  +  CHR(0x60) + CHR(0x4F) + CHR(0x7D) + CHR(0x59)

 

I get a mess. I did try to pass "Hello" as a double byte character string as well: :

"H e l l o :  "  +  CHR(0x60) + CHR(0x4F) + CHR(0x7D) + CHR(0x59)

No luck

 

The only way I could do this - is to print char by char in a loop, but this is not acceptable for me.

 

The follow code prints Chinese characters correct:

 

lcText =  CHR(0x60) + CHR(0x4F) + CHR(0x7D) + CHR(0x59)

 

lnResult = QuickPDFAddSubsettedFont(lnInstanceID, "Verdana", 7, lcText)

 

lnResult = QuickPDFDrawText (lnInstanceID , lnLeft, lnTop, QuickPDFGetSubsetString(lnInstanceID , lcText))

   

Is there any way to print combined string, i.e. English words + Chinese characters?




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