on 12-23-2014 9:02 AM
Hi experts,
I have a requirement to print Graphic from URL . I have created a Graphic node and given the url = 'C:\Users\Public\Pictures\Sample Pictures\Chrysanthemum.jpg' . But it is not displayed in the form output.
Please let me know how to resolve this issue.
Thanks,
Sivashankaran G
hi ,
You can use 2 ways to display image in adobe form
1. Static
take the image field from object library and double click on that field and select the
image and enable the check box , Embed image.
2. Dynamic image
-Upload image in se78 .
-Create graphic node in form context and specity the global variable n the properties ,contents the xstring of uploaded image by BDS_GRAPHIC function.
- Bind the graphic node to the image field.
Thanks
Jitendra
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Siva
You can use below code to get XSTRING from URL
TRY.
" Create the HTTP client
CALL METHOD cl_http_client=>create_by_url
EXPORTING
url = url //pass the URL here
IMPORTING
client = lo_client
EXCEPTIONS
argument_not_found = 1
plugin_not_active = 2
internal_error = 3.
IF sy-subrc = 0.
" Set header fields.
CALL METHOD lo_client->request->set_header_field
EXPORTING
name = '~request_method'
value = 'GET'.
CALL METHOD lo_client->request->set_header_field
EXPORTING
name = '~server_protocol'
value = 'HTTP/1.1'.
CALL METHOD lo_client->request->set_header_field
EXPORTING
name = 'Content-Type'
value = 'image/jpeg'.
"send and receive
lo_client->send( ).
lo_client->receive( ).
"get status
lo_client->response->get_status( IMPORTING code = lv_return_code ).
"get the response as binary data
ls_parent_attributes-logo = lo_client->response->get_data( ).
"close connection
lo_client->close( ).
ENDIF. "sy-subrc = 0
CATCH cx_root.
ENDTRY.
Hope it will work
Thanks
Jitendra
Hi Jitendra,
Thank you . I tried to use URL but couldn't display .Meanwhile FC's said the image will be loaded into content server and from there i can pick. so i converted the content server- image into xstring and bind the value to the field in graphic content , thus it works.
Thanks,
Sivashankaran G
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.