Description

Outputs the PDF document to a file.

Syntax

Public Sub DrawToFile( _
   ByVal FilePath As String _
) 

Parameters

FilePath
The physical path and file name of the output. If the file exists it will be overwritten. If it does not exist it will be created.

Remarks

Use method in ASP - VBScript instead of in ASP

Example

[VBScript] 


    Dim MyDocument
    Set MyDocument = WScript.CreateObject( "DynamicPDF.Document" )
    Dim MyPage
    Set MyPage = MyDocument.AddPage()
    Dim MyDir
    MyDir = CreateObject( "Scripting.FileSystemObject" ).GetFolder(".").Path
    Dim MyImportedPageArea
    Set MyImportedPageArea = MyPage.AddImportedPageArea( MyDir & "\PDFs\fw9AcroForm_03.pdf", 1, 0, 0, 50 )
    MyImportedPageArea.Contents.ClipLeft = 10
    MyImportedPageArea.Contents.ClipTop = 10
    MyImportedPageArea.Contents.ClipRight = 10
    MyImportedPageArea.Contents.ClipBottom = 10
    MyDocument.DrawToFile( "DrawFile.pdf" )
    Set MyPage = Nothing
    Set MyDocument = Nothing

See Also

Document Object