Do you own a Debenu Quick PDF Library version 7, 8, 9, 10, 11, 12, 13 or iSEDQuickPDF license? Upgrade to Debenu Quick PDF Library 14 today!
Not support Chinese and CMYK Color porblem |
Post Reply |
Author | |
mitchellhu
Beginner Joined: 11 Jul 13 Status: Offline Points: 11 |
Post Options
Thanks(0)
Posted: 11 Jul 13 at 8:48AM |
I download trail version 0914.
found 2 problems. 1. not support Chinese for function DrawText. 2. for function SetFillColorCMYK, QP.SetFillColorCMYK(100,0,0,0) and QP.SetFillColorCMYK(50,0,0,0) shows no different , it looks same on pdf. Is it right, trail version does not support full function? Mitchell Hu |
|
Ingo
Moderator Group Joined: 29 Oct 05 Status: Offline Points: 3524 |
Post Options
Thanks(0)
|
Hi Mitchell!
The trial version is only limited in time - not in functionality. For your problem you should use the search function here 'cause there were similar posts in the past. Cheers and welcome here, Ingo |
|
mitchellhu
Beginner Joined: 11 Jul 13 Status: Offline Points: 11 |
Post Options
Thanks(0)
|
Hi Ingo:
Thanks for your answer. I set CMYK or Chinese as key work , then use Search function , but found not thing! Mitchell Hu
|
|
Ingo
Moderator Group Joined: 29 Oct 05 Status: Offline Points: 3524 |
Post Options
Thanks(1)
|
Do the Advanced search and change time settings. charset ... japanese ... japanese support ... unicode ... codepage ...spread your mind ;-) Using chinese font it's not enough simply using the drawing functions. You have to add your font for example. |
|
mitchellhu
Beginner Joined: 11 Jul 13 Status: Offline Points: 11 |
Post Options
Thanks(0)
|
Hi Ingo:
Just do the Advanced search, found some answer and bring more question !!! Ha! Ha! 1.AddSubsettedFont function can show Chinse words, but the function parameters squences is different Delphi and Debenu Quick PDF library 9.14 Referece Guide.pdf, Delphi xe2 : FontName:system.widestring SubSetChars:system.WideString Options:System.Integer Referce Guide : AddSubsettedFont(FontName: WideString; CharsetIndex: Integer; SubsetChars: WideString): Integer; the other strnage thing is no matter how to chnage FontName ( same as the name in C:\Windows\Fonts\), the Chinese Word font only shows default font : '新細明體 標準' and the font id always same as 1476395012. Why? Code: //ifontID2 := QP.AddTrueTypeSubsettedFont('新細明體 標準', '胡明元', 7); //ifontID2 := QP.AddTrueTypeSubsettedFont('MS Gothic', '胡明元', 7); //ifontID2 := QP.AddTrueTypeSubsettedFont('微軟正黑體', '胡明元', 7); ifontID2 := QP.AddTrueTypeSubsettedFont('胡明元', 7); //CharsetIndex 7: Chinese Big 5 if (QP.SelectFont(ifontID2) = 1) then begin QP.SetTextColorCMYK(100, 0, 0, 0); QP.SetTextSize(24); QP.DrawText(30, 30, '胡明元'); end; 2.about CMYK color question, still found nothing!!! QP.SetFillColorCMYK(100,0,0,0) ===> Blue QP.SetFillColorCMYK(50,0,0,0) ===> Light Blue But the second one will show Blue color same as first one! Why? Code: QP.SetFillColorCMYK(100,0,0,0) QP.DrawBox( 10, 10, 10, 5, 2); QP.SetFillColorCMYK(50,0,0,0) QP.DrawBox( 30, 10, 10, 5, 2); 3. I want to DrawText(10,10,'CMYK') letter 'C' set color to CMYK(100,0,0,0); letter 'M' set color to CMYK(0,100,0,0); letter 'Y' set color to CMYK(0,0,100,0); letter 'K' set color to CMYK(0,0,0,100); is there a function can extact a letter form text and set it's color? Thanks Mitchell Hu P.S: My English ability is poor, hope you could understand what I am say
|
|
mitchellhu
Beginner Joined: 11 Jul 13 Status: Offline Points: 11 |
Post Options
Thanks(0)
|
for the point 2. I got answer:
the value for CMYK should be divided by 100. QP.SetFillColorCMYK(100/100,0,0,0) ===> Blue QP.SetFillColorCMYK(50/100,0,0,0) ===> Light Blue Mitchell Hu
|
|
mitchellhu
Beginner Joined: 11 Jul 13 Status: Offline Points: 11 |
Post Options
Thanks(0)
|
the 3 point:
use function TDebenuPDFLibrary0914.GetTextWidth(Text: WideString): Double code ifontID2 := QP.AddTrueTypeSubsettedFont('標楷體 標準','胡明元', 7); if (QP.SelectFont(ifontID2) = 1) then begin QP.SetTextColorCMYK(100, 0, 0, 0); QP.SetTextSize(48); QP.DrawText(30, 30, '胡明元'); QP.SetTextColorCMYK(100, 0, 0, 0); QP.SetTextSize(48); QP.DrawText(100, 30, '胡明元'); QP.SetTextColorCMYK(0, 100, 0, 0); QP.DrawText(100+QP.GetTextWidth('胡明元'),30,'胡'); QP.SetTextColorCMYK(0, 0, 100, 0); QP.DrawText(100+QP.GetTextWidth('胡明元胡'),30,'明'); QP.SetTextColorCMYK(0, 0, 0, 100); QP.DrawText(100+QP.GetTextWidth('胡明元胡明'),30,'元'); end; |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |
Copyright © 2017 Debenu. Debenu Quick PDF Library is a PDF SDK. All rights reserved. About — Contact — Blog — Support — Online Store