I am trying the code athttp://livedocs.adobe.com/livecycle/es/sdkHelp/programmer/sdkHelp/wwhelp/wwhimpl/common/ht ml/wwhelp.htm?context=sdkHelp&file=convertPDFToPS.63.3.html
import java.io.File;
import java.io.FileInputStream;
import java.io.InputStream;
import java.io.FileNotFoundException;
import java.util.Properties;
import com.adobe.idp.Document;
import com.adobe.idp.dsc.clientsdk.ServiceClientFactory;
import com.adobe.livecycle.convertpdfservice.client.ConvertPdfServiceClient;
import com.adobe.livecycle.convertpdfservice.client.enumeration.PSLevel;
public class JavaAPIConvertPDFtoPS
{
public static void main(String[] args)
{
// Specify connection properties necessary to create a Distiller Service client
Properties ConnectionProps = new Properties();
ConnectionProps.setProperty("DSC_DEFAULT_EJB_ENDPOINT", "jnp://localhost:1099");
ConnectionProps.setProperty("DSC_TRANSPORT_PROTOCOL", "EJB");
ConnectionProps.setProperty("DSC_SERVER_TYPE", "JBoss");
ConnectionProps.setProperty("DSC_CREDENTIAL_USERNAME", "administrator");
ConnectionProps.setProperty("DSC_CREDENTIAL_PASSWORD", "password");
// Create a ServiceClientFactory instance
ServiceClientFactory factory = ServiceClientFactory.createInstance(ConnectionProps);
try
{
// Get a PDF file document to convert to a PS document and populate a com.adobe.idp.Document object
String inputFileName = "C:\\test.pdf";
FileInputStream fileInputStream = new FileInputStream(inputFileName);
Document inDoc = new Document(fileInputStream);
// Perform the conversion and get the newly created document
Document createdDocument = new ConvertPdfServiceClient(factory).toPS(
inDoc,
PSLevel.LEVEL_3
);
// Save the file
createdDocument.copyToFile(new File("C:\\test.ps"));
}
catch (Exception e)
{
System.out.println("Error OCCURRED: " + e.getMessage());
}
}
}
This code is client code. Is there an equivalent server side code, where there is no need to make any server connection?