Menu
  • HOME
  • TAGS

XMLWorker: cell's vertical-align not working

css,itextsharp,itext,xmlworker

You forgot to define the vertical alignment of the right cell. I have adapted your HTML (table4_css.html): <table> <tr> <td> <table border="1"> <tr><td>Blah</td></tr> <tr><td>Blah</td></tr> <tr><td>Blah</td></tr> </table> </td> <td valign="top"> <table border="1"> <tr><td>Blah</td></tr> <tr><td>Blah</td></tr> </table> </td> </tr> </table> You...

NoNewLineParagraph cannot be cast to Element

java,html,parsing,itext,xmlworker

Problem solved. It was caused by my itextpdf and xmlworker being slightly different versions. This and MANY other problems were solved by getting the exact same versions (5.5.5 in my case) of both dependencies. After 2 days of banging my head to the wall rigorously I cannot stress this enough:...

itext: Change font size of XMLWorker-parsed element

java,html,fonts,itext,xmlworker

I found at least one way to do it by getting the chunks out of each element and setting the font for that chunk. ie: Font f = new Font(); f.setSize(8); for (Element e : XMLWorkerHelper.parseToElementList(sisalto, null)) { for (Chunk c : e.getChunks()) { c.setFont(f); } cell.addElement(e); } table.addCell(cell); }...

iTextSharp XMLWorker Footer from html

c#,itextsharp,xmlworker

Ok, I figured this out, first - I need to completely resigned from ParseXHtml function. I used standard XMLWorker with this pipeline: PdfWriterPipeline pdf = new ElementHandlerPipeline(handler, null) Instead of default one: PdfWriterPipeline pdf = new PdfWriterPipeline(document, writer); Then I was able to iterate through elements in handler foreach (var...

iText's XmlWorker does not recognize border-bottom on table cell

itextsharp,itext,xmlworker,mvcrazortopdf

XMLWorker does not support for shorthand CSS properties in case side specific border styles. The global property "border" should be supported. It looks like a typo in the conformance list. Please use the property full names instead: <td style="... border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: gray" ...>

itext xmlworker with javafx htmleditor

java,javafx-2,pdf-generation,itext,xmlworker

Ah it seems that it has to do something with using an older iText version. I've updated to iText 5.5.0 and it seems to work now. I still had to remove any <br> and <hr> tags thou. //using iText 5.5.0 and XMLWorker 5.5.0 @FXML private HTMLEditor htmlEditor; @FXML private void...

Center a table horizontally with iText's XMLWorker

itext,xmlworker

As explained in the comment section, this isn't supported yet in XML Worker. We'll add it to the next release. If you can't wait until the next release, please apply this patch: diff --git a/src/main/java/com/itextpdf/tool/xml/html/table/Table.java b/src/main/java/com/itextpdf/tool/xml/html/table/Table.java index 541818bfc9..e262b4a406 100644 --- a/src/main/java/com/itextpdf/tool/xml/html/table/Table.java +++ b/src/main/java/com/itextpdf/tool/xml/html/table/Table.java @@ -165,6 +165,19 @@ public class Table...

Generating PDF from a third-party HTML on java

java,itext,flying-saucer,xmlworker

You can first parse HTML file by jsoup and then convert content to a standard HTML file, finally you can use iText to generate PDF

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

Please take a look at the ParseHtml10 example. In this example, we have take the file hebrew.html: <html> <head> <title>Hebrew text</title> </head> <body style="font-size:12.0pt; font-family:Arial"> <div dir="rtl" style="font-family: Noto Sans Hebrew">שלום עולם</div> </body> </html> And we convert it to PDF using this code: public void createPdf(String file) throws IOException, DocumentException...

exception during convert html to pdf using itext

java,pdf,itext,xmlworker

It seems versions of these jars are not compatible with each other. Try below versions and let us know xmlworker-5.4.5.jar, itextpdf-5.4.5.jar

NoSuchMethodError: com.itextpdf.tool.xml.xtra.xfa.js.RhinoJsNodeList.getLength()J at com.itextpdf.tool.xml.xtra.xfa.js.RhinoJsNodeList.append

coldfusion,itext,xmlworker

I've seen this problem before in the following context. Suppose that you have an application A with a dependency on library B. You have two jars: A-1.0.jar and B-1.0.jar. A-1.0.jar is compiled using B-1.0.jar. In version 1.0 of library B, there is a method foo() that returns void: public void...

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

html,pdf,itext,screen-readers,xmlworker

Please take a look at the ParseHeaders example. It takes the headers.html page with headers from <h1> to <h2> and converts it to headers.pdf: In your question, you claim that everything is working perfectly except heading levels (h1-h6), but you don't explain what isn't working. Please elaborate. As shown in...

Why is my PDF being generated as blank?

c#,pdf,itextsharp,xmlworker

When I run your HTML through my code, I do get an exception, because there's one sneaky error in your HTML. The first table doesn't have a closing tag: it says <table> instead of </table>. That's easily overlooked. You can find the corrected HTML here: table10.html This is what the...

HTML to PDF Conversion of Arabic Text from Itext 5.5 and XMLWorker

java,html,pdf,itext,xmlworker

I have same issue, just difference is that i have used Turkish font and that are missing:- please see my answer solution for this Hope helps you Regards,...

Export Panel Content to PDF not working

c#,asp.net,c#-4.0,itextsharp,xmlworker

try this way protected void pdfExport_Click(object sender, EventArgs e) { Response.ContentType = "application/pdf"; Response.AddHeader("content-disposition", "attachment;filename=AgentReport.pdf"); Response.Cache.SetCacheability(HttpCacheability.NoCache); StringWriter sw = new StringWriter(); HtmlTextWriter hw = new HtmlTextWriter(sw); pnl_export.RenderControl(hw); StringReader sr = new StringReader(sw.ToString()); Document pdfDoc = new Document(PageSize.A4, 10f, 10f, 100f, 0f); HTMLWorker htmlparser = new HTMLWorker(pdfDoc);...