title: PHP Extract data from PDF in array format
body: <p>I have following pdf file <a href="http://nhscare.net/Andrew%20Smee.pdf" rel="nofollow noreferrer">Marsheet PDF</a> m trying to extract data shown in example, I have tried <a href="http://www.pdfparser.org/" rel="nofollow noreferrer">PDFParse</a>, <a href="http://pastebin.com/dvwySU1a" rel="nofollow noreferrer">PDFtoText</a>, etc.... but not working properly is there any solution or example?</p>
  
  <pre><code>&lt;?php 
  //Output something like this or suggest me if u have any better option 
  $data_array = array( 
          array( "name" =&gt; "Mr Andrew Smee", 
            "medicine_name" =&gt; "FLUOXETINE 20MG CAPS",
            "description" =&gt; "TAKE ONE ONCE DAILY FOR LOW MOOD. CAUTION:YOUR DRIVING REACTIONS MAY BE IMPAIRED",
            "Dose" =&gt; '9000',
            "StartDate" =&gt; '28/09/15',
            "period" =&gt; '28',
            "Quantity" =&gt; '28'
          ),
  
          array( "name" =&gt; "Mr Andrew Smee", 
            "medicine_name" =&gt; "SINEMET PLUS 125MG TAB",
            "description" =&gt; "TAKE ONE TABLET FIVE TIMES A DAY FOR PD
                              (8am,11am,2pm,5pm,8pm)
                              THIS MEDICINE MAY COLOUR THE URINE. THIS IS
                              HARMLESS. CAUTION:REACTIONS MAY BE IMPAIRED
                              WHILST DRIVING OR USING TOOLS OR MACHINES.",
            "Dose" =&gt; '0800,1100,1400,1700,2000',
            "StartDate" =&gt; '28/09/15',
            "period" =&gt; '28',
            "Quantity" =&gt; '140'
          ), etc...  
    );
  ?&gt;
  </code></pre>