05-17-2011 11:27 AM
Hi All,
I am using cl_gui_frontend_services=>execute to open and print a PDF file from the desktop. Once the PDF file prints, Acrobat Reader keeps open and the user must close it manually. Is there a way of closing it automatically? I searched the Forum and the Web and found no solution on this. Is it possible? If so, how?
I found this thread but it is kind of complicated as several printers are used.
Thanks & Regards,
Ernesto.
05-17-2011 11:55 AM
Hi,
I think you can try using OLE for closing PDF.
You can get some idea from source code of SAP function module MS_WORD_OLE_FORMLETTER.
05-17-2011 12:01 PM
Hi,
Thanks for your reply. I've looking at this FM but it seems to be for Word Documents only.
Regards,
Ernesto.
05-17-2011 1:37 PM
You need to add a "/t" to the command/application "AcroRd32.exe", try
CALL METHOD cl_gui_frontend_services=>execute
EXPORTING
application = 'AcroRd32.exe'
parameter = '/p /t <file path and name>.pdf'
minimized = 'X'
synchronous = ' '
operation = ''
EXCEPTIONS
cntl_error = 1
error_no_gui = 2
bad_parameter = 3
file_not_found = 4
path_not_found = 5
file_extension_unknown = 6
error_execute_failed = 7
synchronous_failed = 8
not_supported_by_gui = 9
OTHERS = 10.
Regards,
Raymond
05-17-2011 1:42 PM
Hi Raymond,
Very helpful! My PDF closes but the Acrobat Reader application stays open. Can this be closed?
Thanks
Ernesto
05-17-2011 2:59 PM
Sorry, i don't remember the exact switch, try to search in [forums.adobe.com]
Regards,
Raymond
05-20-2011 4:04 PM
Hi,
I couldn't find anything to close the Adobe Application.
I close the thread.
Ernesto.
03-04-2020 2:27 PM
Hi All,
Am facing the same problem. After printing, the adobe acrobat reader is still open. Did anyone find any solution to this problem?
Regards,
Vishal Agrawal