{"id":17,"date":"2025-06-30T18:47:58","date_gmt":"2025-06-30T18:47:58","guid":{"rendered":"https:\/\/gestionfecoval.org\/wordpress\/?page_id=17"},"modified":"2025-07-01T03:49:14","modified_gmt":"2025-07-01T03:49:14","slug":"analizar-pdf","status":"publish","type":"page","link":"https:\/\/gestionfecoval.org\/wordpress\/index.php\/analizar-pdf\/","title":{"rendered":"Analizar PDF"},"content":{"rendered":"\n<h2>Extraer datos del PDF de escritura<\/h2>\n<form id=\"formularioPDF\">\n  <input type=\"file\" id=\"archivo\" name=\"archivo\" accept=\".pdf\" required \/>\n  <br><br>\n  <button type=\"submit\">Subir y procesar<\/button>\n<\/form>\n\n<h3>Resultado:<\/h3>\n<pre id=\"resultado\">Esperando archivo...<\/pre>\n\n<script>\ndocument.getElementById(\"formularioPDF\").addEventListener(\"submit\", function(e) {\n  e.preventDefault();\n  const archivoInput = document.getElementById(\"archivo\");\n  const resultado = document.getElementById(\"resultado\");\n\n  if (!archivoInput.files.length) {\n    resultado.textContent = \"Por favor selecciona un archivo.\";\n    return;\n  }\n\n  const formData = new FormData();\n  formData.append(\"documento\", archivoInput.files[0]);\n\n  \/\/ Mostrar mensaje de carga\n  resultado.textContent = \"\u23f3 Procesando documento...\";\n\n  fetch(\"https:\/\/apieasyocr.gestionfecoval.org\/api_extraer\", {\n    method: \"POST\",\n    body: formData\n  })\n  .then(resp => resp.json())\n  .then(data => {\n    if (data.error) {\n      resultado.textContent = \"\u274c Error: \" + data.error;\n    } else {\n      resultado.textContent = `\n\ud83d\udcc4 N\u00famero de Escritura: ${data.numero_escritura}\n\ud83d\udcc5 Fecha: ${data.fecha}\n\ud83d\udc69\u200d\u2696\ufe0f Notario: ${data.nombre_notario}\n\ud83d\udcd0 Medidas: ${data.medidas}\n\ud83d\udccd Domicilio: ${data.domicilio}\n\ud83d\udd52 Fecha de extracci\u00f3n: ${data.fecha_extraccion}\n      `.trim();\n    }\n  })\n  .catch(err => {\n    resultado.textContent = \"\u274c Error al procesar: \" + err;\n  });\n});\n<\/script>\n\n","protected":false},"excerpt":{"rendered":"<p>Extraer datos del PDF de escritura Subir y procesar Resultado: Esperando archivo&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-17","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/gestionfecoval.org\/wordpress\/index.php\/wp-json\/wp\/v2\/pages\/17","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/gestionfecoval.org\/wordpress\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/gestionfecoval.org\/wordpress\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/gestionfecoval.org\/wordpress\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/gestionfecoval.org\/wordpress\/index.php\/wp-json\/wp\/v2\/comments?post=17"}],"version-history":[{"count":4,"href":"https:\/\/gestionfecoval.org\/wordpress\/index.php\/wp-json\/wp\/v2\/pages\/17\/revisions"}],"predecessor-version":[{"id":23,"href":"https:\/\/gestionfecoval.org\/wordpress\/index.php\/wp-json\/wp\/v2\/pages\/17\/revisions\/23"}],"wp:attachment":[{"href":"https:\/\/gestionfecoval.org\/wordpress\/index.php\/wp-json\/wp\/v2\/media?parent=17"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}