<%@ Page AspCompat="true" %>
<script runat="server">

    ' Insert page code here
    '
    dim PDF as Object
    dim str as String
    
    const csPropTextAlign = 102
    const algLeft = 0
    const algRight = 1
    const algCenter = 2
    const algJustified = 3
    
    Sub Page_Load(sender As Object, e As EventArgs)
    
        ' Create the object
        PDF = server.createobject("aspPDF.EasyPDF")
    
        ' Check version and run only if it's greater than 1.0
    
        Response.Write("<p>" + PDF.Version + "</p>")
        if PDF.NVersion >= 110 then
    
           PDF.DEBUG = True
           PDF.License("EasyPDF.lic")
    
           ' Margins
    	   PDF.SetMargins(20,50,50,50)
    
    	   PDF.SetFont("F1", 14, "#000000")
    	
    	  ' Draw some graphics
           PDF.AddGraphicPos(0,0, "c:\inetpub\wwwroot\PDFImageM.Jpg")
           PDF.AddGraphicPos(10,80, "c:\inetpub\wwwroot\PDFImage1.Gif")
           
           ' Some text stuff
           PDF.SetPos(0, 200)
    	   PDF.SetProperty(csPropTextAlign, algJustified)
    	   PDF.AddText("Hello,<br>This file has been generated in realtime from an Internet Server in ASP to an Acrobat Reader PDF document.<br><br>")
    	   ' This text is from Adobe
    	   str = "THE ORIGINS OF THE Portable Document Format and the Adobe® Acrobat® " & _
    		      "product family date to early 1990. At that time, the PostScript® page description " & _
    		      "language was rapidly becoming the worldwide standard for the production of the " & _
    		      "printed page. PDF builds on the PostScript page description language by layering " & _
    		      "a document structure and interactive navigation features on PostScript’s under-lying " & _
    		      "imaging model, providing a convenient, efficient mechanism enabling documents " & _
    		      "to be reliably viewed and printed anywhere.<br><br><br>"
    	   PDF.AddText(str)
    	   ' Save into a file
    	   PDF.Save("c:\inetpub\wwwroot\aspEasyPDF.pdf")
    	   response.Write("<p><center><a href=""c:\inetpub\wwwroot\aspEasyPDF.pdf"">See the results</a>")
    	   ' or Use Binary Wirte
    	   'PDF.BinaryWrite 
    	end if
    
    
        PDF = nothing
    End Sub

</script>
<html>
<head>
</head>
<body>
</body>
</html>