phpThumb PDF Thumbnails doesn't work

Hello! I’ve tried to use pthumb or phpthumbof/on to make PDF thumbnails:

[[!pthumb? &input=/pdf.pdf&options=w=300&h=500&zc=1&f=jpg&sfn=0&useResizer=0]]
[[!phpthumbof? &input=/pdf.pdf &options=&w=610&f=jpg]]
[[!phpthumbon? &input=/pdf.pdf&options=w=300&h=500&zc=1&f=jpg&sfn=0&useResizer=0]]

NOTHING worked!

[2021-02-12 22:10:13] (ERROR @ /home/p426030/www/technoleague.ru/core/components/phpthumbof/model/phpthumbof.class.php : 156) [pThumb] Resource: 12 || Image: (none)
File not found: /home/p426030/www/technoleague.ru/[[+fileURL]]  *** Skipping ***
[2021-02-12 22:11:06] (ERROR @ /home/p426030/www/technoleague.ru/core/components/phpthumbof/model/phpthumbof.class.php : 156) [pThumb] Resource: 12 || Image: /home/p426030/www/technoleague.ru/pdf.pdf
Could not generate thumbnail
phpThumb debug output:
    [0] => phpThumb() v1.7.15-202004301145 in file "phpthumb.class.php" on line 233
    [1] => setSourceFilename(/home/p426030/www/technoleague.ru/pdf.pdf) set $this->sourceFilename to "/home/p426030/www/technoleague.ru/pdf.pdf" in file "phpthumb.class.php" on line 298
    [2] => $AvailableImageOutputFormats = array(text;ico;bmp;wbmp;gif;webp;png;jpeg) in file "phpthumb.class.php" on line 1009
    [3] => $this->thumbnailFormat set to $this->config_output_format "jpeg" in file "phpthumb.class.php" on line 1020
    [4] => $this->thumbnailFormat set to $this->f "jpeg" in file "phpthumb.class.php" on line 1027
    [5] => $this->thumbnailQuality set to "75" in file "phpthumb.class.php" on line 1037
    [6] => resolvePath: /home/p426030/www/technoleague.ru/pdf.pdf (allowed_dirs: Array
(
)
) in file "phpthumb.class.php" on line 1180
    [7] => resolvePath: iteration, path=/home/p426030/www/technoleague.ru/pdf.pdf, base path = /home/p426030/www/technoleague.ru in file "phpthumb.class.php" on line 1199
    [8] => open_basedir: "" in file "phpthumb.class.php" on line 1166
    [9] => resolvePath: stop at component 6 in file "phpthumb.class.php" on line 1215
    [10] => resolvePath: stop at path=/home/p426030/www/technoleague.ru/pdf.pdf in file "phpthumb.class.php" on line 1218
    [11] => resolvePath: path parsed, over in file "phpthumb.class.php" on line 1224
    [12] => $this->sourceFilename set to "/home/p426030/www/technoleague.ru/pdf.pdf" in file "phpthumb.class.php" on line 930
    [13] => SetCacheFilename() _src set from md5($this->sourceFilename) "/home/p426030/www/technoleague.ru/pdf.pdf" = "640e8756f3d12c052952d94d15f9a4fe" in file "phpthumb.class.php" on line 3591
    [14] => SetCacheFilename() _par set from md5(_farC_zc1_h500_w300_dpi150_q75) in file "phpthumb.class.php" on line 3624
    [15] => starting ExtractEXIFgetImageSize() in file "phpthumb.class.php" on line 3389
    [16] => getimagesize(/home/p426030/www/technoleague.ru/pdf.pdf) says image is x in file "phpthumb.class.php" on line 3399
    [17] => getimagesize("/home/p426030/www/technoleague.ru/pdf.pdf") failed in file "phpthumb.class.php" on line 3428
    [18] => $this->useRawIMoutput=true after checking $UnAllowedParameters in file "phpthumb.class.php" on line 1635
    [19] => ImageMagickThumbnailToGD() aborting because ImageMagickCommandlineBase() failed in file "phpthumb.class.php" on line 2366
    [20] => ImageMagickThumbnailToGD() failed in file "phpthumb.class.php" on line 3435
    [21] => SetOrientationDependantWidthHeight() starting with ""x"" in file "phpthumb.class.php" on line 3368
    [22] => SetOrientationDependantWidthHeight() setting w="300", h="500" in file "phpthumb.class.php" on line 3384
    [23] => EXIF thumbnail extraction: (size=0; type=""; 0x0) in file "phpthumb.class.php" on line 3492
    [24] => starting SourceImageToGD() in file "phpthumb.class.php" on line 3750
    [25] => starting ImageCreateFromFilename(/home/p426030/www/technoleague.ru/pdf.pdf) in file "phpthumb.class.php" on line 3665
    [26] => empty $filename or getimagesize(/home/p426030/www/technoleague.ru/pdf.pdf) failed in file "phpthumb.class.php" on line 3714
    [27] => Populating $rawimagedata in file "phpthumb.class.php" on line 3722
    [28] => attempting ImageCreateFromStringReplacement($rawimagedata (68296 bytes), true) in file "phpthumb.class.php" on line 3736
    [29] => ImageCreateFromStringReplacement() failed: unknown fileformat signature " 0x25 0x50 0x44" in file "phpthumb.class.php" on line 4324
    [30] => Not using EXIF thumbnail data because $this->exif_thumbnail_data is empty in file "phpthumb.class.php" on line 3822
    [31] => $this->gdimg_source is still empty in file "phpthumb.class.php" on line 3874
    [32] => ImageMagickThumbnailToGD() failed in file "phpthumb.class.php" on line 3876
    [33] => phpThumb() v1.7.15-202004301145
http://phpthumb.sourceforge.net

Error messages disabled.

edit phpThumb.config.php and (temporarily) set
$PHPTHUMB_CONFIG['disable_debug'] = false;
to view the details of this error in file "phpthumb.class.php" on line 4197
    [34] => SourceImageToGD() failed in file "phpthumb.class.php" on line 378
----------------------

As I understand, ImageMagisk is working, but no Ghostscript! Both are installed, proof: convert command is working and converts pdf to png on the server. Help me pls.

Not a solution necessarily, but do you have all three of those phpthumb extras installed at the same time? I seem to remember reading that will not work properly…

Not of course, have just tried each of them.

This post in the old forum talks about checking your Imagemagick settings to make sure PDF conversion is enabled. Might be helpful.

I have also the same problem, that pThumb doesn’t make any thumbnails from PDF-files.
/etc/ImageMagick-6/policy.xml is changed to

<policy domain="coder" rights="read/write" pattern="PDF">

Call:

[[pthumb? &input=`[[+url]]` &options=`w=400&f=jpg&sfn=0` &useResizer=`0` &zc=`1` ]]

Error-Log:

[2023-09-13 13:22:15] (ERROR @ /.../core/vendor/james-heinrich/phpthumb/phpthumb.class.php : 3538) PHP warning: Trying to access array offset on value of type bool
[2023-09-13 13:22:15] (ERROR @ /.../core/vendor/james-heinrich/phpthumb/phpthumb.class.php : 3546) PHP warning: Trying to access array offset on value of type bool
[2023-09-13 13:22:15] (ERROR @ /.../core/vendor/james-heinrich/phpthumb/phpthumb.class.php : 3908) PHP warning: Trying to access array offset on value of type bool
[2023-09-13 13:22:16] (ERROR @ /.../core/vendor/james-heinrich/phpthumb/phpthumb.class.php : 3986) PHP warning: Trying to access array offset on value of type bool
[2023-09-13 13:22:16] (ERROR @ /.../core/vendor/james-heinrich/phpthumb/phpthumb.class.php : 4038) PHP warning: Trying to access array offset on value of type bool
[2023-09-13 13:22:16] (ERROR @ /.../core/components/phpthumbof/model/phpthumbof.class.php : 156) [pThumb] Resource: 35 || Image: /.../assets/uploads/gmoabladl/2023-03-120-bairergmoabladl-web.pdf
Could not generate thumbnail
phpThumb debug output:
    [0] => phpThumb() v1.7.20-202212091316 in file "phpthumb.class.php" on line 279
    [1] => setSourceFilename(/.../assets/uploads/gmoabladl/2023-03-120-bairergmoabladl-web.pdf) set $this->sourceFilename to "/.../assets/uploads/gmoabladl/2023-03-120-bairergmoabladl-web.pdf" in file "phpthumb.class.php" on line 344
    [2] => $AvailableImageOutputFormats = array(text;ico;bmp;wbmp;gif;webp;png;jpeg) in file "phpthumb.class.php" on line 1068
    [3] => $this->thumbnailFormat set to $this->config_output_format "jpeg" in file "phpthumb.class.php" on line 1080
    [4] => $this->thumbnailFormat set to $this->f "jpeg" in file "phpthumb.class.php" on line 1087
    [5] => $this->thumbnailQuality set to "75" in file "phpthumb.class.php" on line 1097
    [6] => resolvePath: /.../assets/uploads/gmoabladl/2023-03-120-bairergmoabladl-web.pdf (allowed_dirs: Array
(
)
) in file "phpthumb.class.php" on line 1240
    [7] => resolvePath: iteration, path=/.../assets/uploads/gmoabladl/2023-03-120-bairergmoabladl-web.pdf, base path = /.../ in file "phpthumb.class.php" on line 1259
    [8] => open_basedir: "" in file "phpthumb.class.php" on line 1226
    [9] => resolvePath: stop at component 10 in file "phpthumb.class.php" on line 1275
    [10] => resolvePath: stop at path=/.../assets/uploads/gmoabladl/2023-03-120-bairergmoabladl-web.pdf in file "phpthumb.class.php" on line 1278
    [11] => resolvePath: path parsed, over in file "phpthumb.class.php" on line 1284
    [12] => $this->sourceFilename set to "/.../assets/uploads/gmoabladl/2023-03-120-bairergmoabladl-web.pdf" in file "phpthumb.class.php" on line 985
    [13] => SetCacheFilename() _src set from md5($this->sourceFilename) "/.../assets/uploads/gmoabladl/2023-03-120-bairergmoabladl-web.pdf" = "53d96bd591ae6c57d19fedb1ed03d95f" in file "phpthumb.class.php" on line 3685
    [14] => SetCacheFilename() _par set from md5(_farC_w400_dpi150_q75) in file "phpthumb.class.php" on line 3724
    [15] => starting ExtractEXIFgetImageSize() in file "phpthumb.class.php" on line 3478
    [16] => getimagesize(/.../assets/uploads/gmoabladl/2023-03-120-bairergmoabladl-web.pdf) failed in file "phpthumb.class.php" on line 3490
    [17] => getimagesize("/.../assets/uploads/gmoabladl/2023-03-120-bairergmoabladl-web.pdf") failed in file "phpthumb.class.php" on line 3520
    [18] => $this->useRawIMoutput=true after checking $UnAllowedParameters in file "phpthumb.class.php" on line 1719
    [19] => ImageMagickThumbnailToGD() aborting because ImageMagickCommandlineBase() failed in file "phpthumb.class.php" on line 2454
    [20] => ImageMagickThumbnailToGD() failed in file "phpthumb.class.php" on line 3527
    [21] => SetOrientationDependantWidthHeight() starting with ""x"" in file "phpthumb.class.php" on line 3457
    [22] => SetOrientationDependantWidthHeight() setting w="400", h="0" in file "phpthumb.class.php" on line 3473
    [23] => EXIF thumbnail extraction: (size=0; type=""; 0x0) in file "phpthumb.class.php" on line 3586
    [24] => starting SourceImageToGD() in file "phpthumb.class.php" on line 3855
    [25] => starting ImageCreateFromFilename(/.../assets/uploads/gmoabladl/2023-03-120-bairergmoabladl-web.pdf) in file "phpthumb.class.php" on line 3765
    [26] => empty $filename or getimagesize(/.../assets/uploads/gmoabladl/2023-03-120-bairergmoabladl-web.pdf) failed in file "phpthumb.class.php" on line 3819
    [27] => Populating $rawimagedata in file "phpthumb.class.php" on line 3827
    [28] => attempting ImageCreateFromStringReplacement($rawimagedata (24680729 bytes), true) in file "phpthumb.class.php" on line 3841
    [29] => ImageCreateFromStringReplacement() failed: unknown fileformat signature " 0x25 0x50 0x44" in file "phpthumb.class.php" on line 4470
    [30] => Not using EXIF thumbnail data because $this->exif_thumbnail_data is empty in file "phpthumb.class.php" on line 3927
    [31] => $this->gdimg_source is still empty in file "phpthumb.class.php" on line 3979
    [32] => ImageMagickThumbnailToGD() failed in file "phpthumb.class.php" on line 3981
    [33] => phpThumb() v1.7.20-202212091316
http://phpthumb.sourceforge.net

Error messages disabled.

edit phpThumb.config.php and (temporarily) set
$PHPTHUMB_CONFIG['disable_debug'] = false;
to view the details of this error in file "phpthumb.class.php" on line 4343
    [34] => SourceImageToGD() failed in file "phpthumb.class.php" on line 424
----------------------

ModX 3.0.3
PHP 8.1
pThumb 2.3.3