on 06-30-2014 4:53 PM
Hi Experts,
I am trying to write print PDF custom action block. I am saving the PDF image to a location and then printing the PDF. For this I have created a java process.I am able to print the PDF but AcroRD32.exe process is not getting destroyed. Because of this next time when I try to run and save the PDF image, I am getting error "The process cannot access the file because it is being used by another process" .
String str = "\"" + AdobeLocation + "\"" + " " + "/t" + " " + "\""
+ FilePath + "\"" + " " + "\"" + PrinterName + "\"";
Process p1 = Runtime.getRuntime().exec(str);
p1.destroy();
need yopur help in resolving this.
Thanks & Regards,
Eshwar.
Why are you saving the file to a temporary location prior to printing it? Why are you not saving it as a unique filename each time and then using the File I/O -> Delete File action to clean it up after it's done printing?
Sam
PS: I have already written a "File Runner" action block for MII and it's on the MII Wiki here (Customization - xMII - SCN Wiki) called File Runner Custom Action: http://scn.sap.com/docs/DOC-22962 and the associated document has the complete code of the action.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
10 | |
5 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.