* event handler for data retrieval
*---PDF 정의 START---*
DATA: pdf_fsize TYPE i.
DATA: pdf_table TYPE TABLE OF tline. "rcl_bag_tline.
DATA: BEGIN OF pdf_line,
line(134) TYPE c,
END OF pdf_line.
DATA: pdf_line_tab LIKE TABLE OF pdf_line.
DATA: p_repid TYPE sy-repid,
p_dynnr TYPE sy-dynnr,
url(255),
extnsion TYPE i.
DATA: l_pdf_xstring TYPE xstring,
l_pdf_string TYPE string,
lt_lines TYPE TABLE OF tline,
ls_line TYPE tline,
l_devtype TYPE rspoptype,
l_pdf_len TYPE i.
DATA: st_itcoo TYPE itcoo.
DATA: it_otf LIKE TABLE OF st_itcoo.
DATA: lv_pdfsize TYPE i,
lv_pdfxstring TYPE xstring,
lv_subrc TYPE sy-subrc.
DATA: cached_response TYPE REF TO if_http_response.
DATA: guid TYPE guid_32.
*---PDF 정의 END---*
*---SPOOL 정의 START---*
DATA: ls_tline TYPE tline,
lt_tline TYPE TABLE OF tline,
ls_rqident TYPE tsp01-rqident,
ls_tsp01 TYPE tsp01.
*---SPOOL 정의 END---*
*---SUBMIT PARAMETER 정의 START---*
DATA: print_parameters TYPE pri_params.
*---SUBMIT PARAMETER 정의 END---*
*
DATA: l_pernr TYPE pernr-pernr,
l_year(4).
DATA: event TYPE REF TO cl_htmlb_event.
DATA: ddbox TYPE REF TO cl_htmlb_dropdownlistbox. "20080103-I
CLEAR: lv_pdfxstring, lv_pdfsize, lv_subrc, it_otf[].
CALL FUNCTION 'ZHR_YEA_RCT_PDF'
EXPORTING
im_pernr = '12345678' "application->userinfo-pernr
im_year = '2008'
IMPORTING
bin_filesize = lv_pdfsize
bin_file = lv_pdfxstring
subrc = lv_subrc
TABLES
it_otf = it_otf.
IF lv_subrc = 0.
CREATE OBJECT cached_response TYPE cl_http_response EXPORTING add_c_msg = 1.
cached_response->set_data( data = lv_pdfxstring
length = lv_pdfsize ).
cached_response->set_header_field( name = if_http_header_fields=>content_type
value = 'application/pdf' ).
cached_response->set_header_field( name = 'CharSet'
value = 'EUC-KR' ).
cached_response->set_header_field( name = if_http_header_fields=>accept_language
value = 'EUC-KR' ).
cached_response->set_status( code = 200 reason = 'OK' ).
cached_response->server_cache_expire_rel( expires_rel = 180 ).
CALL FUNCTION 'GUID_CREATE'
IMPORTING
ev_guid_32 = guid.
CONCATENATE runtime->application_url '/' guid '.pdf' INTO display_url.
cl_http_server=>server_cache_upload( url = display_url
response = cached_response ).
ELSE.
CLEAR display_url.
ENDIF.
CALL FUNCTION 'ZHR_YEA_RCT_PDF' 에서
CALL FUNCTION 'CONVERT_OTF' 를 사용하여 변환하였습니다.
it_otf 내용을 확인해 보면 한글은 제대로 들어가 있는데
웹페이지를 띄운 화면에서 한글이 다 깨져 보입니다.
어디서 잘못된건지 아시는분 있으시면 답변 좀 부탁 드립니다.