itextsharp

C# 3.0 Save itextsharp pdf to database using MemoryStream

Hi! I'm trying to save to databse a pdf file generated by itextsharp. But, I haven't been successfully so far. I'm using Linq to sql. Here's the code: MemoryStream ms = new MemoryStream(); Document d = new Document(PageSize.A4, 60, 60, 40, 40); PdfWriter w = PdfWriter.GetInstance(d, ms); ...

itextsharp: pdfptable.writeselectedrows vb.net

can someone please show me documentation on this method? i have the following line: datatable.WriteSelectedRows(0, -1, document.LeftMargin, document.TopMargin, writer.DirectContent) and it doesnt seem to matter whether its topmargin or bottommargin, it puts it at the bottom of the page. ...

itextsharp using pdfptable as a 2x2 matrix

how do i use pdfptable as a real table (A x B) instead of just (A x A) declaring it this way gives me just one row: Dim datatable As PdfPTable = New PdfPTable(4) how can i declare it so that it has multiple rows and multiple columns? ...

itextsharp: changing font size of pdfptable

how do i set the font for a pdfptable? ...

itextsharp: getting position of pdfptable

in my document i am creating 3-4 pdfptables. at design time i dont know the size of the tables. i need to place the 2nd table right after the first, but i dont know the position of the first (i cant calculate it because i dont know how big it is). how do i know where to place the second table? ...

itextsharp: pdfptables are running into each other

does anyone know why my tables are lapping over each other? Dim datatable As PdfPTable = New PdfPTable(4) Dim page As Rectangle = document.PageSize datatable.TotalWidth = page.Width - document.LeftMargin - document.RightMargin datatable.DefaultCell.Border = 0 Dim datatable1 As PdfPTable = New...

itextsharp: default pdfptable filling

if i define a table like this: Dim datatable As PdfPTable = New PdfPTable(4) and i dont have 4 cells to add in it, how can i make it so that it automatically fills the cell if there are not enough cells? i am finding that unless i have at least 4 cells in there, it wont display it the question is how do i figure out which cells are...

Missing iTextSharp DTD

I was reading the iTextSharp sample for parsing XML and they mention a DTD, which should be located at the following location: http://www.lowagie.com/iText/itext.dtd Unfortunately, it appears as though the location of the DTD has changed. Does anybody know where I can find it? ...

iTextSharp units

Hello, Anyone knows what unit system does iTextSharp uses? My first assumption would be pixels but I'm not sure about it. Thanks! EDIT: Sorry to not being more specific, and thanks for letting me know. I'm talking about units for measures in the PageSize and Margins. ...

iTextSharp image alignment in text?

Using iTextSharp im trying to align an image so that it gets embedded in a paragraph. I can do it like this: iTextSharp.text.Image image; image.Alignment = Image.ALIGN_RIGHT | Image.TEXTWRAP; document.Add(image); document.Add(new Paragraph("Large string of text goes here")); But the image comes out on the top right with the text surro...

Adding Rich Text to an AcroField in iTextSharp

I need to add some formatted text to a PDF form field using iTextSharp and I can't seem to figure it out. This is how I'm currently setting the fields, but certain portions of the inserted text will need to be bold or have other formatting. stamper.AcroFields.SetField("fieldName", "fieldValue") stamper.FormFlattening = True I've seen ...

itextsharp : Adding multiple pages

I'm using the DirectContent method of absolutely positioning elements on my PDF. I need to iterate over a list of records and build one page per record in my PDF. How do I tell itextsharp to insert a new page and "draw" to that page? // 72point per inch // we want 7x10 iTextSharp.text.Rectangle pageSize = new iT...

ItextSHARP Table splitting issue

Hi, I have created a sample project using itextsharp. In that i have mentioned the Footer and a table, I generate rows by loop for the given number, if the table splits to another page then, i have one blank page which has no given data. It seems undefined. here is the code: PdfWriter.GetInstance(document, New FileStream(Configuration...

Itextsharp Display data in two columns in a single row

I have a datatable containg address of users... I converted it to pdf using Itextsharp and now my requirement is i want to display one user's name,address in one column and another user's name and address in another column... In one row there must be two columns only how to do this using ItextSharp... ...

itextsharp - PDF's - What version of Adobe Reader are these supposed to be compatible with?

I've generated some PDFs with iTextSharp. I've had some end-users complain about compatibility issues. Is there specific version that iTextSharp targets for PDF compatibility? Trying to figure out what to do about this issue with some end-users not being about to view the PDFs. Thanks in advance for your time. ...

iTextSharp - How to generate a RTF document in the ClipBoard instead of a file

I would like to generate a PDF or RTF document using iTextSharp library that can be copied to the clipboard, using the same code I use to generate the document on a file (FileStream). This way my application would give the user two options: generate to a file or to the clipboard. ...

iTextSharp table width 100% of page

Im trying to add a table to a document using iTextSharp. Here is an example: Document document = new Document(PageSize.LETTER,72, 72, 72, 72); PdfWriter writer = PdfWriter.GetInstance(document, new FileStream("C:\\test.pdf", FileMode.Create)); document.Open(); Table table = new Table ( 2, 1 ); table.Width = document.RightMargin - docum...

itextsharp pdfpcell header

Hi, I'd like to have a table of cells of class PdfPCell each with a tiny header, main string and tiny footer. I can't find a way to insert them since HeaderandFooter is not allowed element to add to the cell, one paragraph overwrites another and so on. Any ideas? Thanks in advance ...

How to return PDF to browser in MVC ?

I have this demo code for iTextSharp Document document = new Document(); try { PdfWriter.GetInstance(document, new FileStream("Chap0101.pdf", FileMode.Create)); document.Open(); document.Add(new Paragraph("Hello World")); } catch (DocumentException de) { Console.Error.WriteLine(...

Read XMP from existing PDF with iTextSharp

How can I read XMP from an existing PDF file using iTextSharp? ...