使用PHP从PDF文件中提取HTML表格?

I was wondering if it was possible to extract a table of data from a PDF file, into an array or similar so i can import the table data using PHP? I have DomPDF installed to create PDF files, but this does not have options for reading PDF. If i read the PDF file in PHP i get an encoded string:

%PDF-1.5 5 0 obj <>>> endobj 6 0 obj <>stream x��ێ+��W�\`��E���u

Any help would be appreciated.

Adam

This post is pretty old but seems to have a decent amount of views.

I'm working on a similar project and have had some success with this https://github.com/mgufrone/pdf-to-html . The HTML returns is just a bunch of absolutely positioned p tags, but if the format of your pdfs are consistent you might have some luck working something out to either parse the table or at least get the data you need.

Just make sure that you have the poppler utilities installed.