Home | JSP | EJB | JDBC | Java Servlets | WAP  | Free JSP Hosting  | Spring Framework | Web Services | BioInformatics | Java Server Faces | Jboss 3.0 tutorial | Hibernate 3.0 | XML

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


 

Java Tutorials


 

 

Struts Tutorials

Struts Resources

Visit Forum! Post Questions!
Jobs At RoseIndia.net!

Java Itext Index

User Comments
Add This Tutorial To:
  Del.icio.us   Digg   Google   Spurl
  Blink   Furl   Simpy   Y! MyWeb 

Add This Tutorial To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 

Current Comments

12 comments so far (post your own) View All Comments Latest 10 Comments:

Hello,

How would we add a background image? watermark?

How can we add a border to the document? Around the entire document.

Is it possible to print multiple "chunks" on the same line. No line advancement.

Thank You, this has been VERY useful.

Ty Davis
Mobile, Al

Posted by Ty Davis on Thursday, 07.22.10 @ 22:57pm | #98369

Thanks for the free tutorials

Also, from my experience in real IT world - i think examples like - How to merge two PDFs (and how to modify the existing page numbers etc after merging the two), How to manipulate existing PDFs would be very helpful.

Thanks

Posted by Raj on Wednesday, 07.7.10 @ 20:36pm | #98030

can any body help me, how to create header while creating PDF thru itext .
and also how i can give page no at the footer of the each page.

Posted by karam singh on Sunday, 12.13.09 @ 12:39pm | #93329

Hi,
Is it possible to show the first page of a pdf file in Java swing GUI like image icon. I have more dynamic pdf files and I thought showing first page of pdf file in the same GUI will be usefull to select right file at first time.

Thanks,
Guna

Posted by Guna on Tuesday, 09.29.09 @ 15:26pm | #91296

u can create the PDF doC's using the iText software

Posted by kiran on Tuesday, 04.14.09 @ 10:40am | #86793

can any one please teel me how tocreate a pdf file in jsp, and by using which package......
thanks in advance

Posted by nellutla on Saturday, 04.11.09 @ 17:36pm | #86732

Hi,
This is a nicely compiled site with good examples.

I am looking for piece of code that would process an existing PDF Document, looks for cerrtain cells in the table and convert them as AcroForm Elements (Editable Textbox).

Thanks in advance,
Raj

Posted by Raj on Wednesday, 03.4.09 @ 13:38pm | #85487

Hi,

I want to set the background image to pdf doc,

is it possible?...any help is appriciated,

thanks in advance.

regards,

Sunil

Posted by Sunil on Tuesday, 09.23.08 @ 02:33am | #80614

Hi,
I'm trying to open up an existing .pdf file (not create a new one) and apply text to a particular area, say using x & y coordinates.
I'm looking for a simple example please.

Posted by Mike on Tuesday, 08.5.08 @ 00:27am | #70982

Hi,

the following is my code for setting a hyperlink to a cell in a table.

------------------ code starts ------------------

private static Table makeTableFromMap(final String firstColumnTitle, final String secondColumnTitle, final java.util.Map m){
Table tab = null;

try{
tab = new Table(2);
}
catch(BadElementException ex){
throw new RuntimeException(ex);
}

tab.setBorderWidth(1.0f);
tab.setPadding(1);
tab.setSpacing(0);

tab.addCell(new Cell(firstColumnTitle));
tab.addCell(new Cell(secondColumnTitle));

tab.endHeaders();

if (m.keySet().size() == 0){
Cell c = new Cell("none");
c.setColspan(2);
tab.addCell(c);
}
else{
Iterator iter = m.keySet().iterator();
while (iter.hasNext()){
String strName = (String) iter.next();
Object value = m.get(strName);
String strValue = null;
if (value == null){
strValue = "";
}
else if (value instanceof String[]){
String[] aValues = (String[]) value;
strValue = aValues[0];
}
/*else if(value instanceof Chunk){
Chunk chunkValue = (Chunk)value;
strValue = chunkValue.getContent();
}*/
else{
strValue = value.toString();
}
Cell nameCell = new Cell(strName);
Cell valueCell = new Cell(strValue);

if(strValue.length() > 40){
int span = strValue.length() % 40;
nameCell.setRowspan(span);
valueCell.setRowspan(span);
}
tab.addCell(nameCell);
tab.addCell(valueCell);
}
}
return tab;
}

--------------------- code ends -----------------

This first parameter is a name(String) and the second parameter is its value(String). Now, if the value is a URL which is more than 40 characters long, I need to ensure that the rowspan of both values is increased accordingly. However, in doing so, the hyperlink for the value String is also truncated. Hence, if the hyperlink was 48 characters, it is changed to 40 characters and the URL does not open. Something like, http://www.google.com gets changed to

http://www.gooo <---- the wrong hyperlink
gle.com

How do i ensure that even after rowspan, the entire URL is not affected?

TIA

Posted by Sumeet on Thursday, 06.5.08 @ 14:37pm | #62179

I would like to create a PDF file using JSP/Servlet getting data from the database.I am looking for examples.

Thanks

Posted by Matthews on Sunday, 03.2.08 @ 23:08pm | #51043

how can I build a list in a table cell?
List list = new List(false, 10);
Paragraph p1 = new Paragraph();
list.add(new ListItem("111"));
list.add(new ListItem("222"));
list.add(new ListItem("333"));
p1.add(list);
document.add(p1); // this works

PdfPTable table3 = new PdfPTable(1);
PdfPCell cell = new PdfPCell();
cell.addElement(p1);
table3.addCell(cell);
document.add(table3); // this doesn't work no list is generated, rather a long text.

Posted by alutat on Tuesday, 09.11.07 @ 15:32pm | #26750

Ask programming questions?

 

 

Back to Tutorial

 

  JDO Tutorials
  EAI Articles
  Struts Tutorials
  Java Tutorials
  Java Certification

Tell A Friend
Your Friend Name

 

 
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

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

Copyright 2007. All rights reserved.