Using PDFPreview with S3 File System

Created on 2 November 2020, over 3 years ago
Updated 7 June 2024, 21 days ago

Problem/Motivation

When using PDFPreview module in conjunction with the "S3 File System" module...upon saving a content type with a pdf I receive the error:

ImageMagick error 1: convert: no images defined `PNG:/private/tmp/imagemagick_rHNgQr.png' @ error/convert.c/ConvertImageCommand/3285. [command: convert -background white -flatten -resize '1024x1024' -quality '75' PNG:'/private/tmp/imagemagick_rHNgQr.png']

This seems to imply to me that it can't find the PNG file on the local file system. Which it's not, it's in an AWS S3 bucket.

Proposed resolution

Looking at changing PDFPreviewGenerator.php line 158 from
$toolkit->arguments()->setSourceLocalPath($local_path);
to
$toolkit->arguments()->setSource(($file_uri));

When I make this change the png file is created.

Is there there a fix that doesn't require a code change? Am I setting this up wrong?

🐛 Bug report
Status

Needs review

Version

1.0

Component

Code

Created by

🇺🇸United States byelle

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.69.0 2024