AbelVincze / Pageflip5Free

Pageflip5 free edition
https://pageflip-books.com
Other
1 stars 1 forks source link

Issue with the converter, imagick error #1

Open djpmedia opened 3 hours ago

djpmedia commented 3 hours ago

I've setup a Docker container with php7.4 and imagick. When i run /test.php everything is oke.

Checking environment for running PDF to Pageflip5 converter and API

php.ini settings (needed):
upload_max_filesize = 128M (128M only for converter)
post_max_size = 128M (128M only for converter)
max_execution_time = 0 (0)
max_input_time = 1000 (1000)
max_input_vars = 300000 (300000 only for converter)

ImageMagick test:
imagick installed.
imagick version: ImageMagick 6.9.11-60 Q16 aarch64 2021-01-25 https://imagemagick.org
(needed version 6.7 or newer)

Database test:
OK.

When I upload a PDF, everything should be running as aspected besides that the preview thumbnails are blank. When I look to the logs, it said that de job is finished, but I have some imagick errors:

-----------------------------------------------------------------------------
jobID: 21 / RQfile: temp/renderqueue / Thread: 1/1 / PageCount: 8
Array
(
    [jobID] => 21
    [UserDir] => temp/
    [rendered] => 0
    [PageCount] => 8
    [Width] => 102
    [Height] => 146
    [thWidth] => 102
    [thHeight] => 146
    [DPI] => 12.5143
    [Threads] => 1
    [finished] => 0
    [error] => 0
    [starttime] => 2024-11-15 14:51:48
    [endttime] => 
)
Target size: 102x146 / Render DPI: 50.0572
JPG quality: 90
Trial: 0
Start time: 2024-Nov-15 14:51:48
0 - PDFPage: 0 / Rotated:  / Spread:  / mDPI: 1 / imagick ERROR
1 - PDFPage: 1 / Rotated:  / Spread:  / mDPI: 1 / imagick ERROR
2 - PDFPage: 2 / Rotated:  / Spread:  / mDPI: 1 / imagick ERROR
3 - PDFPage: 3 / Rotated:  / Spread:  / mDPI: 1 / imagick ERROR
4 - PDFPage: 4 / Rotated:  / Spread:  / mDPI: 1 / imagick ERROR
5 - PDFPage: 5 / Rotated:  / Spread:  / mDPI: 1 / imagick ERROR
6 - PDFPage: 6 / Rotated:  / Spread:  / mDPI: 1 / imagick ERROR
7 - PDFPage: 7 / Rotated:  / Spread:  / mDPI: 1 / imagick ERROR
8 - PDFPage:  / Rotated:  / Spread:  / mDPI:  / imagick ERROR
Background Process (0) finished

*** All Background Process finished
End time: 2024-Nov-15 14:51:48

I can't figure out what the imagick errors are. Maybe some php modules/extensions are missing, or the Imagick version is wrong.

Maybe you can help?

AbelVincze commented 2 hours ago

As this PDF converter was designed to run on a single server environment, it lack a lot of error checking/reporting which causes situation like this a pain to debug... While I'm searching what could be gone wrong, I start working on error handling.

Until then, it worth looking at the php error.log file too for additional error logs.

AbelVincze commented 2 hours ago

Added error reporting for the background process. Check background.log after updating.