Copy link to clipboard
Copied
I want to convert PDF to postscript. After doing some research, I wrote the following code but got the exception mentioned in title.
AcroPDDoc acroPDDoc = new AcroPDDoc();
var rc3 = acroPDDoc.Open(source);
var jso = acroPDDoc.GetJSObject();
var what = jso.PDF2PS();
acroPDDoc.Close();
Javascript in c:\program files (x86)\adobe\adobat 2015\acrobat\Javascripts. I commented the real code and only returned a value but still got the above exception. Please help. I am in a rush to deliver this piece of code. Thank you very much. J
function PDF2PS()
{
//var pp = this.getPrintParams();
//pp.fileName = filename;
//pp.printerName = "";
//this.print(pp);
return 12345;
}
Copy link to clipboard
Copied
Why would you do this instead of using the saveAs() method?
Have you consulted the documentation or are you tyring to do this entirely from sample code online??
Copy link to clipboard
Copied
I googled a lot and read some Adobe document about Javascript, API, SDK. I tried to this too but failed
function PDF2PS()
{
this.saveAs("/C/Test/_bbbb.ps","com.adobe.acrobat.ps");
}
The exception happened when C# code call Javascript.
Copy link to clipboard
Copied
What happens when you use File> Save As... in Acrobat?
Find more inspiration, events, and resources on the new Adobe Community
Explore Now