cancel
Showing results for 
Search instead for 
Did you mean: 

Edge download pdf as txt

alisonv
Explorer
0 Kudos

When using web Dynpro and downloading a PDF file throw Microsoft Edge the file is saving as .TXT. PDF download works fine with Chrome and Firefox. Why does Edge save a PDF as .TXT? Is there a fix for this?

Here is the code:

cl_wd_runtime_services=>attach_file_to_response(
exporting
i_filename = lv_file_name
i_content = ls_anexo-attachment_bin
i_mime_type = 'pdf'
i_in_new_window = abap_false
i_inplace = abap_false ).
Sandra_Rossi
Active Contributor

What if you use the classic MIME type for PDF files?

      i_mime_type = 'application/pdf'

Accepted Solutions (1)

Accepted Solutions (1)

alisonv
Explorer
cl_wd_runtime_services=>attach_file_to_response(
exporting
i_filename = lv_file_name
i_content = ls_anexo-attachment_bin
i_mime_type = 'application/pdf'
i_in_new_window = abap_false
i_inplace = abap_false ).

Answers (1)

Answers (1)

0 Kudos

Thank a lot for the assistance
The issue may be caused by changing the NWBC engine from Chromium to edge.

When fixing the MIME, we used the central function SDOK_MIMETYPE_GET to get the correct MIMETYPE ('application/pdf) instead of PDF

-