FAQ Database Discussion Community


XMLWorker: cell's vertical-align not working

css,itextsharp,itext,xmlworker
If you check this code: <table> <tr> <td border="1"> <table> <tr><td>Blah</td></tr> <tr><td>Blah</td></tr> <tr><td>Blah</td></tr> </table> </td> <td border="1"> <table> <tr><td>Blah</td></tr> <tr><td>Blah</td></tr> </table> </td> </tr> </table> In here: http://demo.itextsupport.com/xmlworker/ You will see this: But if you click on "transform"...

itext: Change font size of XMLWorker-parsed element

java,html,fonts,itext,xmlworker
I'm adding Elements from an ElementList to a PdfPCell. These elements can be anything from simple text phrases to bulletpoint lists. However, the font with which these elements are printed to the pdf is too big size. So, my question is: How to adjust the default font size for elements...

Center a table horizontally with iText's XMLWorker

itext,xmlworker
I've tried centering a table in two ways: Attempt 1 code: <h1>Attempt 1</h1> <table style="width: 50%; margin: 0 auto;"> <tr> <th>foo</th> <td>bar</td> </tr> <tr> <th>foo</th> <td>bar</td> </tr> </table> Attempt 2 code: <h1>Attempt 2</h1> <table style="width: 50%;" align="center"> <tr> <th>foo</th> <td>bar</td> </tr> <tr> <th>foo</th> <td>bar</td> </tr>...

Can't set RTL direction for Hebrew letters while converting from *.xhtml to *.pdf by using iText library

java,itext,right-to-left,hebrew,xmlworker
I'm trying to convert *.xhtml with Hebrew characters (UTF-8) to PDF by using iText library but I getting all letter in reverse order. As far I understand from this question I can set RTL only for ColumnText and PdfCell objects: Arabic (and Hebrew) can only be rendered correctly in the...

iText -PDF reading issue on heading levels ( h1 - h6 )

html,pdf,itext,screen-readers,xmlworker
Generated PDF by iText-XMLWorker 5.5.4. Everything is reading perfectly except heading levels (h1-h6) in screen reader. Below code works fine on browsers but not in PDF. <section> <h1>heading 1</h1> <h2>heading 2 </h2> <h3>heading 3 </h3> <h4>heading 4 </h4> </section> ...

NoNewLineParagraph cannot be cast to Element

java,html,parsing,itext,xmlworker
I'm following the itextpdf example http://itextpdf.com/sandbox/htmlworker/HtmlContentForCell. I have the following code: // Relevant code from main part of the class: ByteArrayOutputStream baos = new ByteArrayOutputStream(); Document document = new Document(PageSize.A4, 40, 40, 40, 40); PdfWriter writer = PdfWriter.getInstance(document, baos); document.open(); document.add(buildContent()); document.close(); // method that should provide content to the...

Why is my PDF being generated as blank?

c#,pdf,itextsharp,xmlworker
I am using ItextSharp and c#, asp.net MVC to generate a PDF report. However, when I generate the report the PDF comes back as blank (apart from a header which is working fine). I would love your input. The code that generates the report is as follows: using (var writer...