Skip to content

Commit

Permalink
feat: update pdfservice
Browse files Browse the repository at this point in the history
Signed-off-by: Luka Trovic <[email protected]>
  • Loading branch information
luka-nextcloud committed Jul 31, 2024
1 parent d8ef701 commit c01c855
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions lib/Service/PdfService.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@ public function __construct(
}

public function extractFields(Node $file): array {
$dataDir = $this->config->getSystemValue('datadirectory');
$filePath = $dataDir . $file->getPath();
$filePath = $file->getStorage()->getLocalFile($file->getInternalPath());

try {
$pdf = new Pdf($filePath);
Expand All @@ -37,7 +36,6 @@ public function extractFields(Node $file): array {
}
return $templateFields;
} catch (\Exception $e) {
// Log
$this->logger->debug('Failed to extract fields from PDF: {error}', ['error' => $e->getMessage()]);
return [];
}
Expand Down

0 comments on commit c01c855

Please sign in to comment.