Application Development 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: 

Determining length of otf converted pdf file...

Former Member
0 Kudos

Gurus,

I am using fnction module gui_download to determine the length of a pdf file converted from otf. Is there a way I can find the length of pdf file without downloading and thus avoiding use of gui_download.

CALL FUNCTION 'CONVERT_OTF'

EXPORTING

FORMAT = 'PDF'

max_linewidth = 132

IMPORTING

BIN_FILESIZE = w_bin_filesize

TABLES

OTF = I_OTFDATA

LINES = i_pdf_tab

EXCEPTIONS

ERR_MAX_LINEWIDTH = 1

ERR_FORMAT = 2

ERR_CONV_NOT_POSSIBLE = 3

ERR_BAD_OTF = 4

OTHERS = 5.

IF SY-SUBRC <> 0.

MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

CALL FUNCTION 'GUI_DOWNLOAD'

EXPORTING

FILENAME = FILENAME

FILETYPE = 'BIN'

IMPORTING

FILELENGTH = lv_filelen

TABLES

DATA_TAB = I_PDF_TAB

EXCEPTIONS

FILE_WRITE_ERROR = 1

NO_BATCH = 2

GUI_REFUSE_FILETRANSFER = 3

INVALID_TYPE = 4

NO_AUTHORITY = 5

UNKNOWN_ERROR = 6

HEADER_NOT_ALLOWED = 7

SEPARATOR_NOT_ALLOWED = 8

FILESIZE_NOT_ALLOWED = 9

HEADER_TOO_LONG = 10

DP_ERROR_CREATE = 11

DP_ERROR_SEND = 12

DP_ERROR_WRITE = 13

UNKNOWN_DP_ERROR = 14

ACCESS_DENIED = 15

DP_OUT_OF_MEMORY = 16

DISK_FULL = 17

DP_TIMEOUT = 18

FILE_NOT_FOUND = 19

DATAPROVIDER_EXCEPTION = 20

CONTROL_FLUSH_ERROR = 21

OTHERS = 22

.

Regards,

Rajesh.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

The CONVERT_OTF function module gives you the size, in your case....

IMPORTING

BIN_FILESIZE = w_bin_filesize

Darren

1 REPLY 1

Former Member
0 Kudos

Hi,

The CONVERT_OTF function module gives you the size, in your case....

IMPORTING

BIN_FILESIZE = w_bin_filesize

Darren