Project

General

Profile

Actions

Bug #83374

closed

maxGalleryWidth does not work for PDFs

Added by David Blatter over 6 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Frontend
Target version:
-
Start date:
2017-12-18
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
9
PHP Version:
7.2
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

When I set tt_content.textmedia.dataProcessing.20.maxGalleryWidth images get scaled down propertly. However the maxGalleryWidth does not have any effect on my PDF (not sure if this is true for all PDFs though). The problem seems to be, that TYPO3 can't detect the PDFs dimensions and therefore TYPO3\CMS\Frontend\DataProcessing\GalleryProcessor->getCroppedDimensionalProperty($fileObject,'width') returns 0.

I was able to fix the issue for me by ignoring the cropped width if it is 0 (see attached file). I'm not sure if this is the way to go but it seems pretty save to me, since a cropped width of zero would always mean that the width was not detected and the maxGalleryWidth would imo be the best fallback value.

The same issue exists in 8.7 and I could fix it with the same patch.


Files

diff.txt (1.19 KB) diff.txt My temporary fix David Blatter, 2017-12-18 14:07

Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #88047: GalleryProcessor PDF dimensionsClosed2019-04-01

Actions
Actions

Also available in: Atom PDF