Skip to Content
0
Former Member
Apr 15, 2014 at 01:32 AM

Transfer pdf file to application server

1332 Views

Hi Experts,

I am converting smartforms into pdf and try to send to application server but file is corrupted and cannot open.

The code is as follows

CALL FUNCTION 'CONVERT_OTF'

EXPORTING

FORMAT = 'PDF'

MAX_LINEWIDTH = 132

  • ARCHIVE_INDEX = ' '
  • COPYNUMBER = 0
  • ASCII_BIDI_VIS2LOG = ' '
  • PDF_DELETE_OTFTAB = ' '

IMPORTING

BIN_FILESIZE = W_bin_filesize

BIN_FILE = l_pdf_xstring

TABLES

otf = T_OTF

lines = T_pdf_tab

EXCEPTIONS

ERR_MAX_LINEWIDTH = 1

ERR_FORMAT = 2

ERR_CONV_NOT_POSSIBLE = 3

ERR_BAD_OTF = 4

OTHERS = 5

IF W_bin_filesize > 0.

OPEN DATASET p_filein FOR OUTPUT IN BINARY MODE.

transfer l_pdf_xstring to p_filein.

close dataset p_fielin.

endif.

Please advise how to get the correct file.

Thanks in advance.

Warm regards

Chandra