Itextsharp 4.0.8 Dll Download Rating: 5,6/10 6871 votes

private void button1_Click(object sender, EventArgs e)
{
//Document:(文档)生成pdf必备的一个对象,生成一个Document示例
Document document = new Document(PageSize.A4, 30, 30, 5, 5);
//为该Document创建一个Writer实例:
PdfWriter.GetInstance(document, new FileStream('Chap0101.pdf', FileMode.Create));
//打开当前Document
document.Open();

//为当前Document添加内容:
document.Add(new Paragraph('Hello World'));
//另起一行。有几种办法建立一个段落,如:
Paragraph p1 = new Paragraph(new Chunk('This is my first paragraph.n', FontFactory.GetFont(FontFactory.HELVETICA, 12)));
Paragraph p2 = new Paragraph(new Phrase('This is my second paragraph.', FontFactory.GetFont(FontFactory.HELVETICA, 12)));
Paragraph p3 = new Paragraph('This is my third paragraph.', FontFactory.GetFont(FontFactory.HELVETICA, 12));
//所有有些对象将被添加到段落中:
p1.Add('you can add string herent');
p1.Add(new Chunk('you can add chunks n')); p1.Add(new Phrase('or you can add phrases.n'));
document.Add(p1); document.Add(p2); document.Add(p3);

IText is used by Java,.NET, Android and GAE developers to enhance their applications with PDF functionality. ITextSharp is the.NET port. IText is a PDF library that allows developers to create, adapt, inspect and maintain documents in the Portable Document Format(PDF). Itextsharp.dll File Download and Fix For Windows OS, dll File and exe file download. Home Articles. Enter the file name, and select the appropriate operating system to find the files you need. Package Information; Summary: APCu - APC User Cache: Maintainers: Joe Watkins (lead) Anatol Belski (developer).

//创建了一个内容为“hello World”、红色、斜体、COURIER字体、尺寸20的一个块:
Chunk chunk = new Chunk('Hello world', FontFactory.GetFont(FontFactory.COURIER, 20, iTextSharp.text.Font.COURIER, new iTextSharp.text.Color(255, 0, 0)));
document.Add(chunk);
//如果你希望一些块有下划线或删除线,你可以通过改变字体风格简单做到:
Chunk chunk1 = new Chunk('This text is underlined', FontFactory.GetFont(FontFactory.HELVETICA, 12, iTextSharp.text.Font.UNDEFINED));
Chunk chunk2 = new Chunk('This font is of type ITALIC STRIKETHRU', FontFactory.GetFont(FontFactory.HELVETICA, 12, iTextSharp.text.Font.ITALIC iTextSharp.text.Font.STRIKETHRU));
//改变块的背景
chunk2.SetBackground(new iTextSharp.text.Color(0xFF, 0xFF, 0x00));
//上标/下标
chunk1.SetTextRise(5);
document.Add(chunk1);
document.Add(chunk2);

//外部链接示例:
Anchor anchor = new Anchor('website', FontFactory.GetFont(FontFactory.HELVETICA, 12, iTextSharp.text.Font.UNDEFINED, new iTextSharp.text.Color(0, 0, 255)));
anchor.Reference = 'http://itextsharp.sourceforge.net/';
anchor.Name = 'website';
//内部链接示例:
Anchor anchor1 = new Anchor('This is an internal linknn');
anchor1.Name = 'link1';
Anchor anchor2 = new Anchor('Click here to jump to the internal linknf');
anchor2.Reference = '#link1';
document.Add(anchor);document.Add(anchor1);document.Add(anchor2);

//排序列表示例:
List list = new List(true, 20);
list.Add(new ListItem('First line'));
list.Add(new ListItem('The second line is longer to see what happens once the end of the line is reached. Will it start on a new line?'));
list.Add(new ListItem('Third line'));
document.Add(list);

//文本注释:
Annotation a = new Annotation('authors','Maybe its because I wanted to be an author myself that I wrote iText.');
document.Add(a);

//包含页码没有任何边框的页脚。
HeaderFooter footer = new HeaderFooter(new Phrase('This is page: '), true);
footer.Border = iTextSharp.text.Rectangle.NO_BORDER;
document.Footer = footer;


//Chapter对象和Section对象自动构建一个树:
iTextSharp.text.Font f1 = new iTextSharp.text.Font();
f1.SetStyle(iTextSharp.text.Font.BOLD);
Paragraph cTitle = new Paragraph('This is chapter 1', f1);
Chapter chapter = new Chapter(cTitle, 1);
Paragraph sTitle = new Paragraph('This is section 1 in chapter 1', f1);
Section section = chapter.AddSection(sTitle, 1);
document.Add(chapter);
//构建了一个简单的表:
Table aTable = new Table(4, 4);
aTable.AutoFillEmptyCells = true;
aTable.AddCell('2.2', new Point(2, 2));
aTable.AddCell('3.3', new Point(3, 3));
aTable.AddCell('2.1', new Point(2, 1));
aTable.AddCell('1.3', new Point(1, 3));
document.Add(aTable);
//构建了一个不简单的表:
Table table = new Table(3);
table.BorderWidth = 1;
table.BorderColor = new iTextSharp.text.Color(0, 0, 255);
table.Cellpadding = 5;
table.Cellspacing = 5;
Cell cell = new Cell('header');
cell.Header = true;
cell.Colspan = 3;
table.AddCell(cell);
cell = new Cell('example cell with colspan 1 and rowspan 2');
cell.Rowspan = 2;
cell.BorderColor = new iTextSharp.text.Color(255, 0, 0);
table.AddCell(cell);
table.AddCell('1.1');
table.AddCell('2.1');
table.AddCell('1.2');
table.AddCell('2.2');
table.AddCell('cell test1');
cell = new Cell('big cell');
cell.Rowspan = 2;
cell.Colspan = 2;
cell.BackgroundColor = new iTextSharp.text.Color(0xC0, 0xC0, 0xC0);
table.AddCell(cell);
table.AddCell('cell test2');
// 改变了单元格“big cell”的对齐方式:
cell.HorizontalAlignment = Element.ALIGN_CENTER;
cell.VerticalAlignment = Element.ALIGN_MIDDLE;
document.Add(table);

//关闭Document
document.Close();
}

Active3 years, 5 months ago

I have an old project that is using iTextSharp library for PDF generation. iTextSharp DLL is added as reference to the project. iTextSharp was originally available under the LGPL licence. Some time ago the licence has changed to be AGPL (in release 5.0.0) that is copy left so you'd have to GPL all your code if you used it.

My problem is that I don't know when I downloaded the DLL file that is linked in my project. I don't know if the DLL is still under LGPL or it is already under AGPL. And that would mean that I have to GPL my project.

Is there any way to check what is the version of iTextSharp when you have only the DLL? Or what is the licence of it?

Itextsharp Dll Free Download Msdn

Or is there any place where I can download old version of iTextSharp that is still under LGPL so I'll be sure I'm not breaking the licence by not making my project GPL?

Dll download depedBill the Lizard
304k159 gold badges506 silver badges799 bronze badges
RastoRasto
6,75636 gold badges127 silver badges212 bronze badges

5 Answers

seems like iTextSharp maintainers removed iTextSharp 4.1.6 from SourceForge, anyway you can try to simply Google for 'itextsharp-4.1.6.zip' to find alternative download sources

EDIT: here is the link for 4.1.6 dll: http://pdfviewernet.googlecode.com/svn-history/r55/trunk/PDFView/PDFView/lib/itextsharp.dll

Rasto
6,75636 gold badges127 silver badges212 bronze badges
EugeneEugene

iTextSharp (LGPL / MPL) 4.1.6 is available via NuGet.

For more information, see http://nuget.org/packages/iTextSharp-LGPL.

Rich BennemaRich Bennema
9,5104 gold badges32 silver badges53 bronze badges

Right click on the dll and go the Properties, under the Details tab it the version number should be listed.

maple_shaftmaple_shaft
9,4914 gold badges37 silver badges69 bronze badges
Amedee Van Gasse
4,2573 gold badges30 silver badges60 bronze badges
TN.TN.
9,65923 gold badges79 silver badges130 bronze badges

You can also check the PDF it generates' Document Info values, the 'Producer' in particular. In Adobe Reader you hit ctrl+D and go to the first tab.

Mark StorerMark Storer
14k1 gold badge32 silver badges68 bronze badges

Not the answer you're looking for? Browse other questions tagged .netpdfpdf-generationitextsharp or ask your own question.