Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
typo3
qfq
Commits
461440e6
Commit
461440e6
authored
Feb 16, 2018
by
Carsten Rose
Browse files
Notes how to optimize PDF thumbnailing
parent
91ca51ce
Changes
1
Hide whitespace changes
Inline
Side-by-side
extension/qfq/qfq/report/Thumbnail.php
View file @
461440e6
...
...
@@ -169,9 +169,11 @@ class Thumbnail {
$ext
=
strtolower
(
OnString
::
strrstr
(
$pathFilenameSource
,
'.'
));
// SVG files are best to thumbnail via 'inkscape'
if
(
$ext
==
'svg'
&&
$this
->
inkscape
!=
''
)
{
// if ( ($ext == 'svg' || $ext == 'pdf') && $this->inkscape != '') {
if
((
$ext
==
'svg'
)
&&
$this
->
inkscape
!=
''
)
{
$inkscapeDimension
=
Token
::
explodeDimension
(
$dimension
);
// Automatically cut white border: --export-area-drawing
// --export-text-to-path
$cmdInkscape
=
$this
->
inkscape
.
" --without-gui
$inkscapeDimension
--export-png
$pathFilenameThumbnail
$pathFilenameSource
"
;
$outputInkscape
=
Support
::
qfqExec
(
$cmdInkscape
,
$rc
);
if
(
$rc
==
0
)
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment