Examples of iText

In this section, you will see many types of example to iText.

Examples of iText

In this section, you will see many types of example to iText.

Examples of iText

Examples of iText

     

  1. Write Hello in the pdf file
    In this program we are going to tell you how you can write a "Hello" word in a pdf file irrespective of the fact whether it exists or not.
     
  2. How to adjust a size of a pdf file
    In this program we are going to tell you how we can adjust the size of a pdf file irrespective of the fact whether it exists or not. If it exists then its fine, otherwise a pdf file will be created.   
      
  3. A4 size
    In this program we are going to tell you how we can automatically assign the right values for a A4 size to the document instance. Its options are from A0 to A10.  
      
  4. pdf default size
    In this program we are going to tell you how we can automatically set the default size of pdf. Its options are from A0 to A10. These text explains the ISO 216 paper size system and the ideas behind its design.
     
  5. Inserting image in the pdf file
    In this program we are going to tell you how we can insert a image in a pdf file irrespective of the fact whether it exists or not. If it exists, fine otherwise it will get automatically created. 
      
  6. How to wrap image in the pdf file
    In this program we are going to tell you how we can insert a image  and wrap it according to your own style in a pdf file irrespective of the fact whether it exists or not. If it exists, fine otherwise it will get automatically created.
     
  7. How to make a Rectangle type pdf
    In this program we are going to tell you how we can make a pdf file in the rectangle shape irrespective of the fact whether it exists or not. If it exists then its fine, otherwise a pdf file will be created. 
     
  8. pdf background color
    In this program we are going to tell you how we can change the background of the pdf file as well as the size of a pdf file irrespective of the fact whether it exists or not. If it exists then its fine, otherwise a pdf file will be created.
        
  9. pdf tables
    In this program we are going to tell you how we can make a table in a pdf file irrespective of the fact whether it exists or not. If it exists then its fine, otherwise a pdf file will be created. 
      
  10. pdf Table title
    In this program we are going to tell you how the title will be given to the table of the pdf file. Suppose we have one pdf file in which we have a table and we want to give a title to it.
      
  11. pdf section
    In this program we are going to tell you how you can divide a pdf file into sections irrespective of the fact whether it exists or not.
      
  12. pdf chapter
    As we all have seen a pdf file, in the pdf file there are too many chapter. Do you want to make them by your own. In this program we are going to tell you how you can make different chapters in pdf file irrespective of the fact whether it exists or not.
        
  13. pdf list
    In this program we are going to know how we can make a list in a pdf file irrespective of the fact whether it exists or not.
        
  14. itext chunk
    In this free tutorial we are going to tell you about chunk in iTextiText is a framework for creating pdf files in java. A Chunk is the smallest significant part of the text that can be added to a document. 
      
  15. combine two pdf files
    In this program we are going to tell you how you can read a pdf file and combine more than one pdf into one. 
      
  16. hello world pdf
    In this program we are going to tell you how you can write a simple "Hello World" word in a pdf
    , rtf and html file irrespective of the fact whether it exists or not.
      
  17. How to write hello world by using multiple writers in pdf
    To make a program over this, firstly we need to import some packages. Remember to make this program the first and foremost thing to remember is to place the iText.jar in WEB-INF/lib of your web application.
      
  18. pdf system
    In this example we are going to see how the data which we have in the pdf file will be printed on the command prompt.
     
  19. pdf landscape
    In this free tutorial we are going to tell you about landscape portrait in iTextiText is a framework for creating pdf files in java. In this tutorial you will know more about the landscape portrait. 
     
  20. pdf margin
    In this example we are going to see how we can give a margin to our pdf file. Margin gives the file good look and feel. After going through this example you will be able to give the margins to your own made pdf file.  
      
  21. pdf Metadata
    In this program we are going to know what is metadata in pdf. Metadata is data about something, whether it is an object, person, or any other data.
      
  22. itext version 
    In this program we are going to find the version of iText jar file which we are using to make a pdf file through java program.
      
  23. pdf file measurement
    In this program we are going to display the measurement of pdf   pages   through java program.The values are added into paragraphs
    and added into the documents. These values are stored in pdf file.
     

  24. Insert pages pdf
    In this program we are going to insert new blank pages in pdf  file  through java program
     
  25. Changing PDF Version 
    In this program we are going to change  the version of pdf file  through java program.
       
       
  26. Concatenate two Pdf Files 
    In this program we are going to concatenate pdf files into a  pdf files through java program. The all data of files  are concatenated into
    destination pdf. You can concentrate two  into a single file. 
     
  27. Concatenate More Than two Pdf Files
    In this program we are going to concatenate more than two pdf files into a destination pdf files through java program. The all data of all files  are  concatenated into destination pdf. You can concentrate two or more file into a single file.
      
  28. Rotating image in the pdf file
    I
    n this program we are going to tell you how we can insert a image  and rotate it according to your own style in a pdf file irrespective of the fact whether it exists or not. 
       
  29. Hello Word " on PDF,RTF and HTML format
    In this program we are going to tell you how we can create three file rtf,pdf and html files.And we are printing here Hello Word on PDF, HTML, And RTF format.
      
  30. Adding Under Lines 
    In this program we are going to tell you how you can add underlines. You can  any number of lines. This example gives you an idea ,how to make a java program to add a underline and you can also make program for making line on the text.
      
  31. Changing Background Color
    In this program, we are going to tell you how you can change background color of a pdf file. You can change the background color of any chunk with the help of setBackground(Color color).
      
  32. Changing Chunk Color
    In this program we are going to tell you how you can change the color of chunk color .This example tell you how you can change the color of chunk and how you can add fonts and gives the size of the fonts.
      
  33. Creating Multiple lines
    iText API,s provides facility to  make the lines. In this program we are going to tell you how you can makes single  lines and how you can make multiple lines into the pdf files. You can make multiple lines and also make  colorful lines by using this example.
      
  34. Creating Multiple Lists 
    In this program we are going to tell you how you can make lists into a pdf files. You can make lists and also make  sublist You can make ordered list or symbolic list. iText API,s  provides facility to make list. List may be ordered  or list may be unordered. Depending on our requirement we can create both types of list. We can add a symbols as list.
       
  35. Using Different Fonts 
    In this program, we are going to give example of ,how you can use different font. You can add different font in the paragraph. We pass two parameters into the paragraph. First one is chunk text and second is font.
      
  36. Use Of Font Selector 
    In this section ,you will learn how to use FontSelector. That means if you want to keep some text in different font like  "Times TIMES_ROMAN", "ZAPFDINGBATS" etc. particularly.
      
  37. How You Can Use Phrase
    In this section, you will learn how to design some text according to our need by use of Phrase. We can format our pdf by using Phrase() constructor. We can add the text, Chunk and set the font size , name and style of the font.
      
  38. End of Line
    In this section, you will learn how to make a program by which you can define the strokeWidth and strokeColor.You can learn also to change the outline of the text. You can define the width and the color of the strokes used to draw the character. iText api provides a method setTextRenderMode(int mode,float strokeWidth,Color strokeColor). 
       
  39. Rendering
    In this section, you will learn how to make a program by which you can make a render page. iText api provides a method setTextRenderMode(int mode,float strokeWidth,Color strokeColor).We can gives various color and int mode.
       
  40. Skewing
    In this section, you will learn how to make a program by which you can set skew in for chunk. iText api provides a method setSkew(float value1,float value2).This method is used in palce of italic font.
       
  41. Creating superscript and subscript 
      In this section, you will learn how we can create  the subscript and superscript.  iText api provides a setTextrise(float value1) method to set the position of text. We can set  float value as positive or negative .Positive value is used for  Superscript and negative value used for subscript.
      
  42. Uses Of chunk Object
    In this section, you will learn how we can change the background color  and how we can create  the subscript and superscript.  iText api provides a setTextrise(float value1) and setBackground(Color  color) method to set the position of text and to set the background. We can set  float value as positive or negative .Positive value is used for  Superscript and negative value used for subscript.  
      
  43. Measure Of Width
    In this section, you will learn how we can measure the width of the page.  iText api provides a getWidthPoint() to know the width of the page. The width will be in centimeters or inches
       .
  44. Negative Leading 
    In negative leading  you will learn how we can overlap a text using negative and positive leading values in  Phrase constructor. You can make shadow of any text. For this you have just change the values of  the leading in Phrase constructor and the text.
     
  45. Making Paragraph And Set Alignment 
    In this example , we are going to explain how we can make paragraph and how we can gives various alignment. To make a paragraph we use Paragraph("Text") constructor . To gives alignment we use setAlignment(int alignment).
      
  46. Set Space Ratio And Alignment
    In this example , we are going to explain how we can set space ratio and how we can gives various alignment. You can make pdf with no space between the characters of a word .

      
  47. 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.
     
  48. Add Content of an iText PDF File using java code
    In many applications there is a need to generate pdf file dynamically. The iText library can be used to generate PDF documents from Java program.
      

Back To Java Home.