I am using the PDFGAPI7.submitJob() method for PDF to PS conversion,following is the code ,as the 'jobConfiguration' parameter i have used 'PDFGAPI7.getPDFExportXML("PS", 0,null)' as mentioned by the api ,i am still not able to convert the 'pdf' to .ps, i get a 'The supplied post script has errors' even though i am passing a 'pdf' as the input and expecting a .ps as the output file.Is the api usage correct?
will appreciate ur comments
Hashtable propsJNDI = new Hashtable();
// Populate the Hashtable object with JNDI environment values
propsJNDI.put("java.naming.factory.initial","org.jnp.interfaces.NamingContextFactory");
propsJNDI.put("java.naming.provider.url","jnp://localhost:1099");
propsJNDI.put("java.naming.factory.url.pkgs","org.jboss.naming:org.jnp.interfaces");
InitialContext initialContextOb = new InitialContext(propsJNDI);
//Look up the default PDFGAPI7 home object using the default properties case,//and then create an EJBClient object for it.
Object homeObject = initialContextOb.lookup( PDFGAPI7Home.JNDI_NAME );
PDFGAPI7Home apiHome =( PDFGAPI7Home )PortableRemoteObject.narrow( homeObject,PDFGAPI7Home.class );
PDFGAPI7 apiBean=apiHome.create();
String pdfExportXML=apiBean.getPDFExportXML("PS", 0,null);//for pdf to other file conversions
AESAPIResults result= apiBean.submitJob("pdftoPsConversion",
new java.io.File("C:/Temp/test.pdf"),
"test.ps",
false,
pdfExportXML,
null,
9,
null,
null,
"en_US",
null);
This creates the directory C:\WINDOWS\Temp\pdfg-SYSTEM\20\fde3-fffbb5-dfab61-e655cd-10b4c4-fd76a1\destdir with 3 files
1)test.log,2)_error_( with the code '12011' as the content)
I was able to locate the code ('1009') in pdfg-all.ear >aes-common.jar>ErrorCodes.properties
"12011 = The supplied PostScript has errors.".This indicates the usage of api is wrong ,please do let me know the right usage .
3)_done_(has no content)