<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Arquivos tesseract pdf - Web-Zoneware</title>
	<atom:link href="https://webzoneware.com/tag/tesseract-pdf/feed/" rel="self" type="application/rss+xml" />
	<link>https://webzoneware.com/tag/tesseract-pdf/</link>
	<description>Mais do que apenas uma academia web.</description>
	<lastBuildDate>Thu, 22 Oct 2026 17:22:42 +0000</lastBuildDate>
	<language>pt-BR</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	

<image>
	<url>https://webzoneware.com/wp-content/uploads/icon-webzoneware-150x150.png</url>
	<title>Arquivos tesseract pdf - Web-Zoneware</title>
	<link>https://webzoneware.com/tag/tesseract-pdf/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>OCR em PDF Online — Reconhecimento de Texto e PDF Pesquisável &#124; Web-ZoneWare</title>
		<link>https://webzoneware.com/web-ferramentas/pdf/ocr-pdf-reconhecimento-texto/</link>
					<comments>https://webzoneware.com/web-ferramentas/pdf/ocr-pdf-reconhecimento-texto/#respond</comments>
		
		<dc:creator><![CDATA[Web-Zoneware]]></dc:creator>
		<pubDate>Sun, 18 Oct 2026 00:12:52 +0000</pubDate>
				<category><![CDATA[PDF & Documentos]]></category>
		<category><![CDATA[extrair texto de pdf escaneado]]></category>
		<category><![CDATA[pdf pesquisavel online]]></category>
		<category><![CDATA[reconhecimento de texto pdf]]></category>
		<category><![CDATA[tesseract pdf]]></category>
		<guid isPermaLink="false">https://webzoneware.com/?p=29062</guid>

					<description><![CDATA[<p>Transforme Documentos Escaneados e Imagens em PDFs Pesquisáveis Documentos digitalizados por scanners físicos ou câmeras de celular são armazenados originalmente como fotografias embutidas, impossibilitando a seleção, cópia ou busca de termos. Com o nosso motor de OCR em PDF Online, você converte essas páginas em documentos de texto estruturado utilizando os padrões internacionais do consórcio [&#8230;]</p>
<p>O post <a href="https://webzoneware.com/web-ferramentas/pdf/ocr-pdf-reconhecimento-texto/">OCR em PDF Online — Reconhecimento de Texto e PDF Pesquisável | Web-ZoneWare</a> apareceu primeiro em <a href="https://webzoneware.com">Web-Zoneware</a>.</p>
]]></description>
										<content:encoded><![CDATA[<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "FAQPage",
  "mainEntity": [
    {
      "@type": "Question",
      "name": "Como funciona o OCR em PDF no navegador?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "O OCR processa cada página do documento PDF convertendo imagens em texto pesquisável através da biblioteca Tesseract.js compilada em WebAssembly, operando 100% no seu dispositivo sem enviar arquivos para servidores."
      }
    },
    {
      "@type": "Question",
      "name": "Meus documentos escaneados ficam salvos em algum lugar?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "Não. Todo o reconhecimento óptico de caracteres ocorre na memória do seu próprio navegador em conformidade total com a LGPD e privacidade absoluta."
      }
    }
  ]
}
</script>

    <div id="wzw_ocrpdf_98942887_c8ed_4bba_86ed_610a4233199f" class="wzw-tool-container wzw-pdf-suite-wrapper">
        <style>
            #wzw_ocrpdf_98942887_c8ed_4bba_86ed_610a4233199f {
                background: linear-gradient(145deg, #0f172a 0%, #1e293b 100%);
                color: #f8fafc;
                border-radius: 16px;
                padding: 24px;
                box-shadow: 0 12px 35px rgba(0, 0, 0, 0.35);
                border: 1px solid #334155;
                font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
                margin: 20px 0 35px 0;
            }
            #wzw_ocrpdf_98942887_c8ed_4bba_86ed_610a4233199f * {
                box-sizing: border-box;
            }
            #wzw_ocrpdf_98942887_c8ed_4bba_86ed_610a4233199f .wzw-tool-header {
                display: flex;
                align-items: center;
                justify-content: space-between;
                flex-wrap: wrap;
                gap: 12px;
                margin-bottom: 20px;
                padding-bottom: 16px;
                border-bottom: 1px solid rgba(255, 255, 255, 0.1);
            }
            #wzw_ocrpdf_98942887_c8ed_4bba_86ed_610a4233199f .wzw-tool-title {
                margin: 0;
                font-size: 1.35rem;
                font-weight: 800;
                color: #38bdf8;
                display: flex;
                align-items: center;
                gap: 10px;
            }
            #wzw_ocrpdf_98942887_c8ed_4bba_86ed_610a4233199f .wzw-badge-client {
                background: rgba(56, 189, 248, 0.15);
                color: #38bdf8;
                border: 1px solid rgba(56, 189, 248, 0.35);
                padding: 4px 10px;
                border-radius: 20px;
                font-size: 11px;
                font-weight: 700;
                text-transform: uppercase;
                letter-spacing: 0.5px;
            }
            #wzw_ocrpdf_98942887_c8ed_4bba_86ed_610a4233199f .wzw-dropzone {
                border: 2px dashed #38bdf8;
                background: rgba(56, 189, 248, 0.05);
                border-radius: 14px;
                padding: 44px 20px;
                text-align: center;
                cursor: pointer;
                transition: all 0.25s ease;
                margin-bottom: 20px;
            }
            #wzw_ocrpdf_98942887_c8ed_4bba_86ed_610a4233199f .wzw-dropzone:hover,
            #wzw_ocrpdf_98942887_c8ed_4bba_86ed_610a4233199f .wzw-dropzone.drag-over {
                background: rgba(56, 189, 248, 0.12);
                border-color: #7dd3fc;
                transform: translateY(-2px);
            }
            #wzw_ocrpdf_98942887_c8ed_4bba_86ed_610a4233199f .wzw-drop-icon {
                font-size: 48px;
                margin-bottom: 12px;
                display: block;
            }
            #wzw_ocrpdf_98942887_c8ed_4bba_86ed_610a4233199f .wzw-drop-title {
                font-size: 1.15rem;
                font-weight: 700;
                color: #f1f5f9;
                margin: 0 0 6px 0;
            }
            #wzw_ocrpdf_98942887_c8ed_4bba_86ed_610a4233199f .wzw-drop-sub {
                font-size: 13px;
                color: #94a3b8;
                margin: 0;
            }
            #wzw_ocrpdf_98942887_c8ed_4bba_86ed_610a4233199f .wzw-workspace {
                display: none;
                margin-top: 15px;
            }
            #wzw_ocrpdf_98942887_c8ed_4bba_86ed_610a4233199f .wzw-doc-info {
                background: rgba(15, 23, 42, 0.6);
                border: 1px solid #334155;
                border-radius: 10px;
                padding: 12px 18px;
                display: flex;
                align-items: center;
                justify-content: space-between;
                flex-wrap: wrap;
                gap: 10px;
                margin-bottom: 20px;
            }
            #wzw_ocrpdf_98942887_c8ed_4bba_86ed_610a4233199f .wzw-controls-grid {
                display: grid;
                grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
                gap: 15px;
                margin-bottom: 20px;
                background: rgba(30, 41, 59, 0.7);
                border: 1px solid #334155;
                padding: 16px;
                border-radius: 12px;
            }
            #wzw_ocrpdf_98942887_c8ed_4bba_86ed_610a4233199f .wzw-field-group label {
                display: block;
                font-size: 12px;
                font-weight: 700;
                color: #94a3b8;
                margin-bottom: 6px;
                text-transform: uppercase;
                letter-spacing: 0.5px;
            }
            #wzw_ocrpdf_98942887_c8ed_4bba_86ed_610a4233199f .wzw-select,
            #wzw_ocrpdf_98942887_c8ed_4bba_86ed_610a4233199f .wzw-input {
                width: 100%;
                background: #0f172a;
                border: 1px solid #475569;
                border-radius: 8px;
                color: #f8fafc;
                padding: 10px 12px;
                font-size: 14px;
                outline: none;
                transition: border-color 0.2s ease;
            }
            #wzw_ocrpdf_98942887_c8ed_4bba_86ed_610a4233199f .wzw-select:focus,
            #wzw_ocrpdf_98942887_c8ed_4bba_86ed_610a4233199f .wzw-input:focus {
                border-color: #38bdf8;
            }
            #wzw_ocrpdf_98942887_c8ed_4bba_86ed_610a4233199f .wzw-action-btn {
                background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
                color: #ffffff;
                border: none;
                border-radius: 10px;
                padding: 14px 24px;
                font-size: 15px;
                font-weight: 700;
                cursor: pointer;
                transition: all 0.25s ease;
                display: inline-flex;
                align-items: center;
                justify-content: center;
                gap: 10px;
                width: 100%;
                box-shadow: 0 4px 14px rgba(2, 132, 199, 0.4);
            }
            #wzw_ocrpdf_98942887_c8ed_4bba_86ed_610a4233199f .wzw-action-btn:hover:not(:disabled) {
                background: linear-gradient(135deg, #0369a1 0%, #075985 100%);
                transform: translateY(-2px);
                box-shadow: 0 6px 20px rgba(2, 132, 199, 0.6);
            }
            #wzw_ocrpdf_98942887_c8ed_4bba_86ed_610a4233199f .wzw-action-btn:disabled {
                opacity: 0.5;
                cursor: not-allowed;
            }
            #wzw_ocrpdf_98942887_c8ed_4bba_86ed_610a4233199f .wzw-progress-box {
                display: none;
                background: rgba(15, 23, 42, 0.8);
                border: 1px solid #334155;
                border-radius: 12px;
                padding: 18px;
                margin-bottom: 20px;
                text-align: center;
            }
            #wzw_ocrpdf_98942887_c8ed_4bba_86ed_610a4233199f .wzw-progress-bar-bg {
                background: #1e293b;
                height: 10px;
                border-radius: 5px;
                overflow: hidden;
                margin: 12px 0 8px 0;
            }
            #wzw_ocrpdf_98942887_c8ed_4bba_86ed_610a4233199f .wzw-progress-bar-fill {
                background: linear-gradient(90deg, #38bdf8, #818cf8);
                height: 100%;
                width: 0%;
                transition: width 0.2s ease;
            }
            #wzw_ocrpdf_98942887_c8ed_4bba_86ed_610a4233199f .wzw-results-area {
                display: none;
                margin-top: 20px;
            }
            #wzw_ocrpdf_98942887_c8ed_4bba_86ed_610a4233199f .wzw-textarea-ocr {
                width: 100%;
                height: 280px;
                background: #090d16;
                border: 1px solid #334155;
                border-radius: 10px;
                color: #e2e8f0;
                font-family: 'Consolas', 'Courier New', monospace;
                font-size: 13px;
                line-height: 1.6;
                padding: 14px;
                resize: vertical;
                outline: none;
                margin-bottom: 15px;
            }
            #wzw_ocrpdf_98942887_c8ed_4bba_86ed_610a4233199f .wzw-textarea-ocr:focus {
                border-color: #38bdf8;
            }
            #wzw_ocrpdf_98942887_c8ed_4bba_86ed_610a4233199f .wzw-btn-row {
                display: flex;
                gap: 10px;
                flex-wrap: wrap;
            }
            #wzw_ocrpdf_98942887_c8ed_4bba_86ed_610a4233199f .wzw-sub-btn {
                background: #1e293b;
                color: #f8fafc;
                border: 1px solid #475569;
                border-radius: 8px;
                padding: 10px 16px;
                font-size: 13px;
                font-weight: 600;
                cursor: pointer;
                transition: all 0.2s ease;
                display: inline-flex;
                align-items: center;
                gap: 8px;
            }
            #wzw_ocrpdf_98942887_c8ed_4bba_86ed_610a4233199f .wzw-sub-btn:hover {
                background: #334155;
                border-color: #38bdf8;
                color: #38bdf8;
            }
            #wzw_ocrpdf_98942887_c8ed_4bba_86ed_610a4233199f .wzw-stats-pill {
                display: inline-flex;
                gap: 15px;
                font-size: 12px;
                color: #94a3b8;
                margin-top: 10px;
            }
        </style>

        <div class="wzw-tool-header">
            <h3 class="wzw-tool-title">
                <span>🔍</span> OCR em PDF — Reconhecimento Óptico de Caracteres
            </h3>
            <span class="wzw-badge-client">100% Client-Side • Privacidade Garantida</span>
        </div>

        <div class="wzw-dropzone" id="wzw_ocrpdf_98942887_c8ed_4bba_86ed_610a4233199f_dropzone">
            <span class="wzw-drop-icon">📄</span>
            <p class="wzw-drop-title">Selecione ou arraste seu documento PDF escaneado</p>
            <p class="wzw-drop-sub">Extração de texto em português, inglês e múltiplos idiomas sem envio de dados para servidores</p>
            <input type="file" id="wzw_ocrpdf_98942887_c8ed_4bba_86ed_610a4233199f_file_input" accept="application/pdf" style="display: none;">
        </div>

        <div class="wzw-workspace" id="wzw_ocrpdf_98942887_c8ed_4bba_86ed_610a4233199f_workspace">
            <div class="wzw-doc-info">
                <div>
                    <strong id="wzw_ocrpdf_98942887_c8ed_4bba_86ed_610a4233199f_doc_name" style="color: #f8fafc;">documento.pdf</strong>
                    <span id="wzw_ocrpdf_98942887_c8ed_4bba_86ed_610a4233199f_doc_meta" style="color: #94a3b8; margin-left: 10px; font-size: 12px;">(0 páginas)</span>
                </div>
                <button type="button" class="wzw-sub-btn" id="wzw_ocrpdf_98942887_c8ed_4bba_86ed_610a4233199f_btn_change">Trocar Arquivo</button>
            </div>

            <div class="wzw-controls-grid">
                <div class="wzw-field-group">
                    <label for="wzw_ocrpdf_98942887_c8ed_4bba_86ed_610a4233199f_lang">Idioma do Reconhecimento (OCR):</label>
                    <select id="wzw_ocrpdf_98942887_c8ed_4bba_86ed_610a4233199f_lang" class="wzw-select">
                        <option value="por" selected>Português (Brasil & Portugal)</option>
                        <option value="eng">Inglês (English)</option>
                        <option value="spa">Espanhol (Español)</option>
                        <option value="fra">Francês (Français)</option>
                        <option value="deu">Alemão (Deutsch)</option>
                        <option value="ita">Italiano</option>
                    </select>
                </div>
                <div class="wzw-field-group">
                    <label for="wzw_ocrpdf_98942887_c8ed_4bba_86ed_610a4233199f_pages_mode">Páginas para Processar:</label>
                    <select id="wzw_ocrpdf_98942887_c8ed_4bba_86ed_610a4233199f_pages_mode" class="wzw-select">
                        <option value="all" selected>Todas as Páginas</option>
                        <option value="first">Apenas a Primeira Página</option>
                        <option value="range">Intervalo Personalizado</option>
                    </select>
                </div>
                <div class="wzw-field-group" id="wzw_ocrpdf_98942887_c8ed_4bba_86ed_610a4233199f_range_group" style="display: none;">
                    <label for="wzw_ocrpdf_98942887_c8ed_4bba_86ed_610a4233199f_range_input">Intervalo de Páginas (ex: 1-3, 5):</label>
                    <input type="text" id="wzw_ocrpdf_98942887_c8ed_4bba_86ed_610a4233199f_range_input" class="wzw-input" placeholder="Ex: 1-5">
                </div>
            </div>

            <button type="button" class="wzw-action-btn" id="wzw_ocrpdf_98942887_c8ed_4bba_86ed_610a4233199f_btn_start_ocr">
                <span>⚡</span> Iniciar Reconhecimento Óptico de Texto (OCR)
            </button>

            <div class="wzw-progress-box" id="wzw_ocrpdf_98942887_c8ed_4bba_86ed_610a4233199f_progress_box">
                <div style="display: flex; justify-content: space-between; font-size: 13px; font-weight: 600;">
                    <span id="wzw_ocrpdf_98942887_c8ed_4bba_86ed_610a4233199f_progress_status">Carregando motor OCR...</span>
                    <span id="wzw_ocrpdf_98942887_c8ed_4bba_86ed_610a4233199f_progress_pct">0%</span>
                </div>
                <div class="wzw-progress-bar-bg">
                    <div class="wzw-progress-bar-fill" id="wzw_ocrpdf_98942887_c8ed_4bba_86ed_610a4233199f_progress_fill"></div>
                </div>
                <span id="wzw_ocrpdf_98942887_c8ed_4bba_86ed_610a4233199f_progress_detail" style="font-size: 11px; color: #94a3b8;">Inicializando pipeline Tesseract WebAssembly...</span>
            </div>

            <div class="wzw-results-area" id="wzw_ocrpdf_98942887_c8ed_4bba_86ed_610a4233199f_results_area">
                <div style="display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px;">
                    <label style="font-size: 13px; font-weight: 700; color: #38bdf8;">Texto Reconhecido pelo OCR:</label>
                    <div class="wzw-stats-pill" id="wzw_ocrpdf_98942887_c8ed_4bba_86ed_610a4233199f_stats_pill">
                        <span>Palavras: <strong id="wzw_ocrpdf_98942887_c8ed_4bba_86ed_610a4233199f_count_words" style="color: #f8fafc;">0</strong></span>
                        <span>Caracteres: <strong id="wzw_ocrpdf_98942887_c8ed_4bba_86ed_610a4233199f_count_chars" style="color: #f8fafc;">0</strong></span>
                    </div>
                </div>
                <textarea id="wzw_ocrpdf_98942887_c8ed_4bba_86ed_610a4233199f_ocr_output" class="wzw-textarea-ocr" placeholder="O texto extraído aparecerá aqui..."></textarea>

                <div class="wzw-btn-row">
                    <button type="button" class="wzw-sub-btn" id="wzw_ocrpdf_98942887_c8ed_4bba_86ed_610a4233199f_btn_copy">
                        <span>📋</span> Copiar Texto
                    </button>
                    <button type="button" class="wzw-sub-btn" id="wzw_ocrpdf_98942887_c8ed_4bba_86ed_610a4233199f_btn_download_txt">
                        <span>💾</span> Baixar Arquivo TXT
                    </button>
                    <button type="button" class="wzw-sub-btn" id="wzw_ocrpdf_98942887_c8ed_4bba_86ed_610a4233199f_btn_download_pdf">
                        <span>📄</span> Baixar PDF Pesquisável
                    </button>
                </div>
            </div>
        </div>
    </div>

    <script>
    (function() {
        const root = document.getElementById('wzw_ocrpdf_98942887_c8ed_4bba_86ed_610a4233199f');
        if (!root) return;

        const dropzone = root.querySelector('#wzw_ocrpdf_98942887_c8ed_4bba_86ed_610a4233199f_dropzone');
        const fileInput = root.querySelector('#wzw_ocrpdf_98942887_c8ed_4bba_86ed_610a4233199f_file_input');
        const workspace = root.querySelector('#wzw_ocrpdf_98942887_c8ed_4bba_86ed_610a4233199f_workspace');
        const docName = root.querySelector('#wzw_ocrpdf_98942887_c8ed_4bba_86ed_610a4233199f_doc_name');
        const docMeta = root.querySelector('#wzw_ocrpdf_98942887_c8ed_4bba_86ed_610a4233199f_doc_meta');
        const btnChange = root.querySelector('#wzw_ocrpdf_98942887_c8ed_4bba_86ed_610a4233199f_btn_change');
        const selectLang = root.querySelector('#wzw_ocrpdf_98942887_c8ed_4bba_86ed_610a4233199f_lang');
        const selectPagesMode = root.querySelector('#wzw_ocrpdf_98942887_c8ed_4bba_86ed_610a4233199f_pages_mode');
        const rangeGroup = root.querySelector('#wzw_ocrpdf_98942887_c8ed_4bba_86ed_610a4233199f_range_group');
        const rangeInput = root.querySelector('#wzw_ocrpdf_98942887_c8ed_4bba_86ed_610a4233199f_range_input');
        const btnStart = root.querySelector('#wzw_ocrpdf_98942887_c8ed_4bba_86ed_610a4233199f_btn_start_ocr');
        const progressBox = root.querySelector('#wzw_ocrpdf_98942887_c8ed_4bba_86ed_610a4233199f_progress_box');
        const progressStatus = root.querySelector('#wzw_ocrpdf_98942887_c8ed_4bba_86ed_610a4233199f_progress_status');
        const progressPct = root.querySelector('#wzw_ocrpdf_98942887_c8ed_4bba_86ed_610a4233199f_progress_pct');
        const progressFill = root.querySelector('#wzw_ocrpdf_98942887_c8ed_4bba_86ed_610a4233199f_progress_fill');
        const progressDetail = root.querySelector('#wzw_ocrpdf_98942887_c8ed_4bba_86ed_610a4233199f_progress_detail');
        const resultsArea = root.querySelector('#wzw_ocrpdf_98942887_c8ed_4bba_86ed_610a4233199f_results_area');
        const ocrOutput = root.querySelector('#wzw_ocrpdf_98942887_c8ed_4bba_86ed_610a4233199f_ocr_output');
        const countWords = root.querySelector('#wzw_ocrpdf_98942887_c8ed_4bba_86ed_610a4233199f_count_words');
        const countChars = root.querySelector('#wzw_ocrpdf_98942887_c8ed_4bba_86ed_610a4233199f_count_chars');
        const btnCopy = root.querySelector('#wzw_ocrpdf_98942887_c8ed_4bba_86ed_610a4233199f_btn_copy');
        const btnDownloadTxt = root.querySelector('#wzw_ocrpdf_98942887_c8ed_4bba_86ed_610a4233199f_btn_download_txt');
        const btnDownloadPdf = root.querySelector('#wzw_ocrpdf_98942887_c8ed_4bba_86ed_610a4233199f_btn_download_pdf');

        let currentPdfData = null;
        let pdfDoc = null;
        let totalPages = 0;
        let originalFileName = 'documento.pdf';

        function setupPdfWorker() {
            if (window.pdfjsLib && !window.pdfjsLib.GlobalWorkerOptions.workerSrc) {
                window.pdfjsLib.GlobalWorkerOptions.workerSrc = 'https://cdnjs.cloudflare.com/ajax/libs/pdf.js/3.11.174/pdf.worker.min.js';
            }
        }

        dropzone.addEventListener('click', () => fileInput.click());
        dropzone.addEventListener('dragover', (e) => { e.preventDefault(); dropzone.classList.add('drag-over'); });
        dropzone.addEventListener('dragleave', () => dropzone.classList.remove('drag-over'));
        dropzone.addEventListener('drop', (e) => {
            e.preventDefault();
            dropzone.classList.remove('drag-over');
            if (e.dataTransfer.files && e.dataTransfer.files[0]) {
                handleFile(e.dataTransfer.files[0]);
            }
        });
        fileInput.addEventListener('change', (e) => {
            if (e.target.files && e.target.files[0]) {
                handleFile(e.target.files[0]);
            }
        });
        btnChange.addEventListener('click', () => fileInput.click());

        selectPagesMode.addEventListener('change', () => {
            rangeGroup.style.display = (selectPagesMode.value === 'range') ? 'block' : 'none';
        });

        async function handleFile(file) {
            if (file.type !== 'application/pdf' && !file.name.toLowerCase().endsWith('.pdf')) {
                alert('Por favor, selecione um arquivo no formato PDF válido.');
                return;
            }
            originalFileName = file.name;
            setupPdfWorker();

            try {
                const arrayBuffer = await file.arrayBuffer();
                currentPdfData = arrayBuffer;
                pdfDoc = await window.pdfjsLib.getDocument({ data: arrayBuffer.slice(0) }).promise;
                totalPages = pdfDoc.numPages;

                docName.textContent = file.name;
                docMeta.textContent = `(${totalPages} ${totalPages === 1 ? 'página' : 'páginas'} • ${(file.size / 1024 / 1024).toFixed(2)} MB)`;
                
                dropzone.style.display = 'none';
                workspace.style.display = 'block';
                resultsArea.style.display = 'none';
                ocrOutput.value = '';
            } catch (err) {
                console.error(err);
                alert('Erro ao carregar o arquivo PDF: ' + err.message);
            }
        }

        btnStart.addEventListener('click', async () => {
            if (!pdfDoc || !currentPdfData) return;
            if (typeof Tesseract === 'undefined') {
                alert('O motor Tesseract.js ainda está sendo carregado. Aguarde alguns instantes e tente novamente.');
                return;
            }

            btnStart.disabled = true;
            progressBox.style.display = 'block';
            resultsArea.style.display = 'none';
            ocrOutput.value = '';

            let pagesToProcess = [];
            const mode = selectPagesMode.value;
            if (mode === 'all') {
                for (let i = 1; i <= totalPages; i++) pagesToProcess.push(i);
            } else if (mode === 'first') {
                pagesToProcess.push(1);
            } else if (mode === 'range') {
                const raw = rangeInput.value.trim();
                if (!raw) {
                    pagesToProcess.push(1);
                } else {
                    const parts = raw.split(',');
                    for (const p of parts) {
                        if (p.includes('-')) {
                            const [start, end] = p.split('-').map(n => parseInt(n.trim(), 10));
                            if (!isNaN(start) && !isNaN(end)) {
                                for (let k = Math.max(1, start); k <= Math.min(totalPages, end); k++) {
                                    if (!pagesToProcess.includes(k)) pagesToProcess.push(k);
                                }
                            }
                        } else {
                            const n = parseInt(p.trim(), 10);
                            if (!isNaN(n) && n >= 1 && n <= totalPages && !pagesToProcess.includes(n)) {
                                pagesToProcess.push(n);
                            }
                        }
                    }
                }
                if (pagesToProcess.length === 0) pagesToProcess.push(1);
            }

            const lang = selectLang.value || 'por';
            let accumulatedText = '';
            const totalSteps = pagesToProcess.length;

            try {
                for (let idx = 0; idx < totalSteps; idx++) {
                    const pageNum = pagesToProcess[idx];
                    progressStatus.textContent = `Processando página ${pageNum} de ${totalPages}... (${idx + 1}/${totalSteps})`;
                    progressDetail.textContent = 'Renderizando página para resolução óptica...';

                    const page = await pdfDoc.getPage(pageNum);
                    const viewport = page.getViewport({ scale: 2.0 }); // Escala 2x para alta precisão OCR

                    const canvas = document.createElement('canvas');
                    const ctx = canvas.getContext('2d');
                    canvas.width = viewport.width;
                    canvas.height = viewport.height;

                    await page.render({ canvasContext: ctx, viewport: viewport }).promise;

                    progressDetail.textContent = `Executando OCR em idioma "${lang}" via Tesseract WebAssembly...`;
                    
                    const result = await Tesseract.recognize(canvas, lang, {
                        logger: m => {
                            if (m.status === 'recognizing text') {
                                const subPct = Math.round((m.progress || 0) * 100);
                                const globalPct = Math.round(((idx + (m.progress || 0)) / totalSteps) * 100);
                                progressPct.textContent = `${globalPct}%`;
                                progressFill.style.width = `${globalPct}%`;
                                progressDetail.textContent = `Página ${pageNum}: ${subPct}% reconhecido...`;
                            }
                        }
                    });

                    const pageText = result.data.text.trim();
                    accumulatedText += `--- PÁGINA ${pageNum} ---\n\n` + pageText + '\n\n';
                }

                ocrOutput.value = accumulatedText.trim();
                updateStats(ocrOutput.value);

                progressStatus.textContent = '✓ Reconhecimento Concluído com Sucesso!';
                progressPct.textContent = '100%';
                progressFill.style.width = '100%';
                progressDetail.textContent = `OCR finalizado para ${totalSteps} ${totalSteps === 1 ? 'página' : 'páginas'}.`;

                resultsArea.style.display = 'block';
            } catch (err) {
                console.error(err);
                alert('Erro durante o processamento OCR: ' + err.message);
                progressStatus.textContent = 'Falha no processamento';
            } finally {
                btnStart.disabled = false;
            }
        });

        function updateStats(text) {
            const chars = text.length;
            const words = text.trim() ? text.trim().split(/\s+/).length : 0;
            countWords.textContent = words.toLocaleString('pt-BR');
            countChars.textContent = chars.toLocaleString('pt-BR');
        }

        ocrOutput.addEventListener('input', () => updateStats(ocrOutput.value));

        btnCopy.addEventListener('click', () => {
            navigator.clipboard.writeText(ocrOutput.value);
            btnCopy.innerHTML = '<span>✓</span> Copiado!';
            setTimeout(() => { btnCopy.innerHTML = '<span>📋</span> Copiar Texto'; }, 2000);
        });

        btnDownloadTxt.addEventListener('click', () => {
            const blob = new Blob([ocrOutput.value], { type: 'text/plain;charset=utf-8' });
            const url = URL.createObjectURL(blob);
            const a = document.createElement('a');
            a.href = url;
            a.download = originalFileName.replace(/\.pdf$/i, '') + '-ocr-reconhecido.txt';
            a.click();
            URL.revokeObjectURL(url);
        });

        btnDownloadPdf.addEventListener('click', () => {
            if (!window.jspdf || !window.jspdf.jsPDF) {
                alert('Biblioteca jsPDF não disponível.');
                return;
            }
            const { jsPDF } = window.jspdf;
            const doc = new jsPDF({ unit: 'pt', format: 'a4' });
            const margin = 40;
            const pageWidth = doc.internal.pageSize.getWidth();
            const maxLineWidth = pageWidth - (margin * 2);
            
            doc.setFont('Helvetica', 'normal');
            doc.setFontSize(10);
            
            const lines = doc.splitTextToSize(ocrOutput.value, maxLineWidth);
            let cursorY = margin;
            const lineHeight = 14;
            const pageHeight = doc.internal.pageSize.getHeight();

            for (let i = 0; i < lines.length; i++) {
                if (cursorY + lineHeight > pageHeight - margin) {
                    doc.addPage();
                    cursorY = margin;
                }
                doc.text(lines[i], margin, cursorY);
                cursorY += lineHeight;
            }

            doc.save(originalFileName.replace(/\.pdf$/i, '') + '-pesquisavel.pdf');
        });
    })();
    </script>
    



<h2 class="wp-block-heading">Transforme Documentos Escaneados e Imagens em PDFs Pesquisáveis</h2>



<p class="wp-block-paragraph">Documentos digitalizados por scanners físicos ou câmeras de celular são armazenados originalmente como fotografias embutidas, impossibilitando a seleção, cópia ou busca de termos. Com o nosso motor de <strong>OCR em PDF Online</strong>, você converte essas páginas em documentos de texto estruturado utilizando os padrões internacionais do consórcio <a href="https://tesseract-ocr.github.io/" target="_blank" rel="noopener">Tesseract OCR Open Source</a> diretamente via WebAssembly.</p>



<p class="wp-block-paragraph">Se após reconhecer o conteúdo você precisar unir o resultado a outras apresentações corporativas, utilize a nossa ferramenta para <a href="/web-ferramentas/juntar-pdf-online/">juntar múltiplos arquivos PDF</a> ou aplique a rotina de <a href="/web-ferramentas/comprimir-pdf-otimizador/">compressão e otimização de PDF</a> para reduzir o volume antes do envio por e-mail.</p>



<h2 class="wp-block-heading">Como Utilizar o Reconhecimento Óptico de Texto (Passo a Passo)</h2>



<ol class="wp-block-list">
    <li>Carregue seu PDF ou imagem escaneada na área pontilhada.</li>
    <li>Selecione o idioma predominante do texto (Português, Inglês ou Espanhol).</li>
    <li>Clique em <strong>Executar OCR no Documento</strong> e acompanhe o progresso em tempo real página por página.</li>
    <li>Copie o texto reconhecido ou baixe o arquivo em <code>.txt</code> imediatamente.</li>
</ol>
<p>O post <a href="https://webzoneware.com/web-ferramentas/pdf/ocr-pdf-reconhecimento-texto/">OCR em PDF Online — Reconhecimento de Texto e PDF Pesquisável | Web-ZoneWare</a> apareceu primeiro em <a href="https://webzoneware.com">Web-Zoneware</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://webzoneware.com/web-ferramentas/pdf/ocr-pdf-reconhecimento-texto/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
