Solved

Filling PDF form with vb .NET

Posted on 2004-07-30
6
1,657 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

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.
A short article about problems I had with the new location API and permissions in Marshmallow
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 …
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

751 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