Closed major-mayer closed 1 year ago
I'll see if there is a way to handle this case gracefully.
Thank you, this would be great
I tried to reproduce it but it worked as expected on my instance. The generation failed for the encrypted PDFs but continued with other previews.
Are you sure that the generation stops on the first error?
Hmm interesting, I've just tried it out once again with another password protected PDF and this time the preview generation process was not stopped.
docker exec -u www-data nextcloudfpm ./occ preview:pre-generate -vvv
2022-12-07T21:55:13+00:00 Generating previews for /laurenz/files/Ablage/3.pdf
**** This file requires a password for access.
Error: /invalidfileaccess in pdf_process_Encrypt
Operand stack:
Execution stack:
%interp_exit .runexec2 --nostringval-- runpdf --nostringval-- 2 %stopped_push --nostringval-- runpdf runpdf false 1 %stopped_push 1990 1 3 %oparray_pop 1989 1 3 %oparray_pop 1977 1 3 %oparray_pop 1978 1 3 %oparray_pop runpdf runpdf runpdf runpdf false 1 %stopped_push
Dictionary stack:
--dict:739/1123(ro)(G)-- --dict:1/20(G)-- --dict:80/200(L)-- --dict:80/200(L)-- --dict:133/256(ro)(G)-- --dict:320/325(ro)(G)-- --dict:29/32(L)--
Current allocation mode is local
Last OS error: No such file or directory
GPL Ghostscript 9.53.3: Unrecoverable error, exit code 1
2022-12-07T21:55:16+00:00 Generating previews for /laurenz/files/Ablage/IMG_20220913_224425289 (1).jpg
I will close this then as not reproducible.
Of course, it's not possible to generate previews for encrypted PDFs, but this shouldn't stop the process of preview generation. When I just browse through the files app, an error is created in the logs, but Nextcloud continues to run.
The preview generator reports the following:
And in the Nextcloud logs this appears: