Creare un documento PDF con asp senza salvarlo SUL SERVER.. il file PDF viene reso scaricabile (o stampabile, senza che poi risieda su alcuna root del server..): "attachment" - servito come HTTP
l' utilizzo è di assoluta facilità: copia inclolla e salva come *.asp
CODICE:
<%
Set Pdf = Server.CreateObject("Persits.Pdf")
' Create empty document
Set Doc = Pdf.CreateDocument
' Set various document properties
Doc.Title = "TITOLO DOCUMENTO "
Doc.Creator = "..AUTORE.."
' Add a new page
Set Page = Doc.Pages.Add
' Select one of the standard PDF fonts
Set Font = Doc.Fonts("Helvetica")
' Param string
Params = "x=0; y=650; width=612; alignment=center; size=50"
' Draw text on page
Page.Canvas.DrawText "..CONTENUTO DEL DOCUMENTO.. ", Params, Font
' Save to HTTP stream
Doc.SaveHttp "attachment;filename=NomeNuovoPDF.pdf"
%>
|