<?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 Smartform in PDF - Background in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/converting-smartform-in-pdf-background/m-p/3725577#M896668</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can't use download in background because you're on desktop and you can't be on your desktop in background.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I advise you to search for sample of code by searching PDF and OTF. There are many example for this problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Christophe&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 07 May 2008 11:53:54 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-05-07T11:53:54Z</dc:date>
    <item>
      <title>Converting Smartform in PDF - Background</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/converting-smartform-in-pdf-background/m-p/3725576#M896667</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I want convert a Smartform, &lt;STRONG&gt;that contains pictures&lt;/STRONG&gt;, to a PDF-File &lt;STRONG&gt;in the background&lt;/STRONG&gt; (therefore I couldn&amp;#146;t use WS_DOWNLOAD). I need the result of the PDF-File in an internal table as ASCII-TEXT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="--------------------------------------------------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For the conversation of the OTF-Format in PDF I used the standard function "CONVERT_OTF".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The result of the function I saved to the applicatian server with the commands:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; file = '/usr/transfer/tmp/test'.&lt;/P&gt;&lt;P&gt;OPEN DATASET file FOR OUTPUT in binary mode.&lt;/P&gt;&lt;P&gt;IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;  RAISING error_open_file.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;close file.&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="--------------------------------------------------------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For getting the file as a text file I opened it in the text mode like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA wa_s TYPE solisti1-line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OPEN DATASET file FOR INPUT IN text MODE encoding default.&lt;/P&gt;&lt;P&gt;IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;  RAISING error_open_file.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DO.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  READ DATASET file INTO wa_s.&lt;/P&gt;&lt;P&gt;  IF sy-subrc NE 0.&lt;/P&gt;&lt;P&gt;    EXIT.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  MOVE wa_s TO out_pdf-line.&lt;/P&gt;&lt;P&gt;  APPEND out_pdf.&lt;/P&gt;&lt;P&gt;ENDDO.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="------------------------------------------------------------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For testing the conversation I saved the content of the internal table "OUT_PDF" to the Windows Workstation as FILETYPE "ASC". But when i try to open the file I got an error like this: "XOBJECT "00007" was not found". The PDF-File shows only the text of the Smartform but the pictures are missing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL METHOD cl_gui_frontend_services=&amp;gt;gui_download&lt;/P&gt;&lt;P&gt;  EXPORTING&lt;/P&gt;&lt;P&gt;    filename               = 'C:\test.pdf'&lt;/P&gt;&lt;P&gt;    filetype               = 'ASC'&lt;/P&gt;&lt;P&gt;CHANGING&lt;/P&gt;&lt;P&gt;   data_tab                = out_pdf.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance for any help.&lt;/P&gt;&lt;P&gt;MP&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 May 2008 11:31:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/converting-smartform-in-pdf-background/m-p/3725576#M896667</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-07T11:31:56Z</dc:date>
    </item>
    <item>
      <title>Re: Converting Smartform in PDF - Background</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/converting-smartform-in-pdf-background/m-p/3725577#M896668</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can't use download in background because you're on desktop and you can't be on your desktop in background.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I advise you to search for sample of code by searching PDF and OTF. There are many example for this problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Christophe&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 May 2008 11:53:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/converting-smartform-in-pdf-background/m-p/3725577#M896668</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-07T11:53:54Z</dc:date>
    </item>
  </channel>
</rss>

