ASP and PDF Forms

Posted on 2005-05-05
Last Modified: 2008-02-01
I need to:

1. Display a PDF file online that has form fields, then....
2. Allow users to fill out those fields, then....
3. Click a submit button, then....
4. Send that PDF -- with the form fields filled in -- to a person's email account.

Is there a way to do this using ASP on an IIS server? Do I need to install any specific *.dll files onto the server.

Thanks for the help.
Question by:Chi_Lambda
    LVL 6

    Expert Comment

    this should get you started
    Fpdf. Pdf without components

    LVL 6

    Expert Comment

    FPDF is one class written in pure asp for the pdf generation.
    That means that the installation of members for the pdf generation is not necessary.


    Author Comment


    Thanks for the information but my Italian is a bit rusty. :)

    I'm not really sure how to work the class. Any other ideas?.
    LVL 6

    Expert Comment

    MY Italian is as bad Chi_Lambda :)

    No sorry this is the only pdf class I know of,
    there is a translation to english there though at some point,
    samples, manual and forum if you didnt look close enough.

    good luck

    Author Comment

    I found the way how to do it:

    1. Open the file in Adobe Acrobat.
    2. Create a Submit button somewhere on the PDF document.
    3. Right click on the button: select Properties | Actions tab
    4. Select Mouse Down, the click Add button, then select Submit Form. Click Set Action.
    5. Under Actions tab again select Submit Form, then click Edit.
    6. Click Select URL
    7. Enter the name of the ASP page that will do the receiving and sending of the PDF.

    Next, I create the ASP to capture the PDF form information and send it to my designated recipient. Basically, I do a request.binaryread since the PDF will be transmitted as a binary string to my ASP page. Then, using the JMail email component, I send that file as an AddCustomAttachment to the recipient:

    <%@ LANGUAGE = VBScript%>
    dim JMail
    dim file
    Dim strTemp

    starttime = Now

    Set JMail = Server.CreateObject("JMail.SMTPMail")

    file = Request.BinaryRead(Request.TotalBytes)
    For i = 1 to LenB(file)
          strTemp = strTemp & chr(AscB(MidB(file,i,1)))

    JMail.ServerAddress = ""
    JMail.Sender = ""
    JMail.Subject = "PDF Form Submitted!"
    JMail.AddRecipientex "", "John Doe"
    body = "Please see attached PDF"
    JMail.Body = body
    JMail.AddCustomAttachment "pdf_application.pdf", strTemp
    JMail.Priority = 1
    JMail.AddHeader "Originating-IP", Request.ServerVariables("REMOTE_ADDR")
    set JMail = nothing

    Response.Write("PDF Uploaded and emailed in " & DateDiff("s",starttime,now) & " seconds.")

    LVL 22

    Expert Comment

    No comment has been added to this question in more than 21 days, so it is now classified as abandoned.  I will make a recommendation to the moderators on its resolution in a week or two.  I appreciate any comments that would help me to make a recommendation.

    Unless it is clear to me that the question has been answered I will recommend delete without refund of points.  It is possible that a Grade less than A will be given if no expert makes a case for an A grade.  It is assumed that any participant not responding to this request is no longer interested in its final disposition.

    If the asker does not know how to close the question, the options are here:

    EE Cleanup Volunteer
    LVL 22

    Expert Comment

    No comment has been added to this question in more than 21 days, so it is now classified as abandoned.  I will leave the following recommendation for this question in the Cleanup topic area:
    PAQ/No Refund

    Any objections should be posted here in the next 4 days.  After that time, the question will be closed.

    EE Cleanup Volunteer
    LVL 1

    Accepted Solution

    PAQed with no points refunded (of 350)

    EE Admin

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Why You Should Analyze Threat Actor TTPs

    After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

    I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
    This demonstration started out as a follow up to some recently posted questions on the subject of logging in: and…
    Internet Business Fax to Email Made Easy - With eFax Corporate (, you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
    In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor ( If you're interested in additional methods for monitoring bandwidt…

    794 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    16 Experts available now in Live!

    Get 1:1 Help Now