PDF to Word

Extract text from PDF and download as editable Word (.doc) file.

description

Select PDF to Convert

"; const footer = " "; // Format text paragraphs const paragraphs = extractedText.split('\n').map(l => `

${l}

`).join(''); const sourceHTML = header + paragraphs + footer; const source = 'data:application/vnd.ms-word;charset=utf-8,' + encodeURIComponent(sourceHTML); const fileDownload = document.createElement("a"); document.body.appendChild(fileDownload); fileDownload.href = source; fileDownload.download = 'converted.doc'; fileDownload.click(); document.body.removeChild(fileDownload); } function reset() { document.getElementById('pdf-in').value = ''; document.getElementById('progress-bar').style.width = '0%'; document.getElementById('ui-download').classList.add('hidden'); document.getElementById('ui-upload').classList.remove('hidden'); }