itextsharp

How to write a table with iTextSharp [closed]

痴心易碎 提交于 2020-01-06 06:43:50
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 5 years ago . I can build a pdf. What I need to know is; How do you build a table with column headings and borders with iTextSharp? Thanks 回答1: mikesdotnetting.com has a pretty good walk through: http://www.mikesdotnetting.com/Article/86/iTextSharp-Introducing-Tables 来源: https://stackoverflow

Get Layer2 Text (Signature Description) from signature image using itextsharp

China☆狼群 提交于 2020-01-06 03:27:14
问题 I need to retrieve the layer2 text from a signature. How can I get the description (under the signature image) using itextsharp? below is the code I'm using to get the sign date and username: PdfReader reader = new PdfReader(pdfPath, System.Text.Encoding.UTF8.GetBytes(MASTER_PDF_PASSWORD)); using (MemoryStream memoryStream = new MemoryStream()) { PdfStamper stamper = new PdfStamper(reader, memoryStream); AcroFields acroFields = stamper.AcroFields; List<String> names = acroFields

How do I get a TextField from AcroFields using iText/Sharp?

风格不统一 提交于 2020-01-06 02:30:10
问题 I am using iTextSharp to loop through the fields in the AcroFields collection so I can set a various properties on an annotation. I have worked out how to pull most of the properties for each of the annotation fields, but would like to be able to cast the individual annotation to the correct field object (i.e., TextField , PushButtonField , RadioCheckField , etc.). Short of creating a new TextField , reading and then setting all of the settings/properties associated with it, is there a

ITextSharp: parse html with cyrillic/international words

萝らか妹 提交于 2020-01-06 02:17:08
问题 I try to parse html file and to generate pdf. I use code document.Open(); HtmlPipelineContext htmlContext = new HtmlPipelineContext(null); htmlContext.SetTagFactory(Tags.GetHtmlTagProcessorFactory()); ICSSResolver cssResolver = XMLWorkerHelper.GetInstance().GetDefaultCssResolver(true); IPipeline pipeline = new CssResolverPipeline(cssResolver, new HtmlPipeline(htmlContext, new PdfWriterPipeline(document, writer))); XMLWorker worker = new XMLWorker(pipeline, true); XMLParser p = new XMLParser

Get field value for the check box

自闭症网瘾萝莉.ら 提交于 2020-01-05 08:36:10
问题 How to find the field value for the check box? <</Rect[263.571 330.311 273.323 338.812]/Subtype/Widget/F 4/P 30 0 R/T(AmountCollect)/DA(/ZaDb 18 Tf 0 g)/FT/Btn/Type/Annot/MK<</CA(8)>>/AP<</D<</COLLECT 148 0 R/Off 149 0 R>>/N<</COLLECT 147 0 R>>>>/AS/Off>> I tried the following. But I am unable to mark the check box. Please help. testForm.SetField("AmountCollect", "Off"); testForm.SetField("AmountCollect", "Yes"); testForm.SetField("AmountCollect", "0"); 回答1: If the string values you're using

How do I get the signature image from a smartcard with C#?

牧云@^-^@ 提交于 2020-01-05 07:38:16
问题 I'm developing a C# application to certify pdf documents. I've got the certification process done but now I need to take the signature image stored in a smartcard and place it in the given PDF file. The code used to get the certificates is this: public static X509Certificate2 GetCertificate() { X509Store st = new X509Store(StoreName.My, StoreLocation.CurrentUser); st.Open(OpenFlags.ReadOnly); X509Certificate2Collection col = st.Certificates; X509Certificate2 card = null;

How do I get the signature image from a smartcard with C#?

亡梦爱人 提交于 2020-01-05 07:38:07
问题 I'm developing a C# application to certify pdf documents. I've got the certification process done but now I need to take the signature image stored in a smartcard and place it in the given PDF file. The code used to get the certificates is this: public static X509Certificate2 GetCertificate() { X509Store st = new X509Store(StoreName.My, StoreLocation.CurrentUser); st.Open(OpenFlags.ReadOnly); X509Certificate2Collection col = st.Certificates; X509Certificate2 card = null;

How to place underline on space string in ITextSharp

最后都变了- 提交于 2020-01-05 07:27:29
问题 How to add under line under a spacebar. It is not adding space under the empty spaces. I tried with 2-3 example and it failed to add underline under space. 1. para = New Paragraph(New Chunk("abc. ", underlined_font)) cell = New PdfPCell(para) cell.Border = 0 cell.BorderWidthBottom = 0 document.Add(cell) Dim str_required_space As New String(" "c, 20) para = New Paragraph(New Chunk(str_required_space, underlined_font)) cell = New PdfPCell(para) cell.Border = 0 cell.BorderWidthBottom = 0

How to place underline on space string in ITextSharp

徘徊边缘 提交于 2020-01-05 07:27:09
问题 How to add under line under a spacebar. It is not adding space under the empty spaces. I tried with 2-3 example and it failed to add underline under space. 1. para = New Paragraph(New Chunk("abc. ", underlined_font)) cell = New PdfPCell(para) cell.Border = 0 cell.BorderWidthBottom = 0 document.Add(cell) Dim str_required_space As New String(" "c, 20) para = New Paragraph(New Chunk(str_required_space, underlined_font)) cell = New PdfPCell(para) cell.Border = 0 cell.BorderWidthBottom = 0

Using iTextSharp to generate multiple page PDF from existing PDF Form

眉间皱痕 提交于 2020-01-05 04:58:13
问题 I have a fillable PDF form which needs to be programatically filled for each member and added to a single pdf document. I am able to use pdfstamper to read the existing pdf, and change the data, but I cant seem to figure out how to create multiple instances of the pdfstamper with different data in the same pdf doc. 回答1: You don't. One PDF stamper->1 document OUTPUT. You didn't give a lot of detail, but your workflow will probably need to be something like this: For Each PDF form: * Open it