async function processPDF() { try { let dataBuffer = fs.readFileSync('/home/phineas/Documents/21113032_Default Resume_2023-10-31_19_03_01.pdf'); const data = await pdf(dataBuffer); data.text = data.text.replace(/[\u2018\u2019']/g, ''); const sanitizedText = data.text.replace(/'/g, "''"); console.log(sanitizedText); await connectToMindsDB(); await qdb(sanitizedText); } catch (error) { console.error('Error processing PDF:', error); } } processPDF();
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter