Home   
   Domini   
   Siti   
   Indicizzazione   
   Contatto   
   Specials   
   Games   

 


 
Grafica 3D in PDF con ASP Grafica 3D in PDF con ASP NET Convertire JPEG in PDF con ASP Convertire JPEG in PDF con ASP NET Creare PDF con ASP Proprietà PDF a nuovo PDF Creare PDF con ASP via HTTP Aggiungere commento a PDF con ASP
Creare PDF con Form via ASP Gestire PDF via ASP Aggiungere grafica a PDF con ASP HTML da file TXT via ASP Importare da URL in PDF con ASP PDF Bookmark con ASP Da PDF in JPEG via ASP Lettura MDB con PDF via ASP
Moduli PDF via ASP Creare PDF con ASP NET Creare PDF con ASP NET via HTTP Aggiungere commento a PDF con ASP NET Creare PDF con Form via ASP NET Gestire PDF via ASP NET HTML da file TXT via ASP NET Importare da URL in PDF con ASP NET
Maschera PDF con ASP NET Creare PDF con ASP NET e MDB Da PDF a PNG via ASP NET Estrarre testo da PDF via ASP NET Unire documenti PDF via ASP NET Da PDF a PNG via ASP Estrarre testo da PDF via ASP Unire documenti PDF via ASP
Inserire commento in PDF Maschera PDF con ASP PDF Bookmark con ASP NET Convertire TIFF in PDF con ASP Compilare PDF con Form via ASP Creare PDF con ASP e MDB Lettura MDB con PDF via ASP NET Convertire TIFF in PDF con ASP NET

Compilazione modulo form con inserimento in maschera PDF attraverso asp

nota bene: lo script nella versione "copia e incolla" che segue, presuppone permessi di scrittura lato server .. in paritcolare, è la root o cartella di destinazione del nuovo documento PDF che deve possedere i permessi di scrittura [chmod "666" - "777"] ..e l' utilizzo è di assoluta facilità: copia inclolla e salva come *.asp


CODICE:

<P>
<TABLE BORDER="0" CELLSPACING="3" CELLPADDING="0" STYLE="font-name:arial; font-size: 14">

<FORM ACTION="riempire.asp" METHOD="POST">

<TR><TD><B>Nome</B>:</TD><TD><INPUT SIZE="40" TYPE="TEXT" NAME="Name" VALUE="<% = Request("Name") %>"></TD></TR>

<TR><TD><B>Indirizzo</B>:</TD><TD><INPUT SIZE="40" TYPE="TEXT" NAME="Address" VALUE="<% = Request("Address") %>"></TD></TR>

<tr><td colspan="2"><HR></td></tr>

<TR><TD VALIGN="TOP"><B>Situazione personale</B>:</TD><TD>
<INPUT TYPE="RADIO" NAME="Type" VALUE="1"<% If Request("Type") = "1" or Request("Type") = "" Then Response.Write " CHECKED" %>>Single<BR>
<INPUT TYPE="RADIO" NAME="Type" VALUE="2"<% If Request("Type") = "2" Then Response.Write " CHECKED" %>>Sposato<BR>
<INPUT TYPE="RADIO" NAME="Type" VALUE="3"<% If Request("Type") = "3" Then Response.Write " CHECKED" %>>Divorziato<BR>
</TD></TR>

<tr><td colspan="2"><HR></td></tr>

<TR><TD VALIGN="CENTER"><B>Chi ti ha detto di noi?<br>Selezionare.</B></TD><TD>
<TABLE BORDER=0 CELLSPACING=2 CELLPADDING=0 STYLE="font-name:arial; font-size: 12">
<TR><TD><INPUT TYPE="CHECKBOX" NAME="Internet" VALUE="0"<% If Request("Internet") <> "" Then Response.Write " CHECKED" %>></TD><TD>Internet</TD></TR>
<TR><TD><INPUT TYPE="CHECKBOX" NAME="WordOfMouth" VALUE="1"<% If Request("WordOfMouth") <> "" Then Response.Write " CHECKED" %>></TD><TD>A voce un amico</TD></TR>
<TR><TD><INPUT TYPE="CHECKBOX" NAME="Newspaper" VALUE="1"<% If Request("Newspaper") <> "" Then Response.Write " CHECKED" %>></TD><TD>Giornale e TV</TD></TR>
</TABLE>
</TD></TR>

<tr><td colspan="2"><HR></td></tr>

<TR><TD COLSPAN="2"><INPUT TYPE="SUBMIT" NAME="Save" VALUE="Genera PDF"></TD></TR>

</FORM>
</TABLE><P>

<%
If Request("Save") <> "" Then

Set PDF = Server.CreateObject("Persits.PDF")

' Open an existing form
Set Doc = PDF.OpenDocument( Server.MapPath( "basepdf.pdf" ) )

' Create font object
Set Font = Doc.Fonts("Helvetica-Bold")

' Remove XFA support from it
Doc.Form.RemoveXFA

' Fill in Name
Set field = Doc.Form.FindField("form1[0].#subform[0].Name[0]")
field.SetFieldValue Request("Name"), Font

' Fill in Address
Set field = Doc.Form.FindField("form1[0].#subform[0].Address[0]")
field.SetFieldValue Request("Address"), Font

' Fill in marital status
Set field = Doc.Form.FindField("form1[0].#subform[0].RadioButtonList[0]")
Set ChildField = field.Children( Request("Type") )
ChildField.SetFieldValue ChildField.FieldOnValue, Nothing

' Fill in "How did you hear about us" checkboxes
If Request("Internet") <> "" Then
Set field = Doc.Form.FindField("form1[0].#subform[0].Internet[0]")
field.SetFieldValue field.FieldOnValue, Nothing
End if

If Request("WordOfMouth") <> "" Then
Set field = Doc.Form.FindField("form1[0].#subform[0].WordOfMouth[0]")
field.SetFieldValue field.FieldOnValue, Nothing
End if

If Request("Newspaper") <> "" Then
Set field = Doc.Form.FindField("form1[0].#subform[0].Newspaper[0]")
field.SetFieldValue field.FieldOnValue, Nothing
End if

'Save document
Path = Server.MapPath( "/public/formcompilato-asp.pdf")
FileName = Doc.Save( Path, false)

Response.Write "Form compilato e PDF generato correttamente <A TARGET=""_new"" HREF=/public/" & Filename & ">Apri o scarica qui</A>"

Set Doc = Nothing
Set Pdf = Nothing

End If
%>





fonte accreditata aruba.it