<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Converting from SAPSCRIPT to PDF in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/converting-from-sapscript-to-pdf/m-p/2563737#M584742</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;See the sample code and do accordingly&lt;/P&gt;&lt;P&gt;REPORT zzz_jaytest .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Types Declaration&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;TYPES : BEGIN OF ty_pa0001,&lt;/P&gt;&lt;P&gt;pernr TYPE pa0001-pernr,&lt;/P&gt;&lt;P&gt;bukrs TYPE pa0001-bukrs,&lt;/P&gt;&lt;P&gt;werks TYPE pa0001-werks,&lt;/P&gt;&lt;P&gt;END OF ty_pa0001.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Internal Table Declaration&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;DATA : i_pa0001 TYPE STANDARD TABLE OF ty_pa0001, "For pa0001 Details&lt;/P&gt;&lt;P&gt;i_otf TYPE STANDARD TABLE OF itcoo, "For OTF data&lt;/P&gt;&lt;P&gt;i_content_txt TYPE soli_tab, "Content&lt;/P&gt;&lt;P&gt;i_content_bin TYPE solix_tab, "Content&lt;/P&gt;&lt;P&gt;i_objhead TYPE soli_tab,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Work Area Declaration&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;w_pa0001 TYPE ty_pa0001, "For pa0001 Details&lt;/P&gt;&lt;P&gt;w_res TYPE itcpp, "SAPscript output&lt;/P&gt;&lt;P&gt;"parameters&lt;/P&gt;&lt;P&gt;w_otf TYPE itcoo, "For OTF&lt;/P&gt;&lt;P&gt;w_pdf TYPE solisti1, "For PDF&lt;/P&gt;&lt;P&gt;w_transfer_bin TYPE sx_boolean, "Content&lt;/P&gt;&lt;P&gt;w_options TYPE itcpo, "SAPscript output&lt;/P&gt;&lt;P&gt;"interface&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Variable Declaration&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;v_len_in TYPE so_obj_len,&lt;/P&gt;&lt;P&gt;v_size TYPE i.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Constants Declaration&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;CONSTANTS : c_x TYPE c VALUE 'X', "X&lt;/P&gt;&lt;P&gt;c_locl(4) TYPE c VALUE 'LOCL', "Local Printer&lt;/P&gt;&lt;P&gt;c_otf TYPE sx_format VALUE 'OTF', "OTF&lt;/P&gt;&lt;P&gt;c_pdf TYPE sx_format VALUE 'PDF', "PDF&lt;/P&gt;&lt;P&gt;c_printer TYPE sx_devtype VALUE 'PRINTER', "PRINTER&lt;/P&gt;&lt;P&gt;c_bin TYPE char10 VALUE 'BIN', "BIN&lt;/P&gt;&lt;P&gt;c_name TYPE string VALUE 'C:\ZZZ_JAYTEST.PDF',"Downloading&lt;/P&gt;&lt;P&gt;"File Name&lt;/P&gt;&lt;P&gt;c_form(11) TYPE c VALUE 'ZZZ_JAYTEST'. "Form Name&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;START-OF-SELECTION.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Selecting the records from pa0001&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;SELECT pernr bukrs werks FROM pa0001&lt;/P&gt;&lt;P&gt;INTO TABLE i_pa0001 UP TO 10 ROWS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Setting the options&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;w_options-tdcopies = 1 ."Number of copies&lt;/P&gt;&lt;P&gt;w_options-tdnoprev = c_x."No print preview&lt;/P&gt;&lt;P&gt;w_options-tdgetotf = c_x."Return of OTF table&lt;/P&gt;&lt;P&gt;w_options-tddest = c_locl."Spool: Output device&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Opening the form&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;CALL FUNCTION 'OPEN_FORM'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;form = c_form&lt;/P&gt;&lt;P&gt;device = c_printer&lt;/P&gt;&lt;P&gt;language = sy-langu&lt;/P&gt;&lt;P&gt;OPTIONS = w_options&lt;/P&gt;&lt;P&gt;IMPORTING&lt;/P&gt;&lt;P&gt;RESULT = w_res.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT i_pa0001 INTO w_pa0001.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Writting into the form&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;CALL FUNCTION 'WRITE_FORM'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;element = 'MAIN'&lt;/P&gt;&lt;P&gt;window = 'MAIN'.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Closing the form&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;CALL FUNCTION 'CLOSE_FORM'&lt;/P&gt;&lt;P&gt;IMPORTING&lt;/P&gt;&lt;P&gt;RESULT = w_res&lt;/P&gt;&lt;P&gt;TABLES&lt;/P&gt;&lt;P&gt;otfdata = i_otf&lt;/P&gt;&lt;P&gt;EXCEPTIONS&lt;/P&gt;&lt;P&gt;unopened = 1&lt;/P&gt;&lt;P&gt;bad_pageformat_for_print = 2&lt;/P&gt;&lt;P&gt;send_error = 3&lt;/P&gt;&lt;P&gt;spool_error = 4&lt;/P&gt;&lt;P&gt;codepage = 5&lt;/P&gt;&lt;P&gt;OTHERS = 6.&lt;/P&gt;&lt;P&gt;IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno&lt;/P&gt;&lt;P&gt;WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Converting OTF data to single line&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;LOOP AT i_otf INTO w_otf.&lt;/P&gt;&lt;P&gt;CONCATENATE w_otf-tdprintcom w_otf-tdprintpar&lt;/P&gt;&lt;P&gt;INTO w_pdf.&lt;/P&gt;&lt;P&gt;APPEND w_pdf TO i_content_txt.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Converting to PDF Format&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;CALL FUNCTION 'SX_OBJECT_CONVERT_OTF_PDF'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;format_src = c_otf&lt;/P&gt;&lt;P&gt;format_dst = c_pdf&lt;/P&gt;&lt;P&gt;devtype = c_printer&lt;/P&gt;&lt;P&gt;CHANGING&lt;/P&gt;&lt;P&gt;transfer_bin = w_transfer_bin&lt;/P&gt;&lt;P&gt;content_txt = i_content_txt&lt;/P&gt;&lt;P&gt;content_bin = i_content_bin&lt;/P&gt;&lt;P&gt;objhead = i_objhead&lt;/P&gt;&lt;P&gt;len = v_len_in&lt;/P&gt;&lt;P&gt;EXCEPTIONS&lt;/P&gt;&lt;P&gt;err_conv_failed = 1&lt;/P&gt;&lt;P&gt;OTHERS = 2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;v_size = v_len_in.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Downloading the PDF File&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;CALL FUNCTION 'GUI_DOWNLOAD'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;bin_filesize = v_size&lt;/P&gt;&lt;P&gt;filename = c_name&lt;/P&gt;&lt;P&gt;filetype = c_bin&lt;/P&gt;&lt;P&gt;TABLES&lt;/P&gt;&lt;P&gt;data_tab = i_content_bin. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you r using this function module check it once....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;call function 'CONVERT_OTF'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;format = 'PDF'&lt;/P&gt;&lt;P&gt;max_linewidth = 132&lt;/P&gt;&lt;P&gt;IMPORTING&lt;/P&gt;&lt;P&gt;bin_filesize = v_len_in&lt;/P&gt;&lt;P&gt;TABLES&lt;/P&gt;&lt;P&gt;otf = i_otf&lt;/P&gt;&lt;P&gt;lines = i_tline&lt;/P&gt;&lt;P&gt;EXCEPTIONS&lt;/P&gt;&lt;P&gt;err_max_linewidth = 1&lt;/P&gt;&lt;P&gt;err_format = 2&lt;/P&gt;&lt;P&gt;err_conv_not_possible = 3&lt;/P&gt;&lt;P&gt;others = 4.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Fehlerhandling&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;if sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or u can use the standard program RSTXPDFT4 to download the script into PDF format onto a particular location&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;follow this link for sample program.&lt;/P&gt;&lt;P&gt;&lt;A href="http://searchsap.techtarget.com/tip/0,289483,sid21_gci1121833,00.html" target="test_blank"&gt;http://searchsap.techtarget.com/tip/0,289483,sid21_gci1121833,00.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Reward points for useful Answers&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Anji&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 07 Aug 2007 12:24:31 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-08-07T12:24:31Z</dc:date>
    <item>
      <title>Converting from SAPSCRIPT to PDF</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/converting-from-sapscript-to-pdf/m-p/2563736#M584741</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sir,&lt;/P&gt;&lt;P&gt;I am converting form from sapscript to pdf. The form is converting but the ouput font in pdf is seen in bigger size so the alignment is getting distorted. Kindly advise solution. I am in 4.6C&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Aug 2007 12:22:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/converting-from-sapscript-to-pdf/m-p/2563736#M584741</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-07T12:22:04Z</dc:date>
    </item>
    <item>
      <title>Re: Converting from SAPSCRIPT to PDF</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/converting-from-sapscript-to-pdf/m-p/2563737#M584742</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;See the sample code and do accordingly&lt;/P&gt;&lt;P&gt;REPORT zzz_jaytest .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Types Declaration&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;TYPES : BEGIN OF ty_pa0001,&lt;/P&gt;&lt;P&gt;pernr TYPE pa0001-pernr,&lt;/P&gt;&lt;P&gt;bukrs TYPE pa0001-bukrs,&lt;/P&gt;&lt;P&gt;werks TYPE pa0001-werks,&lt;/P&gt;&lt;P&gt;END OF ty_pa0001.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Internal Table Declaration&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;DATA : i_pa0001 TYPE STANDARD TABLE OF ty_pa0001, "For pa0001 Details&lt;/P&gt;&lt;P&gt;i_otf TYPE STANDARD TABLE OF itcoo, "For OTF data&lt;/P&gt;&lt;P&gt;i_content_txt TYPE soli_tab, "Content&lt;/P&gt;&lt;P&gt;i_content_bin TYPE solix_tab, "Content&lt;/P&gt;&lt;P&gt;i_objhead TYPE soli_tab,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Work Area Declaration&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;w_pa0001 TYPE ty_pa0001, "For pa0001 Details&lt;/P&gt;&lt;P&gt;w_res TYPE itcpp, "SAPscript output&lt;/P&gt;&lt;P&gt;"parameters&lt;/P&gt;&lt;P&gt;w_otf TYPE itcoo, "For OTF&lt;/P&gt;&lt;P&gt;w_pdf TYPE solisti1, "For PDF&lt;/P&gt;&lt;P&gt;w_transfer_bin TYPE sx_boolean, "Content&lt;/P&gt;&lt;P&gt;w_options TYPE itcpo, "SAPscript output&lt;/P&gt;&lt;P&gt;"interface&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Variable Declaration&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;v_len_in TYPE so_obj_len,&lt;/P&gt;&lt;P&gt;v_size TYPE i.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Constants Declaration&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;CONSTANTS : c_x TYPE c VALUE 'X', "X&lt;/P&gt;&lt;P&gt;c_locl(4) TYPE c VALUE 'LOCL', "Local Printer&lt;/P&gt;&lt;P&gt;c_otf TYPE sx_format VALUE 'OTF', "OTF&lt;/P&gt;&lt;P&gt;c_pdf TYPE sx_format VALUE 'PDF', "PDF&lt;/P&gt;&lt;P&gt;c_printer TYPE sx_devtype VALUE 'PRINTER', "PRINTER&lt;/P&gt;&lt;P&gt;c_bin TYPE char10 VALUE 'BIN', "BIN&lt;/P&gt;&lt;P&gt;c_name TYPE string VALUE 'C:\ZZZ_JAYTEST.PDF',"Downloading&lt;/P&gt;&lt;P&gt;"File Name&lt;/P&gt;&lt;P&gt;c_form(11) TYPE c VALUE 'ZZZ_JAYTEST'. "Form Name&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;START-OF-SELECTION.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Selecting the records from pa0001&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;SELECT pernr bukrs werks FROM pa0001&lt;/P&gt;&lt;P&gt;INTO TABLE i_pa0001 UP TO 10 ROWS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Setting the options&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;w_options-tdcopies = 1 ."Number of copies&lt;/P&gt;&lt;P&gt;w_options-tdnoprev = c_x."No print preview&lt;/P&gt;&lt;P&gt;w_options-tdgetotf = c_x."Return of OTF table&lt;/P&gt;&lt;P&gt;w_options-tddest = c_locl."Spool: Output device&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Opening the form&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;CALL FUNCTION 'OPEN_FORM'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;form = c_form&lt;/P&gt;&lt;P&gt;device = c_printer&lt;/P&gt;&lt;P&gt;language = sy-langu&lt;/P&gt;&lt;P&gt;OPTIONS = w_options&lt;/P&gt;&lt;P&gt;IMPORTING&lt;/P&gt;&lt;P&gt;RESULT = w_res.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT i_pa0001 INTO w_pa0001.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Writting into the form&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;CALL FUNCTION 'WRITE_FORM'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;element = 'MAIN'&lt;/P&gt;&lt;P&gt;window = 'MAIN'.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Closing the form&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;CALL FUNCTION 'CLOSE_FORM'&lt;/P&gt;&lt;P&gt;IMPORTING&lt;/P&gt;&lt;P&gt;RESULT = w_res&lt;/P&gt;&lt;P&gt;TABLES&lt;/P&gt;&lt;P&gt;otfdata = i_otf&lt;/P&gt;&lt;P&gt;EXCEPTIONS&lt;/P&gt;&lt;P&gt;unopened = 1&lt;/P&gt;&lt;P&gt;bad_pageformat_for_print = 2&lt;/P&gt;&lt;P&gt;send_error = 3&lt;/P&gt;&lt;P&gt;spool_error = 4&lt;/P&gt;&lt;P&gt;codepage = 5&lt;/P&gt;&lt;P&gt;OTHERS = 6.&lt;/P&gt;&lt;P&gt;IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno&lt;/P&gt;&lt;P&gt;WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Converting OTF data to single line&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;LOOP AT i_otf INTO w_otf.&lt;/P&gt;&lt;P&gt;CONCATENATE w_otf-tdprintcom w_otf-tdprintpar&lt;/P&gt;&lt;P&gt;INTO w_pdf.&lt;/P&gt;&lt;P&gt;APPEND w_pdf TO i_content_txt.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Converting to PDF Format&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;CALL FUNCTION 'SX_OBJECT_CONVERT_OTF_PDF'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;format_src = c_otf&lt;/P&gt;&lt;P&gt;format_dst = c_pdf&lt;/P&gt;&lt;P&gt;devtype = c_printer&lt;/P&gt;&lt;P&gt;CHANGING&lt;/P&gt;&lt;P&gt;transfer_bin = w_transfer_bin&lt;/P&gt;&lt;P&gt;content_txt = i_content_txt&lt;/P&gt;&lt;P&gt;content_bin = i_content_bin&lt;/P&gt;&lt;P&gt;objhead = i_objhead&lt;/P&gt;&lt;P&gt;len = v_len_in&lt;/P&gt;&lt;P&gt;EXCEPTIONS&lt;/P&gt;&lt;P&gt;err_conv_failed = 1&lt;/P&gt;&lt;P&gt;OTHERS = 2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;v_size = v_len_in.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Downloading the PDF File&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;CALL FUNCTION 'GUI_DOWNLOAD'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;bin_filesize = v_size&lt;/P&gt;&lt;P&gt;filename = c_name&lt;/P&gt;&lt;P&gt;filetype = c_bin&lt;/P&gt;&lt;P&gt;TABLES&lt;/P&gt;&lt;P&gt;data_tab = i_content_bin. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you r using this function module check it once....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;call function 'CONVERT_OTF'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;format = 'PDF'&lt;/P&gt;&lt;P&gt;max_linewidth = 132&lt;/P&gt;&lt;P&gt;IMPORTING&lt;/P&gt;&lt;P&gt;bin_filesize = v_len_in&lt;/P&gt;&lt;P&gt;TABLES&lt;/P&gt;&lt;P&gt;otf = i_otf&lt;/P&gt;&lt;P&gt;lines = i_tline&lt;/P&gt;&lt;P&gt;EXCEPTIONS&lt;/P&gt;&lt;P&gt;err_max_linewidth = 1&lt;/P&gt;&lt;P&gt;err_format = 2&lt;/P&gt;&lt;P&gt;err_conv_not_possible = 3&lt;/P&gt;&lt;P&gt;others = 4.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Fehlerhandling&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;if sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or u can use the standard program RSTXPDFT4 to download the script into PDF format onto a particular location&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;follow this link for sample program.&lt;/P&gt;&lt;P&gt;&lt;A href="http://searchsap.techtarget.com/tip/0,289483,sid21_gci1121833,00.html" target="test_blank"&gt;http://searchsap.techtarget.com/tip/0,289483,sid21_gci1121833,00.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Reward points for useful Answers&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Anji&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Aug 2007 12:24:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/converting-from-sapscript-to-pdf/m-p/2563737#M584742</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-07T12:24:31Z</dc:date>
    </item>
    <item>
      <title>Re: Converting from SAPSCRIPT to PDF</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/converting-from-sapscript-to-pdf/m-p/2563738#M584743</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SAP has created a standard program RSTXPDFT4 to convert your Sapscripts spools into a PDF format. Specify the spool number and you will be able to download the sapscripts spool into your local harddisk. It looks exactly like what you see during a spool display. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;P&gt;Reward if helpful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sipra&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Aug 2007 12:27:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/converting-from-sapscript-to-pdf/m-p/2563738#M584743</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-07T12:27:08Z</dc:date>
    </item>
    <item>
      <title>Re: Converting from SAPSCRIPT to PDF</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/converting-from-sapscript-to-pdf/m-p/2563739#M584744</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SAP have created a standard program RSTXPDFT4 to convert your Sapscripts spools into a PDF format. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Specify the spool number and you will be able to download the sapscripts spool into your local harddisk. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It look exactly like what you see during a spool display. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please note that it is not restricted to sapsciprts spool only. Any reports in the spool can be converted using the program 'RSTXPDFT4'. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Vasanth&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Aug 2007 12:31:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/converting-from-sapscript-to-pdf/m-p/2563739#M584744</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-07T12:31:07Z</dc:date>
    </item>
  </channel>
</rss>

