Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

This PDF document probably uses a compression technique which is not supported by the free parser shipped with FPDI #20

Closed
PiotrEsse opened this issue Oct 2, 2020 · 3 comments
Labels
bug Something isn't working

Comments

@PiotrEsse
Copy link

I am getting this error after setting up workflow:

{"reqId":"7hrMc3uVZ8srVxmfSVg9","level":3,"time":"2020-10-02T14:05:02+02:00","remoteAddr":"","user":"PiotrEsse","app":"workflow_ocr","method":"","url":"--","message":{"Exception":"setasign\\Fpdi\\PdfParser\\CrossReference\\CrossReferenceException","Message":"This PDF document probably uses a compression technique which is not supported by the free parser shipped with FPDI. (See https://www.setasign.com/fpdi-pdf-parser for more details)","Code":267,"Trace":[{"file":"/var/www/nextcloud/apps/workflow_ocr/vendor/setasign/fpdi/src/PdfParser/CrossReference/CrossReference.php","line":209,"function":"initReaderInstance","class":"setasign\\Fpdi\\PdfParser\\CrossReference\\CrossReference","type":"->","args":[{"objectNumber":13,"generationNumber":0,"value":{"value":{"value":{"DecodeParms":{"value":{"Columns":{"value":3,"__class__":"setasign\\Fpdi\\PdfParser\\Type\\PdfNumeric"},"Predictor":{"value":12,"__class__":"setasign\\Fpdi\\PdfParser\\Type\\PdfNumeric"}},"__class__":"setasign\\Fpdi\\PdfParser\\Type\\PdfDictionary"},"Filter":{"value":"FlateDecode","__class__":"setasign\\Fpdi\\PdfParser\\Type\\PdfName"},"ID":{"value":[{"value":"095013B6EA4DB844AA978B8FE782E0CF","__class__":"setasign\\Fpdi\\PdfParser\\Type\\PdfHexString"},{"value":"095013B6EA4DB844AA978B8FE782E0CF","__class__":"setasign\\Fpdi\\PdfParser\\Type\\PdfHexString"}],"__class__":"setasign\\Fpdi\\PdfParser\\Type\\PdfArray"},"Index":{"value":[{"value":7,"__class__":"setasign\\Fpdi\\PdfParser\\Type\\PdfNumeric"},{"value":9,"__class__":"setasign\\Fpdi\\PdfParser\\Type\\PdfNumeric"}],"__class__":"setasign\\Fpdi\\PdfParser\\Type\\PdfArray"},"Info":{"generationNumber":0,"value":6,"__class__":"setasign\\Fpdi\\PdfParser\\Type\\PdfIndirectObjectReference"},"Length":{"value":44,"__class__":"setasign\\Fpdi\\PdfParser\\Type\\PdfNumeric"},"Prev":{"value":894614,"__class__":"setasign\\Fpdi\\PdfParser\\Type\\PdfNumeric"},"Root":{"generationNumber":0,"value":8,"__class__":"setasign\\Fpdi\\PdfParser\\Type\\PdfIndirectObjectReference"},"Size":{"value":16,"__class__":"setasign\\Fpdi\\PdfParser\\Type\\PdfNumeric"},"Type":{"value":"XRef","__class__":"setasign\\Fpdi\\PdfParser\\Type\\PdfName"},"W":{"value":[{"value":1,"__class__":"setasign\\Fpdi\\PdfParser\\Type\\PdfNumeric"},{"value":2,"__class__":"setasign\\Fpdi\\PdfParser\\Type\\PdfNumeric"},{"value":0,"__class__":"setasign\\Fpdi\\PdfParser\\Type\\PdfNumeric"}],"__class__":"setasign\\Fpdi\\PdfParser\\Type\\PdfArray"}},"__class__":"setasign\\Fpdi\\PdfParser\\Type\\PdfDictionary"},"__class__":"setasign\\Fpdi\\PdfParser\\Type\\PdfStream"},"__class__":"setasign\\Fpdi\\PdfParser\\Type\\PdfIndirectObject"}]},{"file":"/var/www/nextcloud/apps/workflow_ocr/vendor/setasign/fpdi/src/PdfParser/CrossReference/CrossReference.php","line":67,"function":"readXref","class":"setasign\\Fpdi\\PdfParser\\CrossReference\\CrossReference","type":"->","args":[116]},{"file":"/var/www/nextcloud/apps/workflow_ocr/vendor/setasign/fpdi/src/PdfParser/PdfParser.php","line":157,"function":"__construct","class":"setasign\\Fpdi\\PdfParser\\CrossReference\\CrossReference","type":"->","args":[{"__class__":"setasign\\Fpdi\\PdfParser\\PdfParser"},0]},{"file":"/var/www/nextcloud/apps/workflow_ocr/vendor/setasign/fpdi/src/PdfParser/PdfParser.php","line":205,"function":"getCrossReference","class":"setasign\\Fpdi\\PdfParser\\PdfParser","type":"->","args":[]},{"file":"/var/www/nextcloud/apps/workflow_ocr/vendor/setasign/fpdi/src/PdfParser/PdfParser.php","line":181,"function":"getCatalog","class":"setasign\\Fpdi\\PdfParser\\PdfParser","type":"->","args":[]},{"file":"/var/www/nextcloud/apps/workflow_ocr/vendor/setasign/fpdi/src/PdfReader/PdfReader.php","line":84,"function":"getPdfVersion","class":"setasign\\Fpdi\\PdfParser\\PdfParser","type":"->","args":[]},{"file":"/var/www/nextcloud/apps/workflow_ocr/vendor/setasign/fpdi/src/FpdiTrait.php","line":214,"function":"getPdfVersion","class":"setasign\\Fpdi\\PdfReader\\PdfReader","type":"->","args":[]},{"file":"/var/www/nextcloud/apps/workflow_ocr/lib/Wrapper/FpdiWrapper.php","line":47,"function":"setSourceFile","class":"setasign\\Fpdi\\Tcpdf\\Fpdi","type":"->","args":[null]},{"file":"/var/www/nextcloud/apps/workflow_ocr/lib/Wrapper/FpdiWrapper.php","line":38,"function":"setContent","class":"OCA\\WorkflowOcr\\Wrapper\\FpdiWrapper","type":"->","args":[null]},{"file":"/var/www/nextcloud/apps/workflow_ocr/lib/Wrapper/WrapperFactory.php","line":28,"function":"__construct","class":"OCA\\WorkflowOcr\\Wrapper\\FpdiWrapper","type":"->","args":[null]},{"file":"/var/www/nextcloud/apps/workflow_ocr/lib/OcrProcessors/PdfOcrProcessor.php","line":101,"function":"createFpdi","class":"OCA\\WorkflowOcr\\Wrapper\\WrapperFactory","type":"->","args":[null]},{"file":"/var/www/nextcloud/apps/workflow_ocr/lib/OcrProcessors/PdfOcrProcessor.php","line":53,"function":"splitPdf","class":"OCA\\WorkflowOcr\\OcrProcessors\\PdfOcrProcessor","type":"->","args":[null]},{"file":"/var/www/nextcloud/apps/workflow_ocr/lib/Service/OcrService.php","line":42,"function":"ocrFile","class":"OCA\\WorkflowOcr\\OcrProcessors\\PdfOcrProcessor","type":"->","args":[null]},{"file":"/var/www/nextcloud/apps/workflow_ocr/lib/BackgroundJobs/ProcessFileJob.php","line":192,"function":"ocrFile","class":"OCA\\WorkflowOcr\\Service\\OcrService","type":"->","args":["application/pdf",null]},{"file":"/var/www/nextcloud/apps/workflow_ocr/lib/BackgroundJobs/ProcessFileJob.php","line":157,"function":"ocrFile","class":"OCA\\WorkflowOcr\\BackgroundJobs\\ProcessFileJob","type":"->","args":[{"__class__":"OC\\Files\\Node\\File"}]},{"file":"/var/www/nextcloud/apps/workflow_ocr/lib/BackgroundJobs/ProcessFileJob.php","line":96,"function":"processFile","class":"OCA\\WorkflowOcr\\BackgroundJobs\\ProcessFileJob","type":"->","args":["/PiotrEsse/files/Mieszkania/Spadek - Mickiewicza/Testament/Image120602023801.pdf"]},{"file":"/var/www/nextcloud/lib/private/BackgroundJob/Job.php","line":62,"function":"run","class":"OCA\\WorkflowOcr\\BackgroundJobs\\ProcessFileJob","type":"->","args":[{"filePath":"/PiotrEsse/files/Mieszkania/Spadek - Mickiewicza/Testament/Image120602023801.pdf","uid":"PiotrEsse"}]},{"file":"/var/www/nextcloud/lib/private/BackgroundJob/QueuedJob.php","line":46,"function":"execute","class":"OC\\BackgroundJob\\Job","type":"->","args":[{"__class__":"OC\\BackgroundJob\\JobList"},{"__class__":"OC\\Log"}]},{"file":"/var/www/nextcloud/cron.php","line":126,"function":"execute","class":"OC\\BackgroundJob\\QueuedJob","type":"->","args":[{"__class__":"OC\\BackgroundJob\\JobList"},{"__class__":"OC\\Log"}]}],"File":"/var/www/nextcloud/apps/workflow_ocr/vendor/setasign/fpdi/src/PdfParser/CrossReference/CrossReference.php","Line":257,"CustomMessage":"--"},"userAgent":"--","version":"19.0.3.1","id":"5f77192db3186"}

@R0Wi
Copy link
Contributor

R0Wi commented Oct 2, 2020

This PDF document probably uses a compression technique which is not supported by the free parser shipped with FPDI. (See https://www.setasign.com/fpdi-pdf-parser for more details)

Did you have a look at the link inside the error message? Could it be that you try to process a PDF with a "special" compression-technique?

Edit: if try uploading your document to https://www.setasign.com/products/fpdi-pdf-parser/details/ you can choose which parser you want to use. The workflow_ocr app currently uses the free FPDI parser. If you encounter errors with this one i'm afraid there is not much we can do here (or we'll have to buy a commercial licence ;-) )

@R0Wi R0Wi added the bug Something isn't working label Oct 2, 2020
@R0Wi
Copy link
Contributor

R0Wi commented Nov 19, 2020

Closing since the fdpi-pdf-parser won't be used anymore if #32 is merged.

@R0Wi R0Wi closed this as completed Nov 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants
@R0Wi @PiotrEsse and others