Send a suggestion!

We're building a brand new version of the site, and we'd love to hear your ideas

Members

Technology Zones

IBM Learning Center

Articles

Hosted By

MaximumASP

Info

[6623] Dynamically Generating PDFs in .NET

Last post 07-22-2008 6:47 AM by arindam12345. 6 replies.
Page 1 of 1 (7 items)
Sort Posts: Previous Next
  • 01-01-1999 12:00 AM

    [6623] Dynamically Generating PDFs in .NET

    This thread is for discussions of Dynamically Generating PDFs in .NET .

    • Post Points: 20
  • Advertisement

    • Red Gate Software

    Advertisement

    Want to boost your .NET application performance?

    Some developers always seem to write efficient and lightening-fast code. What is their secret? It’s ANTS Profiler. “We improved the performance of the application up to 10 times” Dan Ports, Intrigma.

    Try it for yourself now.

  • 05-13-2007 12:11 PM In reply to

    • sbohlen
    • Not Ranked
    • Joined on 05-13-2007
    • United States
    • New Member
    • Points 10

    Re: [6623] Dynamically Generating PDFs in .NET

    I'm sure this isn't a great place to ask for a resolution to my itextsharp issues, but you seem to be the only person I've stumbled across who might know the answer (I'm sure you're well-aware that there is a serious dearth of documentation and information available about itextsharp otherwise).

    We are doing much the same as your post suggests (using itextsharp to fill fields in a pre-defined PDF and send it down to the user user) and we have just about given up on being able to use itextsharp to fill a PDF form textbox with rich-text-encoded text and I was wondering if you might have any suggestions for us.

    Acrobat makes it trivial to setup a textbox field in a PDF form to accept RTF content (just set the props on the field to 'use RTF text' in the forms designer) but when we use itextsharp to fill this field with RFT-encoded content, the RTF syntax is reproduced in its entirety with in the textbox in the PDF (e.g., we get '{\rtf\01\hello\etc....}' instead of the text with the formatting applied).

    Have you (or anyone else who might view this blog post) ever tried this and come across the same issue?  Other than this, we find itextsharp to be a quite useful tool for systems that need to collect data in one format (e.g., via a web form, a winform, whatever) and then display that back to the user in any pre-conceived format in an organizational-specific paper-form equivalent).

    Happy coding to all~!

    -Steve B.

    • Post Points: 10
  • 09-17-2007 7:54 PM In reply to

    • polgas
    • Not Ranked
    • Joined on 09-17-2007
    • New Member
    • Points 10

    Re: [6623] Dynamically Generating PDFs in .NET

    Hi there!

    I'm newbie in programming/coding. I really need some help regarding pdf's. I have a program that collects data from the server. I have a button that creates excel file and a button that creates a text file. So now my problem is the button that create a pdf result to users and I'm not really sure how to do it. I tried the  C# but I still can't figure out how to use it. And by the way, I'm using VB.net. I tried this code:

    Imports System
    Imports com.lowagie.text
    Imports com.lowagie.text.pdf
    Imports System.IO

    Public Class Chap0101
        Public Shared Sub Main(ByVal args As String())
            Console.WriteLine("Chapter 1 example 1: Hello World")

            ' step 1: creation of a document-object
            Dim document As New Document()

            ' step 2:
            ' we create a writer that listens to the document
            ' and directs a PDF-stream to a file

            PdfWriter.getInstance(document, New FileStream("Chap0101.pdf", FileMode.Create))

            ' step 3: we open the document
            document.open()

            ' step 4: we add a paragraph to the document
            document.add(New Paragraph("Hello World"))

            ' step 5: we close the document
            document.close()
        End Sub

    End Class

    It really doesn't do anything on my program.  I really appreciate any suggestions you can give.

     

    polgas

    • Post Points: 5
  • 06-13-2008 6:26 PM In reply to

    • gtrsteve
    • Not Ranked
    • Joined on 06-13-2008
    • United States
    • New Member
    • Points 10

    Re: [6623] Dynamically Generating PDFs in .NET

    Hi,

     So, to include this in an ASP.net web app, would I need to have Acrobat installed on the Web Server??

    thanks

     

    Steve S

    SteveDotSchilzATsbcglobalDOTnet

     

    • Post Points: 10
  • 06-13-2008 7:54 PM In reply to

    • James Crowley
    • Top 10 Contributor
    • Joined on 12-07-2000
    • United Kingdom
    • Guru
    • Points 15,055
    • SystemAdministrator

    Re: [6623] Dynamically Generating PDFs in .NET

    No - you don't need Acrobat at all - just the iTextSharp library.

    • Post Points: 10
  • 06-16-2008 6:39 PM In reply to

    • polgas
    • Not Ranked
    • Joined on 09-17-2007
    • New Member
    • Points 10

    Re: [6623] Dynamically Generating PDFs in .NET

    Hi still having problem with pdf's..I think what I need is a silent printing but it VB not in java...either that or I need to know how itext works with SQL in order for me to retrieve the data...Do you guys know anything about Itext and SQL or silent print in VB? I really appreciate any idea or help that you could give me. Thanks so much in advance.

    • Post Points: 5
  • 07-22-2008 6:47 AM In reply to

    Re: [6623] Dynamically Generating PDFs in .NET

    very good

    • Post Points: 5
Page 1 of 1 (7 items)