IamSuchANoob Posted December 17, 2015 Share Posted December 17, 2015 (edited) Hello! So, I have a .pdf file which contains information on car tyre parameters (which tyre fits where). The mission is to have that data to show up on a website for the user to be able to search/view it. There is around 30 000 entries and before I go and start copying them one by one into my HTML tables or database I would like to know if you guys got any ideas if I can somehow fasten that process (or do it in another way?). Even better, if you know any kind of API or something that I can just add to website ( example : http://www.michelin.co.uk/ ) that would be great. I don't want to iframe-lame it. Thank you & have an awesome day! Edited December 17, 2015 by IamSuchANoob Quote Link to comment https://forums.phpfreaks.com/topic/299801-creating-a-database-or-cartyre-guys-take-a-look/ Share on other sites More sharing options...
requinix Posted December 17, 2015 Share Posted December 17, 2015 Kinda depends on what the PDF looks like... Quote Link to comment https://forums.phpfreaks.com/topic/299801-creating-a-database-or-cartyre-guys-take-a-look/#findComment-1528103 Share on other sites More sharing options...
IamSuchANoob Posted December 17, 2015 Author Share Posted December 17, 2015 (edited) [link] Sorry. Edited December 17, 2015 by requinix removing link for safety Quote Link to comment https://forums.phpfreaks.com/topic/299801-creating-a-database-or-cartyre-guys-take-a-look/#findComment-1528104 Share on other sites More sharing options...
requinix Posted December 17, 2015 Share Posted December 17, 2015 If you don't mind too much, I'm going to remove that link you posted. Drive-by malware is not cool. halp.pdf Quote Link to comment https://forums.phpfreaks.com/topic/299801-creating-a-database-or-cartyre-guys-take-a-look/#findComment-1528105 Share on other sites More sharing options...
requinix Posted December 17, 2015 Share Posted December 17, 2015 It'd totally expect you could copy/paste those pages (probably many at a time, or even all at once) into Excel or Google Sheets, then get a CSV version of it. That'd make importing very easy. Quote Link to comment https://forums.phpfreaks.com/topic/299801-creating-a-database-or-cartyre-guys-take-a-look/#findComment-1528106 Share on other sites More sharing options...
IamSuchANoob Posted December 17, 2015 Author Share Posted December 17, 2015 Thank you for the answer. I have never done this (PDF->XLSX->CSV). Could you tell me, if this output can be used before I am going to figure out how? ;;;;;;;;;;Rehvide valiku tabel;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Mark;;Mudel;;;Mootor;;;;;;;Laius Kõrgus ZR;;"R """;;LI;SI;XL e4txc4;;;;;;;;;;;;;;;;;;;;;;;; Quote Link to comment https://forums.phpfreaks.com/topic/299801-creating-a-database-or-cartyre-guys-take-a-look/#findComment-1528107 Share on other sites More sharing options...
Barand Posted December 17, 2015 Share Posted December 17, 2015 to process a single line like that you can $str = 'Mark;;Mudel;;;Mootor;;;;;;;Laius Kõrgus ZR;;"R """;;LI;SI;XL e4txc4;;;;;;;;;;;;;;;;;;;;;;;;'; $data = array_filter(str_getcsv($str,';')); // ignore empty values echo '<pre>',print_r($data, true),'</pre>'; // view the data array which gives Array ( [0] => Mark [2] => Mudel [5] => Mootor [12] => Laius Kõrgus ZR [14] => R " [16] => LI [17] => SI [18] => XL e4txc4 ) To process the whole file you use fgetcsv, which is similar. Quote Link to comment https://forums.phpfreaks.com/topic/299801-creating-a-database-or-cartyre-guys-take-a-look/#findComment-1528128 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.