Project

General

Profile

Actions

Bug #83374

closed

maxGalleryWidth does not work for PDFs

Added by David Blatter over 6 years ago. Updated about 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 #1

Updated by Sybille Peters about 6 years ago

Thank you for your report.

Even though it has been some time, would you consider checking if your patch idea is still up to date and upload it to our Gerrit review server?

Someone could do this for you, but I am thinking you might like the opportunity to contribute to TYPO3 yourself.

You can find a description of the TYPO3 contribution workflow here: https://docs.typo3.org/typo3cms/ContributionWorkflowGuide/

Hint: If you get stuck anywhere, ask on Slack in the #typo3-cms-coredev channel. You can register in the TYPO3 slack workspace here: https://forger.typo3.com/slack

Also, if your issue is no longer reproducable, please let us know in the slack channel, so that this issue can be closed.

Thank you in advance!

Sybille

Actions #2

Updated by Stephan grass almost 6 years ago

Hi,
maxGalleryWidth does not work for PDFs also in TYPO3 8.7.16

I try to set the maxGalleryWidth dependent on the frame_class:

tt_content.textmedia.dataProcessing.20.maxGalleryWidth.cObject = CASE
tt_content.textmedia.dataProcessing.20.maxGalleryWidth.cObject {
key.field = frame_class
custom-150 = TEXT
custom-150.value = 100
...
}

The fix by David Blatter will work for me.

Actions #3

Updated by Susanne Moog about 4 years ago

  • Related to Bug #88047: GalleryProcessor PDF dimensions added
Actions #4

Updated by Susanne Moog about 4 years ago

  • Status changed from New to Closed
Actions

Also available in: Atom PDF