Techniques
This section makes it possible to gather a whole of techniques or scripts which have the originality to manage to solve a difficulty with the least effort or which are particularly effective...
Techniques / PDF
- Using the FDF toolkit
This last solution is not inevitably free because it asks for the creation of a basic template format pdf the easy way is then to be used for itself of the format form of Acrobat in order to define fields of form which one will be able to dynamically fill via kit FDF proposed free in remote loading on the Adobe site. This one includes for ASP a DLL that you'll have to register on the web server, a documentation accompanies also the unit by the kit. But this method presents also the disadvantage to have a rigid structure: the basic template is not modifiable in the direction or one cannot with stolen defining new already existing pages only those. It remains a valid solution if the need is limited to redefine certain values in a preset mask like an invoice, a delimited listing (of which one enregsitrement connait the number of maximum...).
It is possible to create a model of file under Word for example then to export it towards a file pdf via the virtual printer installed with ADOBE Acrobat Writter. Once that the document is in the form of file pdf, you can include elements of form there.
The following example supposes that you have to create the form and that you have to create fields named text of form DATE_START and NAME. File pdf thus created is called "formulaire.pdf".
We will create a page which makes it possible to inform the various fields of the form and proposes then a button to open the file filled.
The operation of forms FDF is established on the principle of a file containing the list of the fields with the value which is allotted to them, as well as the name of an attached file pdf which contains the form to him. The fact of opening one of these files "fdf" thus produces the opening of file pdf with the well informed values.
The contents of a simple file FDF are not complicated to include/understand and that it is thus possibl to write it without needing the DLL FdfApp but which it remains nevertheless rather practical.
<% ' Specify the Mime type of the ouput Response.ContentType = "text/html" ' Create a new fdfApp Object ' Set FdfAcx = Server.CreateObject("FdfApp.FdfApp") ' ' Create a reference of a pdf form Set myFdf = FdfAcx.FDFCreate ' ' Fill the form by giving values ' to the forms elements ' 'If we have an input Called DATE_START 'fill it with the variable date_start ' if date_start & "e" = "e" then date_start = "" myFdf.fdfsetvalue "DATE_START", date_start, false 'We fill the input called NAME 'with the value of the name variable if name & "e" = "e" then name= "" myFdf.fdfsetvalue "NAME", name, false ' Link the fdf variables with the PDF file ' embedding the form myFDF.fdfSetFile "http://dypso.free.fr/formulaire.pdf" ' Save to disk The FDF File ' we have produce myFDf.FDFSaveToFile "c:\inetPub\wwwroot\dypso\formulaire.fdf" ' Write a link to the FDF file we have create ' by opening it, it will automatically load the ' PDF file with the form completed Response.Write "<input class= 'menu2' type='button' "&_ " onclick=window.open('formulaire.fdf','',"&_ " 'status=no,resizable,toolbar=no,scrollbars=yes,"&_ " width=750,height=550') "&_ " value=""Visualiser""> " ' ' Now we clean memory ' myfdf.fdfclose set fdfacx = nothing response.end %>
You could now ask for support by using the forum.