[{"data":1,"prerenderedAt":231},["ShallowReactive",2],{"blog-en-extract-text-from-pdf":3},{"id":4,"title":5,"alternate":6,"author":7,"body":8,"category":214,"date":215,"description":216,"extension":217,"image":218,"meta":219,"navigation":220,"path":221,"seo":222,"stem":223,"tags":224,"tool":229,"__hash__":230},"blog_en/blog/extract-text-from-pdf.md","How to Extract Text from a PDF (Even a Scanned One)","extraer-texto-de-un-pdf","DocMorpher",{"type":9,"value":10,"toc":203},"minimark",[11,22,26,29,34,37,61,65,68,71,92,108,113,116,149,153,156,173,176,180],[12,13,15,16],"div",{"style":14},"text-align: center; margin: 20px 0 35px;","\n  ",[17,18,21],"a",{"href":19,"style":20},"/pdf-to-text","display: inline-block; padding: 10px 20px; background-color: #2575fc; color: white; text-decoration: none; border-radius: 5px; font-size: 16px; font-weight: 500;","Extract text from a PDF for free",[23,24,25],"p",{},"You need to reuse the content of a PDF (a contract, an article, lecture notes) and copy-paste gives you line breaks in the middle of sentences, words glued together or columns mixed up. Or worse, nothing can be selected at all.",[23,27,28],{},"First you need to know which kind of PDF you have, because the fix is different.",[30,31,33],"h2",{"id":32},"does-your-pdf-contain-text-or-an-image","Does your PDF contain text or an image?",[23,35,36],{},"Open the PDF and try to select a single word with the mouse (or long-press on a phone):",[38,39,40,52],"ul",{},[41,42,43,47,48,51],"li",{},[44,45,46],"strong",{},"If the word highlights",", it's a ",[44,49,50],{},"native"," PDF: the text is inside the file and can be extracted directly.",[41,53,54,47,57,60],{},[44,55,56],{},"If the whole page highlights as one block, or nothing does",[44,58,59],{},"scanned"," PDF: each page is a picture and the text has to be \"read\" with OCR (optical character recognition).",[30,62,64],{"id":63},"native-pdf-extract-the-text-to-a-txt-file","Native PDF: extract the text to a .txt file",[23,66,67],{},"Copy and paste is fine for one paragraph, but painful for long documents: the PDF stores each line separately and those breaks come along when you paste.",[23,69,70],{},"The quickest route is converting it to a text file:",[72,73,74,81,84],"ol",{},[41,75,76,77,80],{},"Open the ",[17,78,79],{"href":19},"PDF to text converter",".",[41,82,83],{},"Upload the PDF.",[41,85,86,87,91],{},"Download the ",[88,89,90],"code",{},".txt"," file.",[23,93,94,95,97,98,102,103,107],{},"The output is UTF-8, so accents and special characters display correctly in any editor (Notepad, Word, Google Docs, VS Code). Keep in mind a ",[88,96,90],{}," is plain text: bold, tables and images are dropped. If you need tables with their columns intact, use ",[17,99,101],{"href":100},"/pdf-to-excel","PDF to Excel"," or ",[17,104,106],{"href":105},"/pdf-to-csv","PDF to CSV"," instead.",[109,110,112],"h3",{"id":111},"clean-up-the-text-afterwards","Clean up the text afterwards",[23,114,115],{},"Some PDFs (especially two-column layouts) produce broken lines. Word can fix that quickly:",[72,117,118,125,136,142],{},[41,119,120,121,80],{},"Paste the text and open ",[122,123,124],"em",{},"Find and Replace",[41,126,127,128,131,132,135],{},"Replace ",[88,129,130],{},"^p^p"," with ",[88,133,134],{},"##"," (protects real paragraph breaks).",[41,137,127,138,141],{},[88,139,140],{},"^p"," with a space (joins the broken lines).",[41,143,127,144,131,146,148],{},[88,145,134],{},[88,147,140],{}," (restores paragraphs).",[30,150,152],{"id":151},"scanned-pdf-you-need-ocr","Scanned PDF: you need OCR",[23,154,155],{},"A PDF to text converter can't read letters inside a photo; that requires OCR. A free option that works well:",[72,157,158,164,170],{},[41,159,160,161,80],{},"Upload the PDF to ",[44,162,163],{},"Google Drive",[41,165,166,167,80],{},"Right-click > ",[44,168,169],{},"Open with > Google Docs",[41,171,172],{},"Drive recognizes the text and places it below the image, ready to edit.",[23,174,175],{},"It works best with straight, well-lit scans of printed text. With handwriting or poor photos, proofread carefully: OCR easily confuses \"l\" with \"1\" or \"O\" with \"0\".",[30,177,179],{"id":178},"common-problems","Common problems",[38,181,182,191,197],{},[41,183,184,187,188,190],{},[44,185,186],{},"Text comes out in the wrong order:"," typical of multi-column PDFs or text boxes. Extract to ",[88,189,90],{}," and rearrange the blocks instead of copying piece by piece.",[41,192,193,196],{},[44,194,195],{},"Strange characters appear:"," the PDF uses fonts without a character map. Treat it like a scanned PDF and use OCR.",[41,198,199,202],{},[44,200,201],{},"The PDF is password-protected:"," if copying is disabled, you'll need the owner password. Don't try to bypass protection on documents that aren't yours.",{"title":204,"searchDepth":205,"depth":205,"links":206},"",2,[207,208,212,213],{"id":32,"depth":205,"text":33},{"id":63,"depth":205,"text":64,"children":209},[210],{"id":111,"depth":211,"text":112},3,{"id":151,"depth":205,"text":152},{"id":178,"depth":205,"text":179},"Guides","2026-10-26","Copying and pasting from a PDF usually breaks paragraphs. Here's how to get clean text out of a PDF, and what to do when the PDF is a scanned image.","md","/images/blog/default_blog.jpg",{},true,"/blog/extract-text-from-pdf",{"title":5,"description":216},"blog/extract-text-from-pdf",[225,226,227,228],"pdf","text","txt","ocr","pdf-to-text","3M1d3cCORxhMmIP5lZsI2dfZ-E54SVubsakvElew0M8",1793060133968]