itext

Java/iText/Flying Saucer: Convert HTML containing svg tags to pdf

给你一囗甜甜゛ 提交于 2019-12-23 12:08:30
问题 I'm trying to generate a pdf file in Java from HTML. The HTML code contains a svg tag that was generated by Google Charts API to display a column chart. I tried to do it with Flying Saucer R8 like so: StringBuffer sb = new StringBuffer(); sb.append("<div id='chartArea'><svg width='830' height='400'><defs id='defs'><clipPath id='_ABSTRACT_RENDERER_ID_0'><rect x='45' y='77' width='560' height='247'/></clipPath></defs><rect x='0' y='0' width='830' height='400' stroke='none' stroke-width='0' fill

iText HTML header and footer dimensions

烈酒焚心 提交于 2019-12-23 06:21:11
问题 I'm looking at the sample : http://developers.itextpdf.com/question/how-add-html-headers-and-footers-page but in the onEndPage method @Override public void onEndPage(PdfWriter writer, Document document) { try { ColumnText ct = new ColumnText(writer.getDirectContent()); ct.setSimpleColumn(new Rectangle(36, 832, 559, 810)); for (Element e : header) { ct.addElement(e); } ct.go(); ct.setSimpleColumn(new Rectangle(36, 10, 559, 32)); for (Element e : footer) { ct.addElement(e); } ct.go(); } catch

Can I remove text objects from an existing PDF and output to a new PDF using iTextSharp?

风流意气都作罢 提交于 2019-12-23 06:13:15
问题 This question is another version of my old question: I want to get all objects except text object as an image from PDF using iTextSharp Original question I am developing a program to convert PDF to PPTX for specific reasons using iTextSharp. What I've done so far is to get all text objects and image objects and locations. But I'm feeling difficult to get vector drawings without texts (like tables). Actually it would be better if I can get them as images. My plan is to merge all objects except

Using pdfclown few search keywords are not highlighting in chinese/japanese documents

a 夏天 提交于 2019-12-23 06:13:14
问题 Iam facing issue with some of the search keywords are not highlighting in chinese documents .Due to confidiential concerns iam not providing actual pdf . search keywords are 1)亿元或2) 收入亿来源 Please find the pdf document path which i tested ,pdfpath link. and ActualResult link .I have already posted related to this issue in following Link but some of the keywords are not highlighting properly in few chinese documents.Kindly provide your inputs to highlight the search keywords which i mentioned.

Can I remove text objects from an existing PDF and output to a new PDF using iTextSharp?

两盒软妹~` 提交于 2019-12-23 06:12:07
问题 This question is another version of my old question: I want to get all objects except text object as an image from PDF using iTextSharp Original question I am developing a program to convert PDF to PPTX for specific reasons using iTextSharp. What I've done so far is to get all text objects and image objects and locations. But I'm feeling difficult to get vector drawings without texts (like tables). Actually it would be better if I can get them as images. My plan is to merge all objects except

Verify/Add PDF Signatures with iText7

a 夏天 提交于 2019-12-23 06:01:42
问题 I need to port a Java program that used iText5 for PDF signature verification/creation to iText7. The old code obviously does not work as-is, as much of iText was restructured. All examples and tutorials that I found on how to do this are for iText5. So does the (excellent) white paper. They rely on the PdfReader returning a list of AcroFields via the getAcroFields() method, on which all signature-related operations are executed. In iText7, the PdfReader does not have that method anymore.

Verify/Add PDF Signatures with iText7

我们两清 提交于 2019-12-23 06:01:13
问题 I need to port a Java program that used iText5 for PDF signature verification/creation to iText7. The old code obviously does not work as-is, as much of iText was restructured. All examples and tutorials that I found on how to do this are for iText5. So does the (excellent) white paper. They rely on the PdfReader returning a list of AcroFields via the getAcroFields() method, on which all signature-related operations are executed. In iText7, the PdfReader does not have that method anymore.

It is possible with itext 5 which at the end of a paragraph justified the remaining space is filled with scripts?

怎甘沉沦 提交于 2019-12-23 05:50:53
问题 I am making an application on android studio and use itext pdf 5, I want every time you finish a paragraph the missing space is filled with scripts, ie : paragraph 1: text text text text end .------------------- paragraph 2: text text text text end .------------------- etc. Is it possible? 回答1: Although your question is far from clear (what do you mean when you write the missing space is filled with scripts ? what are scripts?), I'm going to assume that you want something like this: There are

How to convert HTML to XHTML conversion to generate closed tags in iText C#

独自空忆成欢 提交于 2019-12-23 05:41:32
问题 I am using class iTextSharp.tool.xml.XMLWorkerHelper to add text in HTML format into a pdf file in a ASP .NET C# project. Here's my code : Paragraph bookingTemplateDescriptionContent = new Paragraph(); desc.Content = desc.Content.Replace("</br>", "<br/>"); //HACK : To avoid exception, replace the br tag in HTML formatted to XHTML formatted ElementList list = XMLWorkerHelper.ParseToElementList(desc.Content, null); foreach (var element in list) { foreach (Chunk chunk in element.Chunks) { chunk

create new pdf from a old pdf itextsharp .net MVC

亡梦爱人 提交于 2019-12-23 05:25:18
问题 just creating a new pdf using old pdf using itextsharp ==>my code... public void certificate() { //get user info using UserId from database //UserDetail UserDetail = db.UserDetails.Where(x => x.UserId == UserId).FirstOrDefault(); string oldFile = Server.MapPath("~/Content/img/tsms/Certificate/Certificate-of-Completion-Award-Template-Blue.pdf"); string newFile = Server.MapPath("~/Content/img/tsms/Certificate/newFile.pdf"); // open the reader PdfReader reader = new PdfReader(oldFile); Rectangle