<?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 Search for text in PDF binary in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/search-for-text-in-pdf-binary/m-p/7124103#M1511515</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;by using a SAP BI tool we generate reports in File format. SAP standard do some generating and give back an internal table with filename and file content in binary form. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now we would like to search in this PDF binary for an special text or string to use them for changing filename. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there any way to do that? Every idea and hint is welcome.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Peter&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 09 Jul 2010 14:30:19 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2010-07-09T14:30:19Z</dc:date>
    <item>
      <title>Search for text in PDF binary</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/search-for-text-in-pdf-binary/m-p/7124103#M1511515</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;by using a SAP BI tool we generate reports in File format. SAP standard do some generating and give back an internal table with filename and file content in binary form. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now we would like to search in this PDF binary for an special text or string to use them for changing filename. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there any way to do that? Every idea and hint is welcome.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Peter&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Jul 2010 14:30:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/search-for-text-in-pdf-binary/m-p/7124103#M1511515</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-07-09T14:30:19Z</dc:date>
    </item>
    <item>
      <title>Re: Search for text in PDF binary</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/search-for-text-in-pdf-binary/m-p/7124104#M1511516</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't know how it works, but I would ask the moderator to move the thread to the BI forum. Maybe there's a way to get the XML format or something like that, at the same time it generates the PDF, maybe an exit, only BI people/developers would know.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Moreover, if not successful, I would try to see how it works by tracing the PDF generation execution ([ST12 or SE30|http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/17050] &lt;B&gt;[original link is broken]&lt;/B&gt; &lt;B&gt;[original link is broken]&lt;/B&gt; &lt;B&gt;[original link is broken]&lt;/B&gt;;, blog by Olga Dolinskaja) to know which standard abap code generates the PDF (by simply looking at the names of the procedures), and from there you step back until you reach the part where the data is stored as variables, and then you'll be able to decide what you do, implicit enhancement... Maybe you'll find an exit...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Jul 2010 18:09:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/search-for-text-in-pdf-binary/m-p/7124104#M1511516</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2010-07-09T18:09:21Z</dc:date>
    </item>
    <item>
      <title>Re: Search for text in PDF binary</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/search-for-text-in-pdf-binary/m-p/7124105#M1511517</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;Now we would like to search in this PDF binary for an special text or string to use them for changing filename. Is there any way to do that?&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Based on your posting it sounds a bit like you're doing ABAP processing. However, I'll ignore that for now and just say that in the Java environment I have had good experience with the Java Library [iText PDF|http://itextpdf.com/]. I'm not sure what SAP offers in that area, but they must have something, because [TREX|http://help.sap.com/saphelp_nw70/helpdata/EN/a4/929d4206b70931e10000000a1550b0/frameset.htm] "understands" PDF (though that doesn't mean that you have a nice API for parsing PDFs).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You probably investigated this already, but I'd take a look at possibilities to hook in &lt;EM&gt;before&lt;/EM&gt; (or at the time) the PDF gets generated (might be easier to craft and export a filename there). Thanks to the [enhancement framework|http://help.sap.com/saphelp_nw70ehp2/helpdata/en/94/9cdc40132a8531e10000000a1550b0/frameset.htm] you usually have quite a few ways to get things done...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note that even if you're able to read a PDF, it doesn't necessarily mean that you can parse it the way you want. A silly example would be scanned pages, where the page is stored as an image and at best the scanner software runs some OCR (with possibly buggy results) to provide capabilities for searching the PDF. In your case that's probably not an issue, but still the question might be if the information you're looking at is structured enough to get it back...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers, harald&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Jul 2010 20:10:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/search-for-text-in-pdf-binary/m-p/7124105#M1511517</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-07-09T20:10:39Z</dc:date>
    </item>
    <item>
      <title>Re: Search for text in PDF binary</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/search-for-text-in-pdf-binary/m-p/7124106#M1511518</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Solved by our SAP Basis using a tool on the Linux Server.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Mar 2011 13:25:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/search-for-text-in-pdf-binary/m-p/7124106#M1511518</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-03-22T13:25:56Z</dc:date>
    </item>
  </channel>
</rss>

