Generate a PDF file with ASP

xiaoxiao2021-03-06  94

First, you must install an Adobe full version on the workstation of the definition field (not the server). This is a link to Adobe Forms Acrobat Toolkit, which is easy to start everything.

First, download this set tool (

http://partners.adobe.com/asn/developer/acroSDK/Forms.html) and unzip it to the specified directory.

When you do this, you will find that all source code is in VB or VC . We don't intend to pay attention to it here, but if you need code here.

Second, register your DLL.

There are two DLLs that need to be copied to your server. A fdfacx.dll in the Visual Basic folder, and the other is fdftk.dll in the Visual C folder. Register the fdfacx.dll file with Regsvr32. I put these two files under C: WinntSystem32 and enter "Regsvr32 FDFTK.dll under the current path." If you encounter an error message, please check that the two files are indeed in the current directory, there is no problem to enter the next step.

Third, establish a form.

We will use each person's form that is familiar with this demonstration. This is at the "http://www.irs.gov" free and provides us with enough field to show what we can do.

Fourth, define the Adobe form field.

After opening the document in Adobe Acrobat, select the Form Tool to describe your first form field (First Name).

After you define it, it will make you name, I am named "firstname" here. Note that there are several standard additional format options, in addition to the font size, I chose to conduct legality checks and format my ASP documentation. Since this is a quick demo, I choose to skip any check, but I will process the client's form and format the ASP page before passing the variable.

Continue additional fields, each of them should be naming and may format the font size or attributes.

Save your changes on the server.

Fifth, write the ASP page.

Before you start this step, you have to pay attention to a major object that FDF set tools - "fdfapp.fdfapp". It has opened many ways, and other possible methods are outlined on the manual. We mainly care about two methods - FDFSetValue and FDFSetFile. Next, cut into the topic.

Sixth, there is no need to become a PDF expert, this is my current suggestion. User guidance of the set tool outlines all methods, which seems to have many possible methods outside this introduction. As you can see, you can easily add the database command to collect data or log data to the database.

转载请注明原文地址:https://www.9cbs.com/read-99902.html

New Post(0)