cancel
Showing results for 
Search instead for 
Did you mean: 

PDF viewer into new browser window

ludek_bednarz
Explorer
0 Kudos

Hello,

I use following code to open new browser window with PDF file. The URL passed to the method is link to SICF service which returns the PDF in the request with content-type = 'application/pdf'. New window is open with correct URL, but the content is not displayed - Refresh or Go button has to be pressed to display it. Don't you experience similar problem? Is this WD error or some IE security setting?

Thank you and best regards,

Ludek

  lr_window = lr_w_manager->create_external_window(
      url = ld_url
      title = ''
      modal = abap_false
      has_menubar = abap_true
      is_resizable = abap_true
      has_scrollbars = abap_true
      has_statusbar = abap_true
      has_toolbar = abap_true ).
  lr_window->open( ).

Accepted Solutions (1)

Accepted Solutions (1)

thomas_szcs
Active Contributor
0 Kudos

Hi Ludek,

Probably a compression problem. Have you turned off gzip compression for the pdf?

Btw, an alternate solution without having a separate handler is to use the cl_wd_runtime_services=>attach_file_to_response() method.

Best regards,

Thomas

ludek_bednarz
Explorer
0 Kudos

Hello Thomas,

thanks, it was really the compression setting.

Thank you and best regards,

Ludek

Answers (0)