Re: [iText-questions] Setting Unicode text in Signature appearance

2006-10-20 Thread Paulo Soares
Works for me. Note the you can use setLayer2Text() and setLayer2Font()
to achieve the same result and without bothering with the formatting.

Paulo 

> -Original Message-
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On 
> Behalf Of Wahaj Khan
> Sent: Friday, October 20, 2006 3:59 PM
> To: itext-questions@lists.sourceforge.net
> Subject: Re: [iText-questions] Setting Unicode text in 
> Signature appearance
> 
> 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
> 
> 
> 
> 
> I am using the free version of SPAMfighter for private users.
> It has removed 1135 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
> ___
> iText-questions mailing list
> iText-questions@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/itext-questions
> 


Aviso Legal:
Esta mensagem é destinada exclusivamente ao destinatário. Pode conter 
in

Re: [iText-questions] Setting Unicode text in Signature appearance

2006-10-20 Thread Wahaj Khan
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




I am using the free version of SPAMfighter for private users.
It has removed 1135 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
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions


Re: [iText-questions] Setting Unicode text in Signature appearance

2006-10-20 Thread Wahaj Khan
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
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions


Re: [iText-questions] Setting Unicode text in Signature appearance

2006-10-12 Thread Paulo Soares
 

> -Original Message-
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On 
> Behalf Of Wahaj Khan
> Sent: Thursday, October 12, 2006 7:41 AM
> To: itext-questions@lists.sourceforge.net
> Subject: [iText-questions] Setting Unicode text in Signature 
> appearance
> 
> 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";
>

I don't know any other way to do it. At some stage you'll have to have
the Chinese text in a String.
 
> 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).
> 

Slow down and think. \uCODE is just for literals that are going to be
compiled. If you have text in a database or text file it will be in some
encoding like UTF-8 or UTF-16 or GB18030 or something else. There are
String constructors that will convert a byte array to an Unicode String.

> 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);
>

You must use a BaseFont that has the characters you need. For example
Arial will do for Russian, Hebrew and Arabic but won't do for Chinese.
 
> Is there a way to set the actual Chinese text directly in the 
> signature
> appearance.
> 

Yes. Set the font and the text in PdfSignatureAppearance.

Paulo

> Regards,
> Wahaj


Aviso Legal:
Esta mensagem é destinada exclusivamente ao destinatário. Pode conter 
informação confidencial ou legalmente protegida. A incorrecta transmissão desta 
mensagem não significa a perca de confidencialidade. Se esta mensagem for 
recebida por engano, por favor envie-a de volta para o remetente e apague-a do 
seu sistema de imediato. É proibido a qualquer pessoa que não o destinatário de 
usar, revelar ou distribuir qualquer parte desta mensagem. 

Disclaimer:
This message is destined exclusively to the intended receiver. It may contain 
confidential or legally protected information. The incorrect transmission of 
this message does not mean the loss of its confidentiality. If this message is 
received by mistake, please send it back to the sender and delete it from your 
system immediately. It is forbidden to any person who is not the intended 
receiver to use, distribute or copy any part of this message.


-
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
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions


[iText-questions] Setting Unicode text in Signature appearance

2006-10-11 Thread Wahaj Khan
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
___
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions


[iText-questions] Setting Unicode text in Signature appearance

2006-10-11 Thread Wahaj Khan
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




-
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
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions