Home | Ajax | BioInformatics | Dojo | EAI | EJB | Hibernate | J2ME | Java | Java Glossary | Java Servlets | JavaScript | Jboss | JDBC | JDO | Jmeter | JSF | JSP | JUnit | Maven | MySQL | Spring Framework | SQL | Struts | Technology | WAP | Web Services | XML


 
  
 
Programming Tutorials: Ajax | Articles | JSP | Bioinformatics | Database | Free Books | Hibernate | J2EE | J2ME | Java | JavaScript | JDBC | JMS | Linux | MS Technology | PHP | RMI | Web-Services | Servlets | Struts | UML
 

 
Facing Programming Problem?
Ask Questions?, Browse Latest Questions, Question-Answer Guidelines
Java
  JDO Tutorials
  EAI Articles
  Struts Tutorials
  Java Tutorials
  Java Certification
  Java Applet
Questions
Comments

Symbol Substitution     

                         

In this example , we are going to explain how we can make symbols using iText api,s. We are using integer values which will  converted it into symbol. For this we just convert the integer value into its character value.

Code Description:

In this example we  convents the integer values from 33 to 255 and 913 to 969 into character by using explicit casting  of integer values to character values. We use add(Phrase.getInstance(String s)) method to add the values into the document. 

The code of the program is given below:

import java.io.FileOutputStream;
import java.io.IOException;
import com.lowagie.text.Document;
import com.lowagie.text.DocumentException;
import com.lowagie.text.Phrase;
import com.lowagie.text.pdf.PdfWriter;
import com.lowagie.text.Paragraph;
public class SymbolSubstitution {
  public static void main(String[] argsthrows Exception
               {
    System.out.println("Symbol Substitution");
    Document document = new Document();
      PdfWriter.getInstance(document,new
 FileOutputStream
("SymbolSubstitution.pdf"));
      document.open();
      document.add(new Paragraph("The values and its
 symboles are given below:"
));
      for (int i = 33; i < 255; i++) {
      document.add(Phrase.getInstance(" " + i + ": " (chari));
                 
      for (int i = 913; i < 969; i++) {
      document.add(Phrase.getInstance(" " + i + ": " (chari));
                    }
    document.close();
  }
}

The output of the program is given below:

Download this example.

 

                         

Leave your comment:

Name:

Email:

URL:

Title:

Comments:


Enter Code:

Audio Version
Reload Image
 

Note: Emails will not be visible or used in any way, and are not required. Please keep comments relevant. Any content deemed inappropriate or offensive may be edited and/or deleted.

No HTML code is allowed. Line breaks will be converted automatically. URLs will be auto-linked. Please use BBCode to format your text.

Add This Tutorial To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Latest Searches:
User Registeration pag
how to upload image ur
Java Security A three-
core java
draw circle in C
hast table
csv reader
FileInputStream
count the numbet of di
å???å????å????å???å???
sะà¸?ั?ยà¸?ะà¸
line break in javascri
break?ะ�ะ???????
iterator.next
check character/str.ph
interface
Configure jstl in web.
Two Dimensional Array
enterprise portal
add two numbers in jav
major
spring portlet
input two numbers thro
sax tutorial
popup window
Linux Caixa MаÐ??аÐ?
Checking
desicont
highlighting and dehig
ASP EXAMPLE' and char(
how to get applicate s
jndi example
sleep
how to create to drop
log4j
PHP Date and .....:/pw
PHP Date and .....:/pw
servlets container
logout in jsp
array java
Insert Data into Datab
Javascript Randomizing
insert column
JDBC and Mysql
CMP
gwt ext tree structure
Treemap using gwt tree
shapes in applet
Photoshop Basics Draw
Java code for media pl
paramters
list in java
http get example
é???é????é????é???é???
form capture
input in array
Dreamweaver Behaviors
jdk-1.4.2
String to array in jav
breaké??å?¤?é?????é??å
changehashtablevalue
line break in javascri
two dimensional array
utility of collections
map iteration in jstl
redirect
hashmap
how to increase the er
c tutorial
how to edit a any file
calling one jsp p
code for select date a
Generics
read a file
ะà¸??ะà¸
extract
close a frame
Move cursor to upper l
how to increase the er
jsf comments
Java String toLowerCase Example
Java String toCharArray Example
Java String substring Example
Java String indexOf Example
Java String startsWith Example
Java String hashCode Example
Java String matches Example
Java String length Example
Java String lastIndexOf Example
Java String isEmpty Example
Java String equalsIgnoreCase Example
Java String equals Example
Java String endsWith Example
Java String copyValueOf Example
Java String contentEquals Example
  EAI Articles
  Java Certification
Tell A Friend
Your Friend Name
Search Tutorials

 

 
 
Browse all Java Tutorials
Java JSP Struts Servlets Hibernate XML
Ajax JDBC EJB MySQL JavaScript JSF
Maven2 Tutorial JEE5 Tutorial Java Threading Tutorial Photoshop Tutorials Linux Technology
Technology Revolutions Eclipse Spring Tutorial Bioinformatics Tutorials Tools SQL
 

Home | JSP | EJB | JDBC | Java Servlets | WAP  | Free JSP Hosting  | Search Engine | News Archive | Jboss 3.0 tutorial | Free Linux CD's | Forum | Blogs

About Us | Advertising On RoseIndia.net  | Site Map

India News

Indian Software Development Company | iPhone Development Company in India | Java Training Delhi | Java Training at Noida |

Send your comments, Suggestions or Queries regarding this site at roseindia_net@yahoo.com.

Copyright © 2008. All rights reserved.