Solved

Filling PDF form with vb .NET

Posted on 2004-07-30
6
1,646 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
What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 

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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

This article will show, step by step, how to integrate R code into a R Sweave document
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

760 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

19 Experts available now in Live!

Get 1:1 Help Now