Skip to Content
avatar image
Former Member

PDF -> read, show and print

I am needing to read an archive pdf and to soon print to follow. I tried to use the classroom to cl_gui_pdfviewer, however error at the moment is occurring to show the read archive. I tried to also use the program demon of sap SAP_PDF_VIEWER_DEMO, and it it presents problem the same. If somebody will have some tip or suggestion, I am thankful.

Alex

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    avatar image
    Former Member
    Apr 05, 2006 at 12:51 PM

    See the link's below:

    reading-a-pdf-file

    reading-a-pdf-file

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi

      If you need to open and show a pdf file you can use the method EXECUTE of class CL_GUI_FRONTEND_SERVICES.

      CALL METHOD cl_gui_frontend_services=>execute

      EXPORTING

      document = 'MY_FILE.pdf'

      • APPLICATION =

      • PARAMETER =

      default_directory = path

      • MAXIMIZED =

      • MINIMIZED =

      • SYNCHRONOUS =

      • OPERATION = 'OPEN'

      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

      .

      IF sy-subrc <> 0.

      MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno

      WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

      ENDIF.

      Max