louis_coetzee Posted June 20, 2011 Share Posted June 20, 2011 Hi guys, hope it's fine that I am posting my question here, I know this is where the experts read. I am busy developing a website, job portal in codeigniter. The problem I am having is to upload pdf's to the site and then converting it to text to store in a table, so that recruiters can search for these cv's. Also I would like to display these cv's online (that would be nicely formatted html), if a recruiter views the particular jobseekers profile, after which he can download the cv in the original format. The same would be for word documents. But for now I am looking to find a solution for pdf and the different encodings of pdf. I have googled, and have not found a viable solution, so please push me in the right direction. Thanks in advance. Quote Link to comment https://forums.phpfreaks.com/topic/239872-php-to-text-and-html/ Share on other sites More sharing options...
AMcHarg Posted June 20, 2011 Share Posted June 20, 2011 Just to clarify, you want your php code to read the pdf file which has been uploaded and take key pieces of information from it to write into a database? This isn't easy to achieve because every CV is different. Your code would need to look for strings following common titles, such as knowing that the person's name is likely to follow the words "Name: ". A better idea would be after the user uploads their CV as a pdf they are then forwarded to a form where your code has "suggested" the inputs in the fields (based on how it interprets the pdf) and asks them to confirm the details. Just some thoughts. Quote Link to comment https://forums.phpfreaks.com/topic/239872-php-to-text-and-html/#findComment-1232210 Share on other sites More sharing options...
louis_coetzee Posted June 20, 2011 Author Share Posted June 20, 2011 No, I just want to extract the text content of the CV and write it to the database, the person enters their name etc manually, I just want the recruiter, that is searching for the cv to for example enter the word "php" and if a match is found in the extracted text, it will bring up that person's cv and show it (this is the HTML I was referring to). Quote Link to comment https://forums.phpfreaks.com/topic/239872-php-to-text-and-html/#findComment-1232214 Share on other sites More sharing options...
AMcHarg Posted June 20, 2011 Share Posted June 20, 2011 Right, so you want php to open the file, generate keywords from it's content and then write the keywords to the database, connecting those keywords to that individual CV/person. The idea being that the when a recruiter searches for those keywords then your site will suggest candidates? Also worth considering in your code would be the incorrect spelling of keywords in the search. You'll want to research the below function, where $pdf_data is your pdf file. $pdf_data = file_get_contents($pdf_data); Quote Link to comment https://forums.phpfreaks.com/topic/239872-php-to-text-and-html/#findComment-1232232 Share on other sites More sharing options...
louis_coetzee Posted June 20, 2011 Author Share Posted June 20, 2011 Yeah, thats what I want to do, not to sure about keyword generation, just the dump of everything that is text into a table, and then I will search through this for the keywords that was inserted by the searcher. Spelling not that big of an issue, since i would hope that a person creating a cv to search for a job, would not mess that up. Quote Link to comment https://forums.phpfreaks.com/topic/239872-php-to-text-and-html/#findComment-1232238 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.