itextsharp

what is wrong with godaddy's timestamp server and itextsharp?

此生再无相见时 提交于 2019-12-02 02:40:16
I am using the iTextSharp library to sign PDF documents. When I use the standard TSAClientBouncyCastle class to get time stamp from GoDaddy's server ( http://tsa.starfieldtech.com ), the response is an empty stream. At the same time, it perfectly works with other RFC 3161 compliant timestamp servers. Also, when I use microsoft's signtool.exe to sign exe file with /tr option, it works with Godaddy's server. So I wonder what is wrong with my attempt to get a timestamp programmatically using the iTextSharp library. Thanks in advance. UPD: I have used this sample: http://sourceforge.net/p

How to merge rows with same value in PDF using iTextSharp, in ASP.NET and C#?

不羁的心 提交于 2019-12-02 02:36:24
问题 I have the next problem: I need merge the rows with the same value for this table: Table I need This table is in a GridView, and I realize the method that merge that rows private void AgruparGridView(GridViewRowCollection rows, int indiceInicial, int totalCeldasAgrupar) { //Si no hay celdas a agrupar no realiza ninguna acción if (totalCeldasAgrupar == 0) return; int i, count = 1; ArrayList lst = new ArrayList(); // Los elementos del gridview son llenados en la lista. lst.Add(rows[0]); var

Namespace for using iTextSharp CSSResolver classes

会有一股神秘感。 提交于 2019-12-02 02:30:48
I am using iTextSharp CSSResolver classes for using external css in vb.net Please let me know the namespaces for using XMLWorkerFontProvider , CssFilesImpl , StyleAttrCSSResolver classes. Below is my code: Dim fontProvider As XMLWorkerFontProvider = New XMLWorkerFontProvider() Dim cssFiles As CssFilesImpl = New CssFilesImpl(fontProvider) cssFiles.Add(XMLWorkerHelper.GetInstance().GetDefaultCSS()) Dim cssRevolver As StyleAttrCSSResolver = New StyleAttrCSSResolver() Dim htmlContext As HtmlPipelineContext = New HtmlPipelineContext() htmlContext.SetTagFactory(Tags.GetHtmlTagProcessorFactory())

Vector graphics with ITextSharp

夙愿已清 提交于 2019-12-02 02:23:56
I have heard that ITextSharp does not have support for the JAVA2D class, does this mean that i cant import vector points from a clients databas to "print" to a ITextSharp application? I would relly like to find answer to this before going further with this suggestion. Anyone have real experiences of this? While it is true that you can't use JAVA2D with iTextSharp you can still draw vector graphics in a PDF-native way by writing directly to the PdfWriter.DirectContent object. It supports all of the standard MoveTo() , LineTo() , CurveTo() , etc methods that you'd expect from a vector drawing

Converting Multiple Images into Multiple Pages PDF using itextsharp

六眼飞鱼酱① 提交于 2019-12-02 02:15:38
问题 I have requirement to convert images into PDF with a template . I'm able to create one page PDF using itextsharp. Assumption 1 image for 1 page PDF . The problem comes when I have multiple images . How I can create multiple pages PDF with predefined template. Below is my code: public static string CreatePDFDocument(string docname, string imagePath, string mediaField) { PdfReader pdfReader = null; string pdfPortrait = ConfigurationManager.AppSettings["PdfPortraitTemplate"]; string pdfLandscape

Getting a Stack Overflow Exception generating a PDF [duplicate]

て烟熏妆下的殇ゞ 提交于 2019-12-02 01:40:22
This question already has an answer here: “'System.StackOverflowException” in “OnEndPage” event handler 1 answer As a continuation to my earlier question I have been trying out the header and footer functions for my PDF. After a little discussion I have changed quite a lot of code on the PdfPageEventHelper class. Below is what I have: public class ReportHeaderFooter : PdfPageEventHelper { public string HeaderTitle { get; set; } public IReportsAccessor ReportsAccessor { get; set; } private Image footerImg; private Image headerImg; private BaseColor headerColor; private PdfPTable tblHeader;

How to display chinese characters in pdf file created with iTextSharp

让人想犯罪 __ 提交于 2019-12-02 01:32:02
问题 I have string data which contains some english characters and some chinese characters. I m creating a pdf file with this data using iTextSharp. After pdf file is created, when i open it, pdf contains only english characters. It is not showing chinese characters. Can you please tell me how to display chinese characters in pdf file?. Please note that the string data that i m writing to pdf contains dynamic language characters i.e sometimes english, somethimes chinese, sometimes japanese and so

Align AcroFields in java

你。 提交于 2019-12-02 01:11:26
I'm using iTextSharp to populate the data to PDF Templates, which is created in OpenOffice. it populating fine, I'm getting proper PDF. In that PDF some where summary will come, that place i want align that text against the Template. I'm doing below code but it does not work. fields.setFieldProperty(fieldName, "fflags", PdfFormField.Q_LEFT, null); Please Help. Thanks. Assuming that you have a pure AcroForm and not a hybrid form as I indicated in my comment, this is how you change the quadding of a field: AcroFields form = stamper.getAcroFields(); AcroFields.Item item; item = form.getFieldItem(

How to use System Font in iTextSharp with VB.net

雨燕双飞 提交于 2019-12-02 01:10:18
I'm using Itextsharp to convert text files to PDF documents dynamically using VB.net. However I need to use a system font that is not part of the iTextSharp library. I've seen some code examples using C#. However I'm a newbie in programming and my experience is all in Visual Basic. Can someone help me with writing the code to use a system font? Suppose that you want to use Arial regular and you have the file arial.ttf in your C:\windows\fonts directory, then creating the Font object is as easy as this: Dim arial As BaseFont = BaseFont.createFont("c:\windows\fonts\arial.ttf", BaseFont.IDENTITY

How to determine “Checked” value for Checkboxes (from GetAppearanceStates)

纵然是瞬间 提交于 2019-12-02 01:06:40
I have a question about checkbox fields, and consistently figuring out which value to use for a checked state. I have been searching, and shelled out $50 for the iText in Action book and scoured it as well. The book is great, but it didn’t answer this particular question. I know to call GetAppearanceStates(fieldName) to get the domain of possible values for a particular field, and know to call SetField(fieldName, value) to check the box. My question is: how do I definitively know WHICH of the values returned by GetAppearanceStates is the “Check” value, or the value I need to use to check the