10-02-2020 10:44 AM
Hello experts,
a little description of the process: During the processing of the Abap program, I get from an external server pdf file which I need to pass to Adobe Forms and print it. (The main purpose of passing to Adobe Forms it set landscape document orientation on the left half of the page)
What I tried:
I didn't find a way, which I can use to passing to Adobe Forms pdf file directly therefore I prepared a Java program for converting it to a gif file. I tried calling as a .jar file and also as .exe file, but I faced a new problem with calling this program via the Abap program via FM 'SXPG_COMMAND_EXECUTE' with custom external operation system commands(sm69) with the name of external program cmd /C and additional parameter: the path to the java program - in the case passing jar file - program all the time in processing but without result, in the case exe file, program duration is 5 sec, but the file is not converted.
The second way I used cl_gui_frontend_services=>execute- this way converts the file correctly, but it requires interaction with a user to permit access to the file that I want to avoid.
The 3 way was to execute the bat file with content: pushd %~dp0 "convert.exe" or "convert.jar" popd - the same results mentioned above.
When I call jar, exe, bat file directly, the java program runs correctly, and in the and I got a converted file.
Question: Do you have any idea how I can solve this task?
Thanks and regards
Serhii
10-02-2020 11:17 AM
How do you choose which PDF file will be converted? Does the external program look in specific folder?
10-02-2020 11:23 AM