I have mentioned that isedquickpdf is a powerful PDF operation control under Delphi. The biggest problem encountered when using this control is how to output Chinese characters. Finally, I found a solution and shared it with you.
1. Chinese characters in the text
In the isedquickpdf FAQ, we introduced a method by using the addsubsettedfont function, for example, procedure tform1.button1click (Sender: tobject );
VaR
QP: tisedquickpdf;
S: string;
Begin
QP: = tisedquickpdf. Create;
Try
S: = 'Hello enthusiastic software house! ';
QP. addsubsettedfont (' ', 10, S );
QP. drawtext (100,500, qP. getsubsetstring (s ));
QP. savetofile ('G: \ test ');
Finally
QP. Free;
End;
End;
2. Chinese Characters in bookmarks
If you directly use the newoutline function to add Chinese bookmarks, garbled characters are displayed. You must first use tow.unicode to convert Chinese to the unicode format in PDF, such as QP. newoutline (INTEGER (currentnode. Parent. Data ),
QP. tow.unicode ("enthusiastic software house"), npagenumber, 0)