Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Format picture using OLE:

Former Member
0 Likes
311

Hi All,

We download employee data along with his photo into word document. Photo is maintained in OAAD transaction. the problem is while downloading the picture occupies the whole page. we are using 'WORD.OBJ' application in OLE.

Kindly let me know how do i reduce the size of the image?what is the method to be used? and also what are the properties to be passed?

1 REPLY 1
Read only

Former Member
0 Likes
253

Use class CL_IGS_IMAGE_CONVERTER:

  • Set IGS parameter

CALL METHOD lo_igsconverter->set_image

EXPORTING

blob = i_tab_org_binary

blob_size = i_output_length.

lo_igsconverter->input = org_mime_type.

lo_igsconverter->output = prev_mime_type.

lo_igsconverter->height = prev_height.

lo_igsconverter->width = prev_width.

  • Execute IGS conversion

CALL METHOD lo_igsconverter->execute

EXCEPTIONS

communication_error = 1

internal_error = 2

external_error = 3

OTHERS = 4.

  • Get converted image

CALL METHOD lo_igsconverter->get_image

IMPORTING

blob = lt_prev_binary

blob_size = prev_size.