Using arabic in iText
Hello all
I want to generate a pdf document that contains arabic content. What should i use in the xml to b converted into pdf so that i get the arabic content in the pdf file?
Thanks & Regards
Gurpreet Singh
gimbal2 wrote:
sabre150 wrote:
AccadSoft wrote:
please guys I need an answer.To get answers about using iText I use "iText In Action, 2nd edition" by the prime author of iText - Bruno Lowagie.Classic way to make money - make the API free and sell the documentation. Also an honorable way to make money IMO.I was using iText before 2004 when the first edition of the book came out ( 4 years or so after the library was first introduced) and it was hard work. PDF is a very complex document format and just using the Javadoc does not really get you anywhere. There are many 'gotchas' in iText and most of the iText tutorials cover only the very basics and pretty much none of the 'gochas'. The book starts off with very simple examples that could be constructed from the Javadoc but then it does move on to the more complex issues. Worth every penny.
Similar Messages
-
How to retain the format in MS word when creating PDF using arabic fonts.
I have a word document using Arabic fonts. When I create the PDF, it looses all the formatting. Can someone help me solve this issue. Thank you.
Hi Ricol -
Thanks for reporting the issue.
We would need the files for investigation. Request you to share your email id for correspondence.
Regards,
Reetika -
I can't use arabic with excel office for mac 2011
why i can't use Arabic with excel office for mac 2011?
anajjar wrote:
why i can't use Arabic with excel office for mac 2011?
Because even after 14 years MS has failed to add arabic support to most Office products for Mac. Instead use Open/LibreOffice or Numbers. -
How to make my app searchable on App store by using Arabic Keywords
I'm trying to use Arabic description and metadata for my app. In iTunes connect it states that these data must be in English, so I did put them in English. Then i found the localization feature but found it doesn't support Arabic language.
However I found many apps that use Arabic in their names, meta data and description. I wonder how to do that?How to add "Arabic Keywords" in iTunes Connect, where there is no support for Arabic Language in iTunes. But I have seen different arabic searches for different Apps on App Store. How it is possible. Any Idea?
-
Force oracle form server to use 'Arabic Presentation Forms-B' unicode block
Hi everybody
i am using form server 10g and AR8MSWIN1256 as characterset.
it seems that with this charset oracle form server use only 'Arabic presentation Forms-B' part of unicode to display characters.
is there any way to change this and force form server to use 'Arabic presentation Forms-A' and 'Arabic presentation Forms-B'.
i checked in localebuilder and if you set any code out of 'Arabic presentation Forms-B' range in replacement chars glyph is not displayed and in the form it shows wrong display.
Regards
MostafaYou should post your question in the Forms the Developer Suite forums. It is found at:
Forms -
Using Arabic Langauge in Flash
Hello every one,
I have been using Flash5 and recently decided to make some
arabic buttons in Flash.
I have installed Arabic scrips on my laptop. when I open
Flash and type any English word its alright but as soon as I change
the language to Arabic it does not support the letters because its
left to right scrip and it types in a funny looking scrips.
I thought you might be able to help me ?
By the way, I am using Flash 5 on windows xp pro pack 2
Thank youHi there,
Right tried that and the preloader wont display, even when I simulate download at a slower speed.
To make sure I am doing this right:
I have my slideshow in layer1. It starts in frame2, I have my preloader in frame1.
I then make a new layer which appears above layer1, in that I go to the end of my slideshow and click at the end.
I then goto window - action and then enter the code you gave me.
If that is right then the screen stays blank until the slideshow starts, no preloader.
Am I doing this right?
Thank you. -
How to search using Arabic language
Hi I am from united Arab emirates my mother language is arabic when using apple tv I would like to search in my language how could I add language to the keyboard ? Can some one help me please.
Hi,
To get the Chinese language installed in the device, visit a nearby Nokia Care Point in your city. Language packs are region dependent.
"If this post helped you solve your query, please do click the KUDOS tab." -
Exporting query results into a csv file using arabic and hebrew chars
Hi,
iv'e encountered a problem, using plsql to export a query into a csv file.. the arabic turns into question mark. Do you have any idea why?Usually this indicates a mismatch between client and database character set.
How do you export this query?
What is your database version?
What is your client OS?
T. -
my keynote 09 version 5.3
i am using the arabic font albayan the problem is that when i use the build tool in the inspector the uper and the lower part of the word is gone i tryed to make the font smaller or adjust the position and that did not change so is there any way to fix this please because we can not use the build and the inspector tool like that ???!!!!!All iWork apps have bugs like this that make them generally unsuitable for RTL scripts like Arabic. All you can do is try a different font and see if the results are any better. Or try another app like OpenOffice or PowerPoint.
Let Apple know this needs to be fixed via
http://www.apple.com/feedback -
Arabic digits don't work when typing using arabic as a language
Hi there,
I am designing a book in arabic. When I type numbers they are in Hindi (١،٢،٣...) format. I want the numbers to be typed in arabic (0,1,2,3...) because that's what is used in arabic.
In the "Middle East Character Formats" section of the "Paragraph style options" of the paragraph style I am using, I changed the Digits to "Arabic (0123456789)" but no change happened to my paragraph. The digits are still displayed in "Hindi" format.
I would appreciate it if someone helped me with this,
Thanks in advance.I changed the Digits to "Arabic (0123456789)" but no change happened to my paragraph. The digits are still displayed in "Hindi" format.
Are there any overrides on the paragraph? If there is a plus symbol next to the style name when you have selected some text in the paragraph, then the selected text doesn't match the Paragraph Style in some way. You'd need to clear the overrides (by right-clicking on the style name? I never remember, I assigned a keyboard shortcut because I spend so much time clearing overrides) to get the text to return to the style you defined.
It could also be a character style that has an overt "Hindi digits" definition. Are there any character styles applied?
I am designing a book in arabic. When I type numbers they are in Hindi (١،٢،٣...) format. I want the numbers to be typed in arabic (0,1,2,3...) because that's what is used in arabic.
Um, what?
I usually see Hindi numerals used in Arabic. Because I set type for an Arabic-reading population in the US, my translators often like to use both numeral systems within the same document. (You know, Arabic for phone numbers and street numbers, but Hindi for everything else.) But when I read documents that come from places where Arabic is the dominant or sole language, the numerals are almost always exclusively in Hindi format. So maybe I'm not understanding what you say here, but it sounds incorrect to me. -
Hi,
How to use the css file in itext inorder to generate pdf file.
thankyouHi,
And thanks for reply,
I am generating a pdf file from a given html file with embeded CSS.At first I parsed html file and by using itext library I am generating PDF view on browser.
To keep the same format as in html I have also to parse css code ,and here I am facing problem.If you have some alrenate /exact solution for this, please revert me it's very urgent.
Regards
Santosh kumar choudhary
Message was edited by:
S.K.Choudhary
null -
I am trying to type an arabic word in photoshop using arabic but it wont let me ?
I have been trying the word shajaat in Arabic but it wont let me and ive already tride going through the edit and preference and going through type and changing to middle eastern and then restarting photoshop but it still wont do that and im running a windows 8 please help !
Open your Creative Cloud Panel, click on the Gear icon on the upper right, choose Preferences. In some versions you must click on the "Apps" tab.
Change the App language in your CC Preferences to English (Arabic) then the Install button will appear next to Photoshop CC
After you click on Install, it will add this language pack.
When the Install is finished, open Photoshop, go to Preferences > Interface and change your UI language to English (Arabic)
Restart Photoshop for this to take effect.
The menus will be in English, but you should be able to input Arabic.
I have to leave soon. I hope this works. -
Arabic name displaying in JLabel using html tags
If i execute the following code the value of the variable product_name as latin characters it's displaying correctely. If i use arabic characters it's adding white spaces
import java.io.*;
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.filechooser.*;
import java.util.*;
public class TestLabel extends JFrame {
private static JLabel jl_scroll = new JLabel("");
JScrollPane jsp = null;
private String scroll_text = "";
public TestLabel() {
super("TestLabel");
String product_name = "BSE";
scroll_text =
"<html>"+ArabicToHindi("123")+"<sup>"+product_name+"</sup>"+ArabicToHindi("456")+"</html>";
product_name = null;
jl_scroll.setText(scroll_text);
JPanel jp_ticker = new JPanel();
jsp = new JScrollPane(jl_scroll);
jsp.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_NEVER);
jsp.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
jp_ticker.add(jsp);
Container contentPane = getContentPane();
contentPane.add(jl_scroll, BorderLayout.CENTER);
public static String ArabicToHindi(String str) {
char c0 = 1632;
char c1 = 1633;
char c2 = 1634;
char c3 = 1635;
char c4 = 1636;
char c5 = 1637;
char c6 = 1638;
char c7 = 1639;
char c8 = 1640;
char c9 = 1641;
char cdot = 44;
String msg = str;
String msgTo = "";
if (str.length() >0) {
if (isNumber(str)) {
String str_char = "";
for (int i=0;i<str.length();i++) {
str_char = ""+str.charAt(i);
if
(!str_char.equalsIgnoreCase(":")&&!str_char.equalsIgnoreCase("+")&&!str_char
.equalsIgnoreCase("-")) {
if (str_char.equalsIgnoreCase("0")) {
msgTo = msgTo + c0;
else if (str_char.equalsIgnoreCase("1")) {
msgTo = msgTo + c1;
else if (str_char.equalsIgnoreCase("2")) {
msgTo = msgTo + c2;
else if (str_char.equalsIgnoreCase("3")) {
msgTo = msgTo + c3;
else if (str_char.equalsIgnoreCase("4")) {
msgTo = msgTo + c4;
else if (str_char.equalsIgnoreCase("5")) {
msgTo = msgTo + c5;
else if (str_char.equalsIgnoreCase("6")) {
msgTo = msgTo + c6;
else if (str_char.equalsIgnoreCase("7")) {
msgTo = msgTo + c7;
else if (str_char.equalsIgnoreCase("8")) {
msgTo = msgTo + c8;
else if (str_char.equalsIgnoreCase("9")) {
msgTo = msgTo + c9;
else if (str_char.equalsIgnoreCase(".")) {
msgTo = msgTo + cdot;
else {
msgTo = msgTo + str_char;
else {
msgTo = str;
else {
msgTo = str;
return msgTo;
public static boolean isNumber(String str) {
boolean flag_number = false;
if (str.length()>0) {
String ch_msg = "";
for (int i=0;i<str.length();i++) {
ch_msg = ""+str.charAt(i);
if (ch_msg.equalsIgnoreCase("0")){
flag_number = true;
else if (ch_msg.equalsIgnoreCase("1")){
flag_number = true;
else if (ch_msg.equalsIgnoreCase("2")){
flag_number = true;
else if (ch_msg.equalsIgnoreCase("3")){
flag_number = true;
else if (ch_msg.equalsIgnoreCase("4")){
flag_number = true;
else if (ch_msg.equalsIgnoreCase("5")){
flag_number = true;
else if (ch_msg.equalsIgnoreCase("6")){
flag_number = true;
else if (ch_msg.equalsIgnoreCase("7")){
flag_number = true;
else if (ch_msg.equalsIgnoreCase("8")){
flag_number = true;
else if (ch_msg.equalsIgnoreCase("9")){
flag_number = true;
else if (ch_msg.equalsIgnoreCase("+")){
flag_number = true;
else if (ch_msg.equalsIgnoreCase("-")){
flag_number = true;
else if (ch_msg.equalsIgnoreCase(".")){
flag_number = true;
else if (ch_msg.equalsIgnoreCase(":")){
flag_number = true;
else {
flag_number = false;
break;
return flag_number;
public static void main(String[] args) {
JFrame frame = new TestLabel();
frame.addWindowListener(new WindowAdapter() {
public void windowClosing(WindowEvent e) {
System.exit(0);
frame.pack();
frame.setVisible(true);
//------------------------------------I'm not sure why you would do it the way you have it implemented in 3 select lists.
Why not use a Item Type of Date Picker, and let the user use the pop-up Date Picker to select the date.
You code has some fatal flaws:
1) You can't see any data before 2000
2) You can't see any data past 2010 (probably not an issue now)
3) It's possible to specify February 31 as a date
Using the built-in Date Item type will eliminate these issues and at the same time, make your UI more streamlined.
Thanks,
- Scott - -
Arabic Characters Alef & Lam Appear Incorrect at Runtime using Sun JRE/JPI
Hi,
We implemented Sun JRE for Oracle EBS 11i in Production on 7th Jan 2009.
We went with Sun JRE 1.6.0_07 as we faced new Broswer Minimizing Problem in IE with 1.6.0_10 and 1.6.0_11.
Now we have some issue related to Arabic Characters Alef and Lam - Doc Id 731703.1.
The solution is to use 1.6.0_11 but we can't. I would like to know if there is any work around without using 1.6.0_11.
Thanks
ThiruHi,
We have the problem with 1.6.0_11 also.
I checked in TEST instance. Strangly the problem is only while using Arabic Forms thru Arabic Login.
If we login thru English Login and access the same Form in Enlgish and then type in Arabic there is no problem. I got these details from our Arabic Consultants.
I am trying the revert back to jinitiator.
Rgds,
Thiru -
How to create tagged PDF using java iText
Hi
I want to create PDF for accessibility purpose using java and iText
Please help.
Thanks in advancei did this some yrs ago ..scratched and found some code for you. Have a look
package com.oq.utility;
import com.lowagie.text.Cell;
import com.lowagie.text.Document;
import com.lowagie.text.Element;
import com.lowagie.text.Font;
import com.lowagie.text.HeaderFooter;
import com.lowagie.text.Image;
import com.lowagie.text.PageSize;
import com.lowagie.text.Phrase;
import com.lowagie.text.Rectangle;
import com.lowagie.text.Table;
import com.lowagie.text.pdf.BaseFont;
import com.lowagie.text.pdf.PdfWriter;
import com.oq.model.Sale;
import java.io.FileOutputStream;
import java.util.ArrayList;
import java.util.List;
public class iTextExample
public static void main (String[] args)
iTextExample eg = new iTextExample();
Sale sale = new Sale();
sale.setOdrNumber("1");
sale.setOdrDate("12-12-12");
sale.setOdrCatCode("Örder");
sale.setTotalInvValue("1234");
sale.setRefNumber("in the line of fire");
Sale sale1 = new Sale();
sale1.setOdrNumber("1");
sale1.setOdrDate("12-12-12");
sale1.setOdrCatCode("Örder");
sale1.setTotalInvValue("1234");
sale1.setRefNumber("fire line");
Sale sale2 = new Sale();
sale2.setOdrNumber("1");
sale2.setOdrDate("12-12-12");
sale2.setOdrCatCode("Örder");
sale2.setTotalInvValue("1234");
sale2.setRefNumber("in the line of firel");
List<Sale> list = new ArrayList<Sale>();
list.add(sale);
list.add(sale1);
list.add(sale2);
eg.printPDF(list);
public void printPDF(List list) {
Document document = new Document(PageSize.A4, 50, 50, 50, 50);
try
// creation of the different writers
PdfWriter writer = PdfWriter.getInstance(document, new FileOutputStream("iTextExample.pdf"));
// various fonts
BaseFont bf_helv = BaseFont.createFont(BaseFont.HELVETICA, "Cp1252", false);
BaseFont bf_times = BaseFont.createFont(BaseFont.TIMES_ROMAN, "Cp1252", false);
BaseFont bf_courier = BaseFont.createFont(BaseFont.COURIER, "Cp1252", false);
BaseFont bf_symbol = BaseFont.createFont(BaseFont.TIMES_ROMAN, "Cp1252", false);
// headers and footers must be added before the document is opened
HeaderFooter footer = new HeaderFooter(
new Phrase("This is page: ", new Font(bf_courier)), true);
footer.setBorder(Rectangle.NO_BORDER);
footer.setAlignment(Element.ALIGN_CENTER);
document.setFooter(footer);
HeaderFooter header = new HeaderFooter(
new Phrase("This is a header without a page number", new Font(bf_symbol)), false);
header.setAlignment(Element.ALIGN_CENTER);
document.setHeader(header);
document.open();
Image img = Image.getInstance("arrow-ff.gif");
img.setAlignment(Image.RIGHT | Image.TEXTWRAP);
Table goodTable = new Table(2);
Cell cell1 = new Cell(img);
goodTable.addCell(cell1);
document.add(goodTable);
Cell c = new Cell("Header");
c.setHeader(true);
goodTable.addCell(c);
Cell c1 = new Cell("Header1");
c1.setHeader(true);
goodTable.addCell(c1);
Cell c2 = new Cell("Header2");
c2.setHeader(true);
goodTable.addCell(c2);
goodTable.endHeaders();
int j=0;
while (j< list.size())
Sale sale = (Sale)list.get(j);
c = new Cell(sale.getOdrDate());
goodTable.addCell(c);
goodTable.addCell(sale.getRefNumber());
j++;
document.add(goodTable);
// add text at an absolute position
document.close();
} catch (Exception ex) {
System.err.println(ex.getMessage());
}
Maybe you are looking for
-
As of 5:30 pm yesterday my emails stopped coming in. When I open the account it shows I have 23 messages but nothing loads. I can still send messages and my internet connection is strong. How can I fix this?
-
How to make the layout as default in CM01
Hi All, In CM01, i created my own layout for the report. But everytime i need to go to Settings > Detailed Cap. List > Get List Version and select the layout. Is it possible to make the layout as default? Regards, Sureshbabu G.
-
Usage of group by function on oracle 8i
Is it possible to use a group by function in a query involving two tables say for example the emp table and the dept table .i tried the following query but it never worked.could some one clarify this.iam aware of CUBE and ROLLUP in 8i but i still wan
-
Ad hoc distribution / .mobileprovision error...?
Using the Ad hoc distribution / .mobileprovision capability (with the test users required UDID already added to our Apple Dev account) our test user is dragging the .mobileprovision file onto his iPad listed in iTunes but is getting this error messag
-
Revenue transferred from one WBS to Another
Hi , Is any realationship exists to check the revenue transferred and realted information from one WBS to another.WBS ? The main criteria is -From WBS to TO WBS for revenue transfer? Thanks Anil Kumar