itextsharp

Signing PDF - PDF/3b compliance

和自甴很熟 提交于 2020-01-25 11:26:52
问题 I'm trying to created a signed PDF/A-3b compliant PDF. I've created a compliant PDF with iTextSharp and then after signing it is no longer compliant. I'm using PdfAStamper with a trial certificate. When opening the document in Acrobat it displays a dialogue box alerting the user that it is a test certificate. Using Acrobat Pro Preflight to check compliance I get the following error: Name object is not a valid UTF-8 string Some PDF based ISO standards require that all name objects are UTF-8

Displaying a bar code with iTextSharp using Chris Love's Barcode Handler (2 part)

感情迁移 提交于 2020-01-24 23:51:06
问题 I have a situation where I need to create a number of barcodes as images on a page from a set of UPCs from a database. Additionally, I also want to be able to produce barcodes which can print as labels to a Dymo LabelMaker. Googling turned up several options, but it seems that for the LabelMaker it'd be wise to produce the barcodes as PDF? So, I started looking into iTextSharp which seems good (and free!) Looking fora simple way to render a Barcode Image to a page, I found this, which looks

Displaying a bar code with iTextSharp using Chris Love's Barcode Handler (2 part)

不打扰是莪最后的温柔 提交于 2020-01-24 23:50:59
问题 I have a situation where I need to create a number of barcodes as images on a page from a set of UPCs from a database. Additionally, I also want to be able to produce barcodes which can print as labels to a Dymo LabelMaker. Googling turned up several options, but it seems that for the LabelMaker it'd be wise to produce the barcodes as PDF? So, I started looking into iTextSharp which seems good (and free!) Looking fora simple way to render a Barcode Image to a page, I found this, which looks

I did an 'imports' - error TYPE EXPECTED

时间秒杀一切 提交于 2020-01-24 23:28:03
问题 I did this: Imports iTextSharp.text.rtf and then this: Dim grx As graphic = New graphic and on the first "graphic" I am getting a "type expected" graphic is a member of iTextSharp.text.rtf Here's the surrounding code: Public Sub New1() Console.WriteLine("Chapter 4 example 4: Simple Graphic") Dim document As Document = New Document Try PdfWriter.GetInstance(document, New FileStream("Chap0404.pdf", FileMode.Create)) document.Open() Dim grx As graphic = New graphic grx.Rectangle(100, 700, 100,

I did an 'imports' - error TYPE EXPECTED

社会主义新天地 提交于 2020-01-24 23:27:25
问题 I did this: Imports iTextSharp.text.rtf and then this: Dim grx As graphic = New graphic and on the first "graphic" I am getting a "type expected" graphic is a member of iTextSharp.text.rtf Here's the surrounding code: Public Sub New1() Console.WriteLine("Chapter 4 example 4: Simple Graphic") Dim document As Document = New Document Try PdfWriter.GetInstance(document, New FileStream("Chap0404.pdf", FileMode.Create)) document.Open() Dim grx As graphic = New graphic grx.Rectangle(100, 700, 100,

Table in iTextSharp is not page breaking as desired?

*爱你&永不变心* 提交于 2020-01-24 21:48:29
问题 Problem The header is on the first page by itself. If my body has too many people in it for photos, it will print on the second page. Please see below for a graphical description of my problem: Now, please read below for some code. Please consider the following as pseudo code (because the whole code is too long), but it is very close to the code I am trying to fix. Code Header System.IO.FileInfo tempFileInfo = new System.IO.FileInfo(System.IO.Path.GetTempFileName()); tempFileInfo.MoveTo

Crop PDF without keeping invisible content (.NET or ObjC)

江枫思渺然 提交于 2020-01-24 20:27:06
问题 I'm trying to crop a PDF using .NET (using PDF4NET or iTextSharp, but not closed to these ones) or Objective-C (CGContextXXX, CGPDFXXX, etc.)... But without keeping the invisible content ! Currently, I'm able to do the crop operation using the Crop Box or a Clip Region, but all content invisible is still present in the PDF... Is it possible ? Thanks (and sorry, I'm french...) 回答1: You could try Amyuni PDF Creator .Net for this task. You could use the method IacDocument.GetObjectsInRectangle

How to insert a PdfPTable into an existing PDF template?

心不动则不痛 提交于 2020-01-24 10:35:08
问题 Update: After some discussion, we decided to go with TeX, specifically the windows compatible MiKTeX. We realised that even if we could get the dynamic lengthed table formatted by micromanaging the layout (which doesn't seem possible or is as tedious as calculating row height for each row), there are other dynamic controls like large text boxes that we would also need to micromanage so we decided to generate the whole doc on the fly. With that in mind, going to TeX was the obvious choice

Setting the background color of a contentbyte itextsharp

三世轮回 提交于 2020-01-24 00:02:27
问题 MVC3 VB.NET application using Itextsharp. I have a section of code that generates a pdf file everything looks great but I would like to alternate the line colors in that pdf file between 2 color so that the values are easy to follow for the person looking at it. Is there a way to set the background color of a whole line based on font size to a set color? A function I would be using this in is below: For Each _reg_ In _reg Dim _registrant As reg_info = _reg_ If y_line1 <= 30 Then doc.NewPage()

Delete Columns from GridView

一个人想着一个人 提交于 2020-01-22 21:09:07
问题 I have a GridView with a couple of columns that I do not want to be exported to PDF (through iTextSharp). How can I hide the columns I don't want exported before I export the data? 回答1: Before exporting the data, do something like: myGridView.columns.RemoveAt(index); //Index is the index of the column you want to remove myGridView.Databind(); 回答2: or try dataGridView1.Columns[index].Visible = false; // the index of the column to be hidden 来源: https://stackoverflow.com/questions/1215996/delete