mejoras
Some checks failed
linter / quality (push) Has been cancelled
tests / ci (push) Has been cancelled

This commit is contained in:
2025-05-23 00:26:53 +02:00
parent 19fa52ca65
commit 28c225687a
431 changed files with 161955 additions and 2096 deletions

View File

@@ -0,0 +1,28 @@
<?php
namespace App\Services;
use Spatie\PdfToText\Pdf;
use PDFLib;
class PdfProcessor
{
public function extractAnnotations($path)
{
$text = (new Pdf())->setPdf($path)->text();
// Analizar texto para detectar anotaciones
return $this->parseAnnotations($text);
}
public function embedAnnotations($originalPdf, $annotations)
{
$pdf = new PDFLib();
$pdf->begin_document('', '');
foreach($annotations as $annotation) {
$this->addAnnotationToPdf($pdf, $annotation);
}
return $pdf->get_buffer();
}
}