Code Samples - Neevia docCreator

Example 8: Convert a PostScript document into PDF - Visual Basic Copy 

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
   Dim documentToConvert : documentToConvert="c:\users\public\test.ps"

   Dim DC : Set DC = CreateObject("Neevia.docCreator")

   DC.setParameter "DocumentOutputFormat", "PDF"
   DC.setParameter "DocumentOutputName", "testPS_VB"
   DC.setParameter "DocumentOutputFolder", "c:\users\public\"

   Dim RVal : RVal = DC.setInputDocument(documentToConvert)
   If (RVal <> 0) Then MsgBox "Invalid input document!!!"

   RVal = DC.create
   Set DC = Nothing

   If (RVal <> 0) Then 
     MsgBox "Error while converting the document!!!"
   else
     MsgBox "Done!!!"
   End If