<?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: Base64 decoded xString to PDF File in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/base64-decoded-xstring-to-pdf-file/m-p/12439307#M1998553</link>
    <description>&lt;P&gt;Saying "convert xstring to ..." is the same as saying "convert bytes to ...", which doesn't mean a lot without the context, whatever the target is PDF or anything else. You must explain what the source bytes contain (XLSX file, etc. ?)&lt;/P&gt;</description>
    <pubDate>Sat, 24 Jul 2021 17:06:54 GMT</pubDate>
    <dc:creator>Sandra_Rossi</dc:creator>
    <dc:date>2021-07-24T17:06:54Z</dc:date>
    <item>
      <title>Base64 decoded xString to PDF File</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/base64-decoded-xstring-to-pdf-file/m-p/12439299#M1998545</link>
      <description>&lt;P&gt;Hello&lt;/P&gt;
  &lt;P&gt;Requirement: To create a PDF and attach it to Sales Order through GOS from a base64 encoded string (from PDF file) as Input. The input PDF file has only 'SAP' written in it.&lt;/P&gt;
  &lt;P&gt;Completed so far: &lt;/P&gt;
  &lt;P&gt;1. Able to convert the input string into xString using 'SCMS_BASE64_DECODE_STR'&lt;/P&gt;
  &lt;P&gt;2. Converted xString to Binary using 'SCMS_XSTRING_TO_BINARY'. Below is the Binary output from this step&lt;/P&gt;
  &lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/1939448-d8kpg.png" /&gt;&lt;BR /&gt;&lt;/P&gt;
  &lt;P&gt;3. In order to create PDF from this point, I am writing above content to Spool and then converting to PDF using 'CONVERT_ABAPSPOOLJOB_2_PDF'&lt;/P&gt;
  &lt;P&gt;4. Linked the PDF table from Step 3 to Sales Order GOS attachment successfully&lt;/P&gt;
  &lt;P&gt;&lt;STRONG&gt;Problem: PDF attached to the Sales Order has the exact data shown in the screenshot as I wrote it in the spool as well. Please guide me in understanding how can I generate the PDF with the original content 'SAP' from Binary data in Step 2 without the unwanted data.&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 19 May 2021 21:34:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/base64-decoded-xstring-to-pdf-file/m-p/12439299#M1998545</guid>
      <dc:creator>natashagarg</dc:creator>
      <dc:date>2021-05-19T21:34:52Z</dc:date>
    </item>
    <item>
      <title>Re: Base64 decoded xString to PDF File</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/base64-decoded-xstring-to-pdf-file/m-p/12439300#M1998546</link>
      <description>&lt;P&gt;Hi &lt;SPAN class="mention-scrubbed"&gt;natashagarg&lt;/SPAN&gt;,&lt;/P&gt;&lt;P&gt;Out of curiosity, have you tried ADS_CREATE_PDF_SPOOLJOB?&lt;/P&gt;&lt;P&gt;Cheers,&lt;BR /&gt;&lt;BR /&gt;Luis&lt;/P&gt;</description>
      <pubDate>Wed, 19 May 2021 22:47:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/base64-decoded-xstring-to-pdf-file/m-p/12439300#M1998546</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2021-05-19T22:47:45Z</dc:date>
    </item>
    <item>
      <title>Re: Base64 decoded xString to PDF File</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/base64-decoded-xstring-to-pdf-file/m-p/12439301#M1998547</link>
      <description>&lt;P&gt;Thanks Luis for replying. I tried the suggested FM as well but I am getting an error 'File does not begin with %PDF' while trying to open it from spool&lt;/P&gt;</description>
      <pubDate>Thu, 20 May 2021 02:53:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/base64-decoded-xstring-to-pdf-file/m-p/12439301#M1998547</guid>
      <dc:creator>natashagarg</dc:creator>
      <dc:date>2021-05-20T02:53:27Z</dc:date>
    </item>
    <item>
      <title>Re: Base64 decoded xString to PDF File</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/base64-decoded-xstring-to-pdf-file/m-p/12439302#M1998548</link>
      <description>&lt;P&gt;I am getting below in the PDF that is getting generated. It is same as what I am getting as output from 'SCMS_XSTRING_TO_BINARY'.&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/1939451-pdf1.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" /&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" style="color: inherit;" /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 20 May 2021 03:04:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/base64-decoded-xstring-to-pdf-file/m-p/12439302#M1998548</guid>
      <dc:creator>natashagarg</dc:creator>
      <dc:date>2021-05-20T03:04:54Z</dc:date>
    </item>
    <item>
      <title>Re: Base64 decoded xString to PDF File</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/base64-decoded-xstring-to-pdf-file/m-p/12439303#M1998549</link>
      <description>&lt;P&gt;Hi!&lt;/P&gt;&lt;P&gt;Let me see if get this straight. I might miss something...&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Your get a PDF file as a base64. (That PDF file has only the word 'SAP' written in it)&lt;/LI&gt;&lt;LI&gt;Then you use SCMS_BASE64_DECODE_STR to get that PDF file (as base64) to a PDF file (as xstring)&lt;/LI&gt;&lt;LI&gt;Next you call SCMS_XSTRING_TO_BINARY to get that PDF file (as xstring) to a PDF file (as binary).&lt;/LI&gt;&lt;LI&gt;...Shouldn't you stop here? Isn't this the PDF file you want to attach to the sales order?&lt;/LI&gt;&lt;/OL&gt;</description>
      <pubDate>Thu, 20 May 2021 04:20:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/base64-decoded-xstring-to-pdf-file/m-p/12439303#M1998549</guid>
      <dc:creator>joltdx</dc:creator>
      <dc:date>2021-05-20T04:20:31Z</dc:date>
    </item>
    <item>
      <title>Re: Base64 decoded xString to PDF File</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/base64-decoded-xstring-to-pdf-file/m-p/12439304#M1998550</link>
      <description>&lt;P&gt;I second Jörgen, you don't need spooling !! If you have the bytes of the PDF, then add the file to the sales order.&lt;/P&gt;</description>
      <pubDate>Thu, 20 May 2021 06:14:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/base64-decoded-xstring-to-pdf-file/m-p/12439304#M1998550</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2021-05-20T06:14:42Z</dc:date>
    </item>
    <item>
      <title>Re: Base64 decoded xString to PDF File</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/base64-decoded-xstring-to-pdf-file/m-p/12439305#M1998551</link>
      <description>&lt;P&gt;Please use the COMMENT button. The button ANSWER is reserved to give the solution.&lt;/P&gt;</description>
      <pubDate>Thu, 20 May 2021 06:15:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/base64-decoded-xstring-to-pdf-file/m-p/12439305#M1998551</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2021-05-20T06:15:20Z</dc:date>
    </item>
    <item>
      <title>Re: Base64 decoded xString to PDF File</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/base64-decoded-xstring-to-pdf-file/m-p/12439306#M1998552</link>
      <description>&lt;P&gt; i want to convert Xstring to PDF file,could you tell me how to write Xstring to FDF file ,thanks .&lt;/P&gt;</description>
      <pubDate>Sat, 24 Jul 2021 16:20:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/base64-decoded-xstring-to-pdf-file/m-p/12439306#M1998552</guid>
      <dc:creator>former_member744059</dc:creator>
      <dc:date>2021-07-24T16:20:25Z</dc:date>
    </item>
    <item>
      <title>Re: Base64 decoded xString to PDF File</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/base64-decoded-xstring-to-pdf-file/m-p/12439307#M1998553</link>
      <description>&lt;P&gt;Saying "convert xstring to ..." is the same as saying "convert bytes to ...", which doesn't mean a lot without the context, whatever the target is PDF or anything else. You must explain what the source bytes contain (XLSX file, etc. ?)&lt;/P&gt;</description>
      <pubDate>Sat, 24 Jul 2021 17:06:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/base64-decoded-xstring-to-pdf-file/m-p/12439307#M1998553</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2021-07-24T17:06:54Z</dc:date>
    </item>
  </channel>
</rss>

