You can use Smartforms to display pdf in your app.
Step-by-step guide
- Create and design smartform layout.
- Create an odata service to call and process created smartform returning pdf data.
- Sample entity set definition:
...
3. Use function module CONVERT_OTF to convert OTF to PDF.
IF ls_return-otfdata[] IS NOT INITIAL.
lt_otf[] = ls_return-otfdata[].
CALL FUNCTION 'CONVERT_OTF'
EXPORTING
format = 'PDF'
max_linewidth = 132
IMPORTING
bin_filesize = lv_len_in
bin_file = lv_pdf_xstring
TABLES
otf = lt_otf
lines = lt_tline
EXCEPTIONS
err_max_linewidth = 1
err_format = 2
err_conv_not_possible = 3
OTHERS = 4.
ENDIF.
4. Pass bin_file parameter from FM CONVERT_OTF to PDFData form field.
...