Solved

Filling PDF form with vb .NET

Posted on 2004-07-30
6
1,648 Views
Last Modified: 2012-06-27
Hi,

I want to fill out PDF form using VB .NET. I have one .NET form with 4-5 textboxes on it and one pdf file created with 4-5 textbox and checkbox fields on it. Now i want when user press ok it will open pdf file with information already filled from .NET form's textboxes.

If anyone can give some hints regarding this than it would be a grt help.

Thanks,
Simy
0
Comment
Question by:coolrajm
6 Comments
 
LVL 3

Expert Comment

by:Eduski
ID: 11680017
The only way i know of doing it is using ADBC, in which case you need the professional version of acrobat.  It uses javascript to fill in forms, which you can pull from a database.  I don't know of a direct way to go and fill in the textboxes right from the webform, but if you put them in a database, and then transferred them to the pdf form with scripts you write, that should work.  Below is a link.

http://www.adobe.com/products/acrobat/eforms.html

0
 
LVL 7

Accepted Solution

by:
ramesh12 earned 250 total points
ID: 11682200
Using FDFTool kit we can do this. like below. Here I am assuming you have the pdf file with the fields


                Dim FdfAcX As FDFACXLib.FdfApp
                FdfAcX = New FDFACXLib.FdfApp()
                Dim outputFDF = FdfAcX.FDFCreate()


                dim strWarrManu as string= "No"   ' for check boxes either use Yes or No

                outputFDF.FDFSetValue("PDFFieldName1", value1, False)
                outputFDF.FDFSetValue("PDFFieldName2", value2, False)
                outputFDF.FDFSetValue("PDFFieldName3", value3, False)
                outputFDF.FDFSetValue("chkField", strWarrManu, False)
                outputFDF.FDFSetFile("http://www.yoursitename.com/yourpdffilename.pdf")


                Response.ContentType = "application/vnd.fdf"
                Response.BinaryWrite(outputFDF.FDFSaveToBuf)



0
 
LVL 7

Expert Comment

by:ramesh12
ID: 11682205
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

Author Comment

by:coolrajm
ID: 11691048
Sorry for replying late as i was out for some days.

Thanks for you help,

Simy
0
 

Expert Comment

by:nk1111
ID: 11836439
Hello, I am using the following code in an ASP.NET to generate FDF for a PDF.  But the browser is interpreting it as text and is asking to open/save the file.  Didn't to this in classic asp.  Any ideas would be greatly appreciated.


Imports System
Imports FDFACXLib


Public Class GenerateFDF
    Inherits System.Web.UI.Page

    Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

        Dim FdfAcX As FDFACXLib.FdfApp
        FdfAcX = New FDFACXLib.FdfApp()
        Dim outputFDF = FdfAcX.FDFCreate()

        outputFDF.FDFSetValue("employee_name", "December 31 1999", False)
        outputFDF.FDFSetValue("employee_address", "John Clay", False)
        outputFDF.FDFSetValue("employer_address", "12 Saratoga Ave", False)
        outputFDF.FDFSetValue("employee_city", "Saratoga", False)
        outputFDF.FDFSetValue("employee_state", "CA", False)

        outputFDF.FDFSetFile("http://ned-server1/gcworkerscomp/wc_NC.pdf")

        System.Web.HttpContext.Current.Response.ContentType = "application/vnd.fdf"
        System.Web.HttpContext.Current.Response.Write(outputFDF.FDFSaveToStr)
        Response.End()
        outputFDF.FDFClose()

    End Sub

End Class
0
 
LVL 1

Expert Comment

by:E-Squared
ID: 11916823
What is your submission URL? Did you append #FDF to it?
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

RIA (Rich Internet Application) tools are interactive internet applications which have many of the characteristics of desktop applications. The RIA tools typically deliver output either by the way of a site-specific browser or via browser plug-in. T…
Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

863 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

28 Experts available now in Live!

Get 1:1 Help Now