ABAP PRINT PDF FILE

 

 

 

http://www.sapfans.com/forums/viewtopic.php?f=13&t=324672

 

Have a look at program SAP_PDF_VIEWER_DEMO. This has a 'PRINT' method.

If you don't want to go to all the trouble of using the PDF viewer you can always use GUI_EXECUTE to run Acrobat with a /p option.

However, if you are trying to do what I was which is to print a sequence of documents note that the print spooler used is the local pc's spooler rather than the SAP Spooler so your PDF can be printed at any time and not neccesarily in the sequence that you send the prints from SAP. It could also be printed on a totally different printer dependant on the users printer settings.

 

-----------------------------------------------------

I have a PDF file in "C:/".
printed pdf file using cl_gui_frontend_services=>execute.

When pdf file prints then it opens the acrobat reader and the program waits until I close the acrobat reader.

Could you please let me if any options is there without open the pdf file or if it opens don’t wait for the close(automatically closed).

 

 

-----------------------------------------------------

Have you got succeed to print a pdf directly from SAP?
And is it the same principe with excel file and word file?

 

You'll see that he is using the method of running acrobat reader and using a command line option to print the file.

As for Word and Excel files, use OLE.

 

I have still a problem to print a PDF in SAP.
The fact is that my file is not on my PC but on a server which it's necessary to connect to reach it, have you a idea to help me?
And have you know the DOS command to print a file (excel and word) from SAP.

 

 

 

 

http://forums.sdn.sap.com/message.jspa?messageID=8715149

 

I want to print PDF file from desk top using cl_gui_frontend_services=>execute . My issue is the PDF file will be open but not printing. can you please advide me how to call this method.

CALL METHOD cl_gui_frontend_services=>execute
EXPORTING
* document = lv_dir
application = 'AcroRd32.exe'
parameter = 'C:/test.PDF'
minimized = 'X'
* synchronous = ' '
operation = 'PRINT'
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 .

 

 

 

-----------------------------------------------------

 

CALL METHOD cl_gui_frontend_services=>execute
EXPORTING
* document = lv_dir
application = 'AcroRd32.exe'
parameter = '/p /h C:/YourPDFile.pdf'    "P = Print, h = Hide Window
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 .


Look also at URL http://support.adobe.com/devsup/devsup.nsf/docs/52080.htm

 

-----------------------------------------------------

 

Look at the print method in program SAP_PDF_VIEWER_DEMO
CL_GUI PDF VIEWER=>print

 

http://wiki.sdn.sap.com/wiki/display/ABAP/Working+with+files#Workingwithfiles-OLE%2FDOIforOfficenativefiles%28Excel%2CWord%2Cetc.%29

 

 

 

http://www.sap-img.com/bc037.htm

Auto convert SAP spool output to PDF file

 

 

 

http://sap.ittoolbox.com/groups/technical-functional/sap-abap/print-pdf-file-2230035

 

 

 

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章