Last post Jan 08, 2012 03:26 PM by icenvon
Jan 05, 2012 03:18 PM|icenvon|LINK
Hello. I am trying to convert a gridview in ms visual studio to PDF but not being successful. This what I have in my visual basic code behind:
Partial Class Default2
Public Overloads Overrides Sub VerifyRenderingInServerForm(ByVal control As Control)
Protected Sub btnExportPDF_Click(ByVal sender As Object,
ByVal e As EventArgs)
Response.ContentType = "application/pdf"
Dim sw As New StringWriter()
Dim hw As New HtmlTextWriter(sw)
GridView1.AllowPaging = False
Dim sr As New StringReader(sw.ToString())
Dim pdfDoc As New Document(PageSize.A4, 10.0F, 10.0F, 10.0F, 0.0F)
Dim htmlparser As New HTMLWorker(pdfDoc)
The question I have is this: Are Imports iTextSharp.text, Imports iTextSharp.text.pdf, Imports iTextSharp.text.html, and Imports iTextSharp.text.html.simpleparser files that I need to download from somewhere, and where do find them to download? (FOR FREE
Jan 06, 2012 07:07 AM|DarrellNorton|LINK
It depends on how you are using iTextSharp. iText is open source released under the Affero General Public License v3. What does that mean?
In accordance with Section 7(b) of the GNU Affero General Public License, you must retain the producer line in every PDF that is created or manipulated using iText.
You can be released from the requirements of the license by purchasing a commercial license. Buying such a license is mandatory as soon as you develop commercial activities involving the iText software without disclosing the source code of your own applications.
These activities include: offering paid services to customers as an ASP, serving PDFs on the fly in a web application, shipping iText with a closed source product.
More about the license here: http://itextpdf.com/terms-of-use/agpl.php
If you are using it in a non-commercial fashion, then go get the iTextSharp libraries here: http://itextpdf.com/download.php
If you are using it in a commercial fashion, you either need to post ALL of your site's source code or purchase a license.
The standard disclaimers apply - I am not a lawyer so I cannot offer you legal advice.
Jan 08, 2012 03:26 PM|icenvon|LINK
Thanks. Sorry for getting back to you late. But I already did it. THANKS