The following VB.NET example demonstrates the PSToPDF Server method, which converts a PostScript® file to PDF.
NOTE: This example is available in other script languages, you may select from the Code Sample list above to download the example in the language appropriate for your environment.
These files are required:
postscript.PS - The PS file to convert to PDF.
PSToPDF.vb - Code detail provided below.
Click here to download this example for VB.NET (includes required files):
Example:
Imports APServerNET
Public Class PSToPDF
Public Sub exPSToPDF()
' Variables
' Name of PS file to convert
Dim strPSFileName As String = Application.StartupPath & "\postscript.ps"
' Name of PDF file to create
Dim strPDFFileName As String = Application.StartupPath & "\ps.pdf"
' Instantiate activePDF Server Object
Dim objSVR As APServerNET.APServer = New APServerNET.APServer
' PSToPDF
Dim lngRtn As Long = objSVR.PSToPDF(strPSFileName, strPDFFileName)
If lngRtn = 0 Then
The information in this article is for the use of activePDF Customers and Evaluation Users Only. No part of this document may be transmitted or reproduced without the express written consent of activePDF.