How to output PDF files with Chinese characters in isedquickpdf

Source: Internet
Author: User
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)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.