Hi Paulo,

I tried the suggestion you gave earlier and I did get it working but at
times Adobe Acrobat states that it does not support the Font used.
Following is my sample code:

obj_Sap.setAcro6Layers(true);

PdfTemplate n1 = obj_Sap.getLayer(1); //get rid of the question mark

PdfTemplate n2 = obj_Sap.getLayer(2);

//loading unicode based font and encoding

//reason to load unicode font is to show Chinese in signature appearance.

BaseFont bf = BaseFont.createFont("c:/arialuni.ttf", BaseFont.IDENTITY_H,
false);

Font myFont = new Font(Font.HELVETICA, 200, Font.NORMAL);



n2.beginText();

n2.setColorStroke(java.awt.Color.BLUE);

n2.setFontAndSize(bf, 10);

n2.setTextMatrix(10, 20);

n2.showText("\u4eac \u5582");

n2.endText();



The signature appearance created with the following code is not properly
visible in the Adobe Acrobat. How can I embdedd the font which I have used
i.e. arialuni.ttf. Note that this issue comes only on certain pdfs.



Regards,

Wahaj


"Wahaj Khan" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hi All,
>
> I am trying to set Unicode text e.g. Chinese in the signature appearance
of
> a signature. When I do that I get boxes in the resultant signed pdf.
Looking
> at the examples and tutorials it seems that the only way to show Unicode
> text is to set text as
>
> String text1 = "This text has
> \u0634\u0627\u062f\u062c\u0645\u0647\u0648\u0631 123,456 \u0645\u0646";
>
> This creates a problem where one has Unicode text entered/generated at run
> time e.g. Signing reason is entered in Chinese and thus making a \uCODE
> format is not possible (I am not sure how to generate the \uCODE at run
time
> but I would like to avoid doing that).
>
> Also I believe I can use both java.awt.Font font = new
> java.awt.Font("arial", 0, 18) OR  BaseFont bf =
> BaseFont.createFont("c:\\winnt\\fonts\\arial.ttf", BaseFont.IDENTITY_H,
> true);
>
> Is there a way to set the actual Chinese text directly in the signature
> appearance.
>
> Regards,
> Wahaj
>
>
>
> ----------------------------------------
> I am using the free version of SPAMfighter for private users.
> It has removed 1015 spam emails to date.
> Paying users do not have this message in their emails.
> Get the free SPAMfighter here: http://www.spamfighter.com/len
>
>
>
>
> -------------------------------------------------------------------------
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job
easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642




-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to