<?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 Problems converting to PDF? in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/problems-converting-to-pdf/m-p/1608869#M273162</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am converting the report documentation into PDF. It all works fine but the print format from PDF is very very small. I am not using SMARTFORMS but rather calling FM to get the report documentation and then converting into PDF. I am attaching the code below, please run the code and you will understand what i mean when you try to print from the converted PDF file. Please give me some suggestion, solution, or sample code. It will be appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Nahman&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*Start of code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ATA: header LIKE thead,&lt;/P&gt;&lt;P&gt;      options LIKE itcpo.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: lines LIKE tline OCCURS 0 WITH HEADER LINE,&lt;/P&gt;&lt;P&gt;       otfdata LIKE  itcoo OCCURS 0 WITH HEADER LINE,&lt;/P&gt;&lt;P&gt;       pdflines LIKE tline OCCURS 0 WITH HEADER LINE,&lt;/P&gt;&lt;P&gt;       doc_itab LIKE  docs OCCURS 0 WITH HEADER LINE,&lt;/P&gt;&lt;P&gt;       binfilesize TYPE i,&lt;/P&gt;&lt;P&gt;       filenm TYPE string.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PARAMETERS: program LIKE trdir-name OBLIGATORY,&lt;/P&gt;&lt;P&gt;            filenam LIKE rlgrap-filename DEFAULT 'c:\temp\pdftest.pdf'.&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;P&gt;  CALL FUNCTION 'DOC_OBJECT_GET'&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      class                  = 'RE'&lt;/P&gt;&lt;P&gt;      name                   = program&lt;/P&gt;&lt;P&gt;     language               = sy-langu&lt;/P&gt;&lt;P&gt;   IMPORTING&lt;/P&gt;&lt;P&gt;     header                 = header&lt;/P&gt;&lt;P&gt;    TABLES&lt;/P&gt;&lt;P&gt;      itf_lines              = lines&lt;/P&gt;&lt;P&gt;   EXCEPTIONS&lt;/P&gt;&lt;P&gt;     object_not_found       = 1&lt;/P&gt;&lt;P&gt;     OTHERS                 = 2&lt;/P&gt;&lt;P&gt;            .&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;P&gt;  options-tdgetotf = 'X'.&lt;/P&gt;&lt;P&gt;  options-tdprogram = 'SAPLSHL2'.&lt;/P&gt;&lt;P&gt;  options-tddest = 'LP01'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'PRINT_TEXT'&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      application                    = 'TD'&lt;/P&gt;&lt;P&gt;      device                         = 'PRINTER'&lt;/P&gt;&lt;P&gt;      dialog                         = ' '&lt;/P&gt;&lt;P&gt;      header                         = header&lt;/P&gt;&lt;P&gt;      OPTIONS                        = options&lt;/P&gt;&lt;P&gt;    TABLES&lt;/P&gt;&lt;P&gt;      lines                          = lines&lt;/P&gt;&lt;P&gt;      otfdata                        = otfdata&lt;/P&gt;&lt;P&gt;               .&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;P&gt;  REFRESH lines.&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;   IMPORTING&lt;/P&gt;&lt;P&gt;     bin_filesize                = binfilesize&lt;/P&gt;&lt;P&gt;     TABLES&lt;/P&gt;&lt;P&gt;       otf                         =  otfdata&lt;/P&gt;&lt;P&gt;       lines                       =  pdflines&lt;/P&gt;&lt;P&gt;              .&lt;/P&gt;&lt;P&gt;  IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'GUI_DOWNLOAD'&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;   bin_filesize                    = binfilesize&lt;/P&gt;&lt;P&gt;      filename                        = filenm&lt;/P&gt;&lt;P&gt;      filetype                        = 'BIN'&lt;/P&gt;&lt;P&gt;    TABLES&lt;/P&gt;&lt;P&gt;      data_tab                        = pdflines[]&lt;/P&gt;&lt;P&gt;               .&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;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 02 Oct 2006 21:39:14 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-10-02T21:39:14Z</dc:date>
    <item>
      <title>Problems converting to PDF?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problems-converting-to-pdf/m-p/1608869#M273162</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am converting the report documentation into PDF. It all works fine but the print format from PDF is very very small. I am not using SMARTFORMS but rather calling FM to get the report documentation and then converting into PDF. I am attaching the code below, please run the code and you will understand what i mean when you try to print from the converted PDF file. Please give me some suggestion, solution, or sample code. It will be appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Nahman&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*Start of code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ATA: header LIKE thead,&lt;/P&gt;&lt;P&gt;      options LIKE itcpo.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: lines LIKE tline OCCURS 0 WITH HEADER LINE,&lt;/P&gt;&lt;P&gt;       otfdata LIKE  itcoo OCCURS 0 WITH HEADER LINE,&lt;/P&gt;&lt;P&gt;       pdflines LIKE tline OCCURS 0 WITH HEADER LINE,&lt;/P&gt;&lt;P&gt;       doc_itab LIKE  docs OCCURS 0 WITH HEADER LINE,&lt;/P&gt;&lt;P&gt;       binfilesize TYPE i,&lt;/P&gt;&lt;P&gt;       filenm TYPE string.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PARAMETERS: program LIKE trdir-name OBLIGATORY,&lt;/P&gt;&lt;P&gt;            filenam LIKE rlgrap-filename DEFAULT 'c:\temp\pdftest.pdf'.&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;P&gt;  CALL FUNCTION 'DOC_OBJECT_GET'&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      class                  = 'RE'&lt;/P&gt;&lt;P&gt;      name                   = program&lt;/P&gt;&lt;P&gt;     language               = sy-langu&lt;/P&gt;&lt;P&gt;   IMPORTING&lt;/P&gt;&lt;P&gt;     header                 = header&lt;/P&gt;&lt;P&gt;    TABLES&lt;/P&gt;&lt;P&gt;      itf_lines              = lines&lt;/P&gt;&lt;P&gt;   EXCEPTIONS&lt;/P&gt;&lt;P&gt;     object_not_found       = 1&lt;/P&gt;&lt;P&gt;     OTHERS                 = 2&lt;/P&gt;&lt;P&gt;            .&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;P&gt;  options-tdgetotf = 'X'.&lt;/P&gt;&lt;P&gt;  options-tdprogram = 'SAPLSHL2'.&lt;/P&gt;&lt;P&gt;  options-tddest = 'LP01'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'PRINT_TEXT'&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      application                    = 'TD'&lt;/P&gt;&lt;P&gt;      device                         = 'PRINTER'&lt;/P&gt;&lt;P&gt;      dialog                         = ' '&lt;/P&gt;&lt;P&gt;      header                         = header&lt;/P&gt;&lt;P&gt;      OPTIONS                        = options&lt;/P&gt;&lt;P&gt;    TABLES&lt;/P&gt;&lt;P&gt;      lines                          = lines&lt;/P&gt;&lt;P&gt;      otfdata                        = otfdata&lt;/P&gt;&lt;P&gt;               .&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;P&gt;  REFRESH lines.&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;   IMPORTING&lt;/P&gt;&lt;P&gt;     bin_filesize                = binfilesize&lt;/P&gt;&lt;P&gt;     TABLES&lt;/P&gt;&lt;P&gt;       otf                         =  otfdata&lt;/P&gt;&lt;P&gt;       lines                       =  pdflines&lt;/P&gt;&lt;P&gt;              .&lt;/P&gt;&lt;P&gt;  IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'GUI_DOWNLOAD'&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;   bin_filesize                    = binfilesize&lt;/P&gt;&lt;P&gt;      filename                        = filenm&lt;/P&gt;&lt;P&gt;      filetype                        = 'BIN'&lt;/P&gt;&lt;P&gt;    TABLES&lt;/P&gt;&lt;P&gt;      data_tab                        = pdflines[]&lt;/P&gt;&lt;P&gt;               .&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;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Oct 2006 21:39:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problems-converting-to-pdf/m-p/1608869#M273162</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-02T21:39:14Z</dc:date>
    </item>
    <item>
      <title>Re: Problems converting to PDF?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problems-converting-to-pdf/m-p/1608870#M273163</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;Check the sample code,&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapdevelopment.co.uk/reporting/rep_spooltopdf.htm" target="test_blank"&gt;http://www.sapdevelopment.co.uk/reporting/rep_spooltopdf.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Azaz.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Oct 2006 21:42:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problems-converting-to-pdf/m-p/1608870#M273163</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-02T21:42:02Z</dc:date>
    </item>
    <item>
      <title>Re: Problems converting to PDF?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problems-converting-to-pdf/m-p/1608871#M273164</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That's because, PRINT_TEXT fm not inserting any page breaks, and PDF converter is not separating the spool in to different pages. Work around is, in the adobe reader print window, select None in Page scalling field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Sridhar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Oct 2006 22:01:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problems-converting-to-pdf/m-p/1608871#M273164</guid>
      <dc:creator>sridhar_k1</dc:creator>
      <dc:date>2006-10-02T22:01:43Z</dc:date>
    </item>
  </channel>
</rss>

