  | Mailing List | | Home | | Forum Home | | JBoss - Java Application Server | | Tomcat - JSP/Servlet container | | Struts - A MVC web framework | | iText - An open source PDF Java Library | | JDOM - JDOM XML Parser | | J2EE - A mailing list for Java(tm) 2 Platform, Enterprise Edition | | J2EE Pattern - An interest list for Sun Java Center J2EE Pattern Catalog | | JSP - A mailing list about Java Server Pages specification and reference | | Servlet - A mailing list for discussion about Sun Microsystem's Java Servlet API Technology | |
Struts & Hibernate
|
|
|
  | | | why rowspan is disabled for PdfPCell | why rowspan is disabled for PdfPCell 2006-08-14 - By Michael Gantman
Back Hello.
I am working on creating pdf documents with iText. I need to support documents with tables that can contain cells that span over several rows. I noticed that PdfPCell doesn't have this functionality (it does have column span functionality). But class Cell supports such feature. Thus I am forced to use classes Table and Cell as opposed to PdfPTable and PdfPCell. Using those classes I am able to produce the documents that I need, but I am somewhat limited in the functionality. The same problem also prevents me from using HTMLWorker that converts HTML into PDF. The problem there is that HTNLWorker produces PdfPTable as a result of conversion and if my table in HTML has cells that span multiple rows I and up with messed up PDF doc. I understand that the feature of rowspan is not present in PdfPCell by design. (I saw in source code for Cell in method createPdfPCell()that it throws exception if cell has rowspan greater then 1). Why is it so? Is it easy to fix?
Best regards,
Michael Gantman
<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft -com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns="http: //www.w3.org/TR/REC-html40">
<head> <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii"> <meta name=Generator content="Microsoft Word 11 (filtered medium)"> <style> <!-- /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {margin:0in; margin-bottom:.0001pt; font-size:12.0pt; font-family:"Times New Roman";} a:link, span.MsoHyperlink {color:blue; text-decoration:underline;} a:visited, span.MsoHyperlinkFollowed {color:purple; text-decoration:underline;} code {font-family:"Courier New";} span.EmailStyle17 {mso-style-type:personal-compose; font-family:Arial; color:windowtext;} @(protected) Section1 {size:8.5in 11.0in; margin:1.0in 1.25in 1.0in 1.25in;} div.Section1 {page:Section1;} --> </style> <!--[if gte mso 9]><xml> <o:shapedefaults v:ext="edit" spidmax="1026" /> </xml><![endif]--><!--[if gte mso 9]><xml> <o:shapelayout v:ext="edit"> <o:idmap v:ext="edit" data="1" /> </o:shapelayout></xml><![endif]--> </head>
<body lang=EN-US link=blue vlink=purple>
<div class=Section1>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt; font-family:Arial'>Hello.<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt; font-family:Arial'>I am working on creating pdf documents with iText. I need to support documents with tables that can contain cells that span over several rows. I noticed that PdfPCell doesn’t have this functionality (it does have column span functionality). But class Cell supports such feature. Thus I am forced to use classes Table and Cell as opposed to PdfPTable and PdfPCell. Using those classes I am able to produce the documents that I need, but I am somewhat limited in the functionality. The same problem also prevents me from using HTMLWorker that converts HTML into PDF. The problem there is that HTNLWorker produces PdfPTable as a result of conversion and if my table in HTML has cells that span multiple rows I and up with messed up PDF doc. I understand that the feature of rowspan is not present in PdfPCell by design. (I saw in source code for Cell in method </span></font><code><b><font size=2 face="Courier New"><span style='font-size:10.0pt;font-weight:bold'>createPdfPCell</span></font></b>< /code><code><font size=2 face="Courier New"><span style='font-size:10.0pt'>()</span></font></code ><font size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'>that it throws exception if cell has rowspan greater then 1). Why is it so? Is it easy to fix?<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt; font-family:Arial'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt; font-family:Arial'>Best regards,<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt; font-family:Arial'>Michael Gantman<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt; font-family:Arial'><o:p> </o:p></span></font></p>
</div>
</body>
</html>
-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ----- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 __ ____ ____ ____ ____ ____ ____ ____ ____ ____ iText-questions mailing list iText-questions@(protected) https://lists.sourceforge.net/lists/listinfo/itext-questions
|
|
 |