cancel
Showing results for 
Search instead for 
Did you mean: 

Smartform Pdf Printing

Former Member
0 Kudos

Hi All

Can any one tel how to print pdf file through smartform .

while executing the prog it goes to printer

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi!

 
CALL FUNCTION 'CONVERT_OTF'
 EXPORTING
   format                      = 'PDF'
*   MAX_LINEWIDTH               = 132
*   ARCHIVE_INDEX               = ' '
*   COPYNUMBER                  = 0
*   ASCII_BIDI_VIS2LOG          = ' '
*   PDF_DELETE_OTFTAB           = ' '
* IMPORTING
*   BIN_FILESIZE                =
*   BIN_FILE                    =
  TABLES
    otf                         = i_otf
    lines                       = i_pdf
 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.

Try this ....it converts form to PDF.

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

once u get the OTFDATA, just pass the OTF table data to the below FM..then u ill get the Output in PDF..

CALL FUNCTION 'SSFCOMP_PDF_PREVIEW'

EXPORTING

i_otf = otf_data1[]

EXCEPTIONS

acrobat_not_registered = 1

convert_otf_to_pdf_error = 2

download_error = 3

acrobat_not_started = 4

cntl_error = 5

OTHERS = 6.

Rgds,

Pavan

Former Member
0 Kudos

Hi,

Try with FM : CONVERT_OTF_2_PDF. for this search there are many posts in SDN