- Issue created by @jrochate
Hi sir, thanks for raised issue. i new in drupal, may i know what OCR do you used, Google or Openai? actually i try using this module for Google and Openai, but i got Page Not Found. any setting i have missing? thank for your help.
- π΅πΉPortugal jrochate
Create a new issue with your request, as your question has nothing related to the original post.
Hi sir, same goal with me to have the PDF content on the same node id that has the original PDF.
may i know, what OCR do you use? because i try use Google Document AI and OpenAI, i got Page Not Found. any setting i have missing? using Mindee OCR module is no problem. i am new in drupal. thanks for your help.
Type page not found
Date Thursday, October 12, 2023 - 16:43
User admin
Location http://localhost/ocr2/admin/config/structure/document-ocr/processors/new...
Referrer http://localhost/ocr2/admin/config/structure/document-ocr/processors
Message /ocr2/admin/config/structure/document-ocr/processors/new/google_document_ai/configuration
Severity Warning
Hostname ::1
Operations- πΊπΈUnited States cameron prince
Here's an example event subscriber which might work for you:
/** * Provides the DocumentOcrDestinationEventSubscriber class. */ class DocumentOcrDestinationEventSubscriber implements EventSubscriberInterface { /** * The event subscriber to function mapping. */ public static function getSubscribedEvents() { $events['document_ocr.task_create_desination_before'][] = ['setDestination']; return $events; } /** * Sets the Document OCR destination. */ public function setDestination($event) { // Add code to look up the node to save to. $nid = 1234; if ($node = $this->entityTypeManager->getStorage('node')->load($nid)) { $event->setEntity($node); } } }
The other alternative is to either override/extend or decorate the Document OCR process service.