Home Answers Viewqa JSP-Servlet how to add the two tables in same row when generating pdf file from jsp

 
 


pradeep
how to add the two tables in same row when generating pdf file from jsp
1 Answer(s)      3 years and 4 months ago
Posted in : JSP-Servlet

How to add the two tables in same row one is left side and other is right side please help me.

View Answers

February 22, 2010 at 5:29 PM


Hi Friend,

Try the following code:

<%@page import="java.io.*"%>
<%@page import=" com.lowagie.text.*"%>
<%@page import=" com.lowagie.text.pdf.*"%>
<%@page import=" java.awt.*"%>
<%
Document document=new Document();
PdfWriter.getInstance(document,new FileOutputStream("C:/tablePDF.pdf"));
document.open();
PdfPTable table=new PdfPTable(2);

PdfPTable table1=new PdfPTable(1);
table1.addCell ("Roseindia");

PdfPTable table2=new PdfPTable(1);
table2.addCell ("Delhi");

table.addCell(table1);
table.addCell(table2);

document.add(table);
document.close();
%>

Thanks









Related Pages:
how to add the two tables in same row when generating pdf file from jsp - JSP-Servlet
how to add the two tables in same row when generating pdf file from jsp  How to add the two tables in same row one is left side and other is right side please help me.   Hi Friend, Try the following code
how to add the scrollbar to the pdf page when generating the pdf file from jsp - JSP-Servlet
how to add the scrollbar to the pdf page when generating the pdf file from jsp  I am not able to see all the columns when i generated the pdf file from jsp.i have 12 colums so how to add the scrollbar
How to set the pdfptable as pdf page header when generating the pdf from jsp page. - JSP-Servlet
How to set the pdfptable as pdf page header when generating the pdf from jsp page.  how to set the pdfptable column headers as a header of the documet.i need to display the column headers for every pdf page if pdf documt is 20
how to set the image and address in single row when genearting pdf fil from jsp - JSP-Servlet
how to set the image and address in single row when genearting pdf fil from jsp  i need to set the image is left side and right side is address when genrating the pdf file from jsp  Hi Friend, Try the following code
add same tables in jsp page
add same tables in jsp page  hi I have a table in my jsp page with data, now I want to add same copy of table without its default value in same page whenever I click add more table, how do I do
How to add two calendars on the same html page
How to add two calendars on the same html page  I have used the same...-calendar.shtml for implementing calendar for my project.and the code is working fine when i use single calendar for a single html page.but while implementing two calendars
The type Font is ambiguous where generating pdf file from jsp page - JSP-Servlet
The type Font is ambiguous where generating pdf file from jsp page  I am geeting ambiguous error .Do u want to add any jar files   Hi Friend, Import the class Font into your JSP page like the following
pdf tables
pdf tables       In this program we are going to tell you how we can make a table in a pdf... fine, otherwise a pdf file will be created.  To make a program over
Concatenate two pdf files
where we copy two pdf files. add the two pdf into copy object by using...Concatenate two pdf files       In this program we are going to concatenate two pdf files
openning the pdf or doc file in same jsp
openning the pdf or doc file in same jsp   **how to open the pdf and doc file in same jsp after clicking the link or button (which is with out moving to the next page). will some body help me on this @simple format please
open pdf file in same jsp page and the pdf file should retrieved from database
open pdf file in same jsp page and the pdf file should retrieved from database  Hai all, I need code to open a pdf file in same jsp page(browser) while click on hyperlink And the file was located in database table. Can any
Generating PDF reports - JSP-Servlet
Generating PDF reports  Hello everyone i have submitted several... Question I am try to generate a pdf report using jsp .... i want to export.../itext/helloServletPDF.shtml http://www.roseindia.net/jsp/file_upload
search in Two Tables to Find data and view by jsp
search in Two Tables to Find data and view by jsp  hi i want search in Two Tables to Find data and view by jsp <%@page import...; Have a look at the following link: JSP search using two tables   
how to get values for same column name from two different tables in SQL
how to get values for same column name from two different tables in SQL  how to get values for same column name from two different tables in SQL???? column name is emp_id loacated in these two tables company,employee
The type Font is ambiguous where generating pdf file from jsp page - JSP-Servlet
The type Font is ambiguous where generating pdf file from jsp page  i am getting the type font is ambiguous and type imgae ambiguous ? document.open(); 32: Font headFont = FontFactory.getFont(FontFactory.HELVETICA
pdf file is having the 0 KB when generate the pdf file from jsp - JSP-Servlet
pdf file is having the 0 KB when generate the pdf file from jsp  Hi Friend, I am getting OKB pdf file .if i inserting the image into pdf file , i am getting the OKB pdf file now and also not able to open the pdf
pdf generate from jsp
pdf generate from jsp  how do i generate a pdf using jsp that should query the data from the database and write it into a pdf and download the same
how to generate the pdf report from jsp
want to generate the pdf file from jsp page.I add the itext.jar to the libraries...how to generate the pdf report from jsp  <%@page import... not getting the pdf file.Any one please help me asap.Its very important
ADD ROW - JSP-Servlet
ADD ROW  Hi Sir, How to use add row and delete row concept in jsp .  Hi Friend, Please visit the following link: http://www.roseindia.net/jsp/add-element.shtml Thanks
how to get the image path when inserting the image into pdf file in jsp - JSP-Servlet
how to get the image path when inserting the image into pdf file in jsp  Hi Friend, my image path;C:/images/photo.jpg. i am getting the below...: Thanks  I am getting the same problem. error is coming
Struts PDF Generating Example
in struts How to insert image in PDF file in struts2 How to set pdf...Struts PDF Generating Example To generate a PDF in struts you need to use...;/param> </result> An example of PDF Generating is given below
Add text into the pdf File - Development process
Add text into the pdf File  Hi friend, How can i insert or Add text into the pdf file from the exsting one in java.. Thanks in Advance...  Hi Friend, Please visit the following links: http
how to generate the pdf file with scroolbar from jsp age - JSP-Servlet
how to generate the pdf file with scroolbar from jsp age  How to generate the pdf file with scroolbar from jsp.i am not able to see the all the columns in pdf file now .it is very urgent for me plz help
Joins tables in jsp
Joins tables in jsp       When we want to select data from two or more tables... are two tables and result will be from both tables on the basis of 'ID' which
Delete and add row from Table View iPhone
Delete and add row from Table View iPhone In this tutorial will learn how to delete and also how to add row into the table view iPhone, with the help of edit button on navigation bar. When we press Edit button it will show you ADD
Join the two tables in sql
Join the two tables in sql  How to join the two tables in SQL ..and return the value from common column in SQL Database
display multiple image file or pdf file in multiple column of a row from server or database
display multiple image file or pdf file in multiple column of a row from server... in a single row..Suppose I have to display two files in a row then after uploading more files then uploaded file should be display again tow file in another row
Java convert jtable data to pdf file
Java convert jtable data to pdf file In this tutorial, you will learn how to convert jtable data to pdf file. Here is an example where we have created... have fetched the data from the jtable and save the data to pdf file. Example
how read data from doc file in same formate in jsp
how read data from doc file in same formate in jsp  how we can read and display data on jsp page, from doc file with the same formatting
how to retrieve data from multiple tables in jsp using javabeans
how to retrieve data from multiple tables in jsp using javabeans   ... for retrieving data fromm two tables : first table having fields: bookid,name...).second .java file for getting data from second table- package pack; public
how to retrieve data from multiple tables in jsp using javabeans
how to retrieve data from multiple tables in jsp using javabeans   ... for retrieving data fromm two tables : first table having fields: bookid,name...).second .java file for getting data from second table- package pack; public
how to retrieve data from multiple tables in jsp using javabeans
how to retrieve data from multiple tables in jsp using javabeans   ... for retrieving data fromm two tables : first table having fields: bookid,name...).second .java file for getting data from second table- package pack; public
reading a csv file from a particular row
reading a csv file from a particular row  how to read a csv file from a particular row and storing data to sql server by using jsp servlet
i am getting the problem when i am downloading the pdf file from oracle 10g database - Struts
i am getting the problem when i am downloading the pdf file from oracle 10g database  if i created the pdf file from pdf machine,it is storing into datbase and download the pdf file from database. but when i created the pdf file
generate pdf using jsp
generate pdf using jsp  how do i generate a pdf using jsp that should query the data from the database and write it into a pdf and download the same
how to get the image path when inserting the image into pdf file in jsp - JSP-Servlet
how to get the image path when inserting the image into pdf file in jsp  I am using the below code but i am getting the error at .getInstance. i am using the itext.jar now.Plz help to me <% Document document=new
Displaying checked checkbox in same page as well as print on another page ....also add next pages cheches checkbox into previous list
to link to different jsp pages. Suppose it contains two links with two different jsp pages. Both jsp pages contains differents database tables, n it contains same checkboxes. So, from your above code, i can display selected checkbox on same
sql query to get data from two tables
sql query to get data from two tables  how can i get the data from two different tables?   Hi Friend, Please visit the following link: JOIN Query Simple Query Thanks
SQL Server row comparison using two tables
SQL Server row comparison using two tables  insertion process are completed in table1.string comparison using table2 to table1 if any changes in these tables and then upadated
display the hidden text from that row, when onclick on a row of 1- 10
display the hidden text from that row, when onclick on a row of 1- 10  Using JSP: I'm displaying a set of values from the databse in a table rows (1 to 10)in jsp page, when onclick on one of the view row, it has to submit
Join tables in the specific database
and tables in a database. Now to retrieve a particular row from a table... two or more tables in a specific database. For this you need to have two or more table in the database. If two or more tables are available in the database
PDF Comparator
the difference of the pdf file by changing its background color, and when we place... with the same contents as of first pdf file ,bt it should highlight the difference... in another folder. Both folders should contain the same no. of pdf files with same
Five-in-a-row
Java: Example - Five-in-a-row Two players alternate making moves. The player who places five pieces in a row wins. The source program consists... // Five.java - main program for Five-In-A-Row Program import javax.swing.JFrame
write data to a pdf file when i run jsp page
write data to a pdf file when i run jsp page  Hi, <%@page import... to the libraries.the pdf file are not opened when i execute the program.please send the code to open the pdf file when i execute the jsp page
write data to a pdf file when i run jsp page
write data to a pdf file when i run jsp page  Hi, <%@page import... to the libraries.the pdf file are not opened when i execute the program.please send the code to open the pdf file when i execute the jsp page
write data to a pdf file when i run jsp page
write data to a pdf file when i run jsp page  Hi, <%@page import... to the libraries.the pdf file are not opened when i execute the program.please send the code to open the pdf file when i execute the jsp page
write data to a pdf file when i run jsp page
write data to a pdf file when i run jsp page  Hi, <%@page import... to the libraries.the pdf file are not opened when i execute the program.please send the code to open the pdf file when i execute the jsp page
How to access the image file from project folder itself while writing to pdf using itext?
How to access the image file from project folder itself while writing to pdf using itext?  I am writing a pdf using itext where i add a image in the beginning of the document. When i use image = Image.getInstance("C
delete row
delete row  how to delete row using checkbox and button in php...("sourabh", $link); $rows=mysql_query("select * from sonu"); $row=mysql... of table. When the user selects the particular checkbox, that row will get deleted
How to adjust a size of a pdf file
How to adjust a size of a pdf file   ...*, and com.lowagie.text.*. These two package will help us to make and use pdf file in our program... adjust the size of a pdf file irrespective of the fact whether it exists