itextsharp

iTextSharp's RtfWriter Nested Tables

Hi. iTextSharp's RtfWriter2 in version 4 does not support nested tables (as far as I know). However, I think it should not be too hard to implement it. Did anyone try to do that? Is it possible to do it easily and without changing the actual source code of the library (only by deriving some classes)? ...

How to use itextsharp in my classic asp??

In my ASP web application, i need to convert my report as a PDF file. In my previous ASP.net application i have done it by using "itextsharp". Can anyone guide me how to use itextsharp to my Classic ASP application? ...

Itextsharp, setting a field with formatting.

I have a letterhead template in PDF with just one big text field called "txtBody". I am using iTextsharp to open up that template and then can easily stuff some text into that field like below: var stamper = new PdfStamper(pdfReader, newFileStream); var form = stamper.AcroFields; var fieldKeys = form....

Reading PDF Header content from pages using Itext

I am trying to read out the content from the pages of a PDF file using Itextsharp. I am doing this in order to read out the actual Page number printet in the page header. I have searched the documentation and the web. I can find examples of adding a header but not retrieving and reading the Header of an existing PDF file. Do somebody ha...

ITextSharp saying File not found when published to My server.

I am using ItextSharp and I am getting a new font for it by doing this string fontPath = Path.GetFullPath("C:\\BMSApplicationFiles\\Fonts\\FREE3OF9.TTF"); BaseFont barCodeBase = BaseFont.CreateFont(fontPath, BaseFont.CP1252, BaseFont.EMBEDDED); That file is in that directory on both my dev machine and the server. When i run this on m...

How to find the position of the image?

I'm looking to get the absolute position of an image. I have added the Image like this PdfWriter writer = PdfWriter.GetInstance(document, new FileStream("pdffile.pdf", FileMode.Create)); document.Open(); iTextSharp.text.Image img = iTextSharp.text.Image.GetInstance("vehicle.png"); img.ScaleAbsolute(80, 40); cell = new PdfPCell(new Ph...

password encrytion in pdf

I am using the following code: using (Stream input = new FileStream("C:\\Users\\admin\\Desktop\\SQLServer2008KeyBoardShortcuts.pdf", FileMode.Open, FileAccess.Read, FileShare.Read)) using (Stream output = new FileStream("C:\\Users\\admin\\Desktop\\SQLServer2008KeyBoardShortcuts0.pdf", FileMode.Create, FileAccess.Write, FileShare.None)) ...

ItextSharp and CCITTFaxDecode

Hello everyone, I'm currently trying to extract an image from a pdf file using iTextSharp. The pdf is made from a scanner: it has a single page that contains one big image. When looking at the file I find the following: << /Type /XObject /Subtype /Image /Name /Obj3 /Width 2480 /Height 3507 /ColorSpace /DeviceGray /BlackIs1 true /Bit...

iTextSharp Adding Text plus Barcode in a single cell?

Basically, I want to combine a string with a barcode into a single cell using iTextSharp. From the code below it is the following two lines: table.AddCell(tempstring); table.AddCell(new text.Phrase(new text.Chunk(image39, 0, 0))); FULL CODE LISTED BELOW using text = iTextSharp.text; using pdf = iTextSharp.text.pdf; text.Document ...

itextsharp Generate a three column by two row table on a page.

Wanting it to look something like this. I am then planning to put barcodes in each of the tables. Any help is appreciated. _________ ________ ______ | | | | | | | | | | | | | | | | | | | | | | | | --------- -------- -------- _________ ________ ______ | |...

Itextsharp: PDF size too large when including images

I have a size problem with some PDFs that I build with Itextsharp and C#. Indeed each page is only an image, wide as the page, that I create thru GetInstance from a bitmap, and then Set on the page after scaling. It seems I cannot control the format of the image into the PDF, that is, the object int othe resulting PDF structure doesn't ...

Check if the PDF document is blank in C#

Hello, We have a C# application which will read a pdf document for barcode and if barcode is found it will upload the document to a file in IBM FileNet P8. If barcode is not found it will be moved to a different folder. Now we have one more request from the client. Check if the PDF is blank. In the sense if a user scans a white page an...

invisible signature in pdf with itextsharp

hi, I use itextsharp to sign a pdf document. this works just fine with my certificate. I can see the signature if I open the pdf. now I install the certificate (double click in windows xp). windows does some stuff and adds it somehow to the system. now I sign a pdf again and I can't see the signature any more! It looks like the docume...

How to work with PDF Portfolio in iTextSharp? How to identify that a PDF is Portfolio

Hi there, I have an application that signs PDF files. It works fine and I use iTextSharp for it. But I don't know how to do it when the PDF file is a PDF portfolio. My application just signs the first document of the PDF portfolio, and a want to sign every document in this PDF portfolio. How can I work with PDF portfolios in iTextShar...

Fastest PDF->text library for .NET project

I'm trying to create an application which will be basically a catalogue of my PDF collection. We are talking about 15-20GBs containing tens of thousands of PDFs. I am also planning to include a full-text search mechanism. I will be using Lucene.NET for search (actually, NHibernate.Search), and a library for PDF->text conversion. Which wo...

How to make text nowrap in a cell with image?

I'm using iTextSharp in C# to create a pdf with numbers of cells which are containing both image and texts. Document document = new Document(rect, marginLeft, marginRight, marginTop, marginBottom); Table aTable = new Table(tableColumns); foreach (TitleAndCode s in samples) { ...

iTextSharp +OnEndPage

I'm trying to override the OnEndPage event but I get the error message that there is no suitable method found to override public override void OnEndPage(PdfWriter wri, Document doc) { PdfPTable table = new PdfPTable(1); table.TotalWidth = doc.PageSize.Width - doc.LeftMargin - doc.RightMargin; PdfPTabl...

Remove watermark layer itextsharp

Hello to all, I am use with itextsharp 5.0 to add watermark/chunk to exsiting pdf. how can I remove this watermark/chunk? thanks Saar ...

Generate table of content using itextsharp

Hi, What I am doing is to generate a pdf booklet from database. I need go generate a content table with page numbers. E.g there are two chapters with page number like: ============================= Content table Chapter 1 ----- 3 Chapter 2 ----- 17 ============================= The text "Chapter 1 ----- " is normal paragraph. But ...

Add page in the middle of itextsharp

I'm creating a PDF using iTextSharp and after adding all my pages, I want to be able to add a table of contents at the beginning. Is there a way to "rewind" the PDFWriter? var d = new Document(PageSize.LETTER); PdfWriter w = PdfWriter.GetInstance(d, new FileStream("test.pdf", FileMode.Create)); d.Open(); for (var i = 0; i < 200; i++) {...