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.
--- Begin Message ---
You'll need to provide a substitution font. Add in your code after the font
creation:
af.AddSubstitutionFont(basefont__1)
Paulo
-----Original Message-----
From: khalloodi [mailto:[email protected]]
Sent: Monday, September 26, 2011 7:26 AM
To: [email protected]
Subject: [iText-questions] Diffrent Arabic Problem
Hi;
This is Khalid, .Net Programmer.
I'm trying to generate a pdf file at run time, everything is working good
for me with English, except the Arabic, it's not showing :(
when I click on the field itself, I see the Arabic text there (only on
click)
first, I've made the pdf file by microsoft office word, then I made the
filds by Adobe Acrobat Writer, then i'm passing the parameter by this code
bellow:
'add content to existing PDF document with PdfStamper
Dim ps As PdfStamper = Nothing
Try
' read existing PDF document
' optimize memory usage
Dim r As New PdfReader(New
RandomAccessFileOrArray(Request.MapPath("1.pdf")), Nothing)
ps = New PdfStamper(r, Response.OutputStream)
' retrieve properties of PDF form w/AcroFields object
Dim af As AcroFields = ps.AcroFields
' fill in PDF fields by parameter:
' 1. field name
' 2. text to insert
'arabtype
Dim fontpath As String =
Environment.GetEnvironmentVariable("SystemRoot") & "\fonts\times.ttf"
Dim basefont__1 As BaseFont = BaseFont.CreateFont(fontpath,
BaseFont.IDENTITY_H, BaseFont.EMBEDDED)
Dim arabicFont As New Font(basefont__1, 10.0F, Font.NORMAL)
'ps.setRunDirection(PdfWriter.RUN_DIRECTION_RTL)
af.SetField("P_Name", "خالد")
af.SetField("P_Rank", "Employee")
af.SetField("P_Work", "موظف")
af.SetField("P_militry_num", "12345")
af.SetField("Visit_Date", "26/9/2011")
af.SetField("P_MR", "99999")
af.SetField("P_Sex", "ذكر male")
af.SetField("P_Nationalty", "سعوووودي") 'Label10.Text
af.SetField("Next_App_Date", "None")
af.SetField("P_Partner", "خالد") 'Label8.Text
af.SetField("Code_No", "DDDD33")
af.SetField("Sys_Date", "NONE")
' make resultant PDF read-only for end-user
ps.FormFlattening = False
'ps.add
' forget to close() PdfStamper, you end up with
' a corrupted file!
ps.Close()
Catch
Finally
If ps IsNot Nothing Then
ps.Close()
End If
End Try
i'll appreciate your help and support, please
Thank you & Best Regards
--
View this message in context:
http://itext-general.2136553.n4.nabble.com/Diffrent-Arabic-Problem-tp3842848p3842848.html
Sent from the iText - General mailing list archive at Nabble.com.
------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2dcopy1
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples:
http://itextpdf.com/themes/keywords.php
--- End Message ---
------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2dcopy1
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples:
http://itextpdf.com/themes/keywords.php