[TYPO3-dev] PDF Thumb creation

Johannes Mueller j.f.mueller at gmx.de
Tue Sep 22 10:00:34 CEST 2015


Hi Bernd,

thanks for ur fast response.
Some test values:
Test 1: $settings['width'] = 240
240px Width: Left -> 23px -> 9.5833333%
320px Height: Top -> 29px -> 9.0625%

Test 2: $settings['width'] = 320
320px Width: Left -> 32px -> 10%
453px Height: Top -> 38px -> 8.388521%

How to adjust the background color? I looked around just a little bit, but
were not able to find anything.

2015-09-22 8:09 GMT+02:00 bernd wilke <t3ng at bernd-wilke.net>:

> Am 21.09.15 um 23:03 schrieb Johannes Mueller:
>
>> Hi,
>>
>> I'm trying to get a jpeg from a pdf via the following:
>>
>> $file = $fileReference->getOriginalResource()->getOriginalFile();
>> $settings['additionalParameters'] = '-quality 80';
>> $settings['fileExtension'] = 'jpg';
>> $settings['width'] = $width;
>>
>> $file->process(\TYPO3\CMS\Core\Resource\ProcessedFile::CONTEXT_IMAGECROPSCALEMASK
>>
>> All is good and the file gets created. But around the generated image a
>> thick black border is visible.
>> I uploaded an example generated file here:
>> http://monkeyandmind.de/pics/black.jpg
>>
>> Any ideas?
>>
>
> just ideas:
> is it a fixed 'border'? does it depend on the given width?
> have you tried to set a white background?
>
> bernd
> --
> http://www.pi-phi.de/cheatsheet.html
> _______________________________________________
> TYPO3-dev mailing list
> TYPO3-dev at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-dev
>



More information about the TYPO3-dev mailing list