joshua_8 0 Newbie Poster

Hi I having problems placing my two tables beside each other in my pdf. Here is my code

PdfPTable table3 = new PdfPTable(1);

PdfPCell cell9;

cell9 = new PdfPCell(new Phrase("Text"));


table3.addCell(cell9);

table3.setHorizontalAlignment(Element.ALIGN_RIGHT);


table3.setWidthPercentage(50);

document.add(table3);

PdfPTable table4 = new PdfPTable(1);

PdfPCell cell8;

cell8 = new PdfPCell(new Phrase("HI"));


table4.addCell(cell8);

table4.setHorizontalAlignment(Element.ALIGN_LEFT);


table4.setWidthPercentage(50);

document.add(table4); 
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.