Priority: Enhancement
Current State: Closed
Released In: n/a
Target Release: n/a
The
DocumentViewerPlugin's
%DOCUMENTVIEWER{...}%
has undocumented parameters for the
format
(
portrait
,
landscape
or
screen
) and the
height
and
width
.
Firstly, these parameters should be documented.
Secondly, I propose that it should be possible to use any two of
format
,
height
and
width
(whereas the current implementation has
format
overriding
height
and
width
). Here is a possible implementation:
if ( $format eq 'portrait' ) {
if ($params->{height}) {
$height = $params->{height};
$width = int(724 * $height / 1024);
}
else {
$width = $params->{width} || 724;
$height = int(1024 * $width / 724);
}
}
elsif ( $format eq 'landscape' ) {
if ($params->{height}) {
$height = $params->{height};
$width = int(1024 * $height / 724);
}
else {
$width = $params->{width} || 1024;
$height = int(724 * $width / 1024);
}
}
elsif ( $format eq 'screen' ) {
if ($params->{height}) {
$height = $params->{height};
$width = int(1024 * $height / 768);
}
else {
$width = $params->{width} || 1024;
$height = int(768 * $width / 1024);
}
}
else {
$width = $params->{width} || 724;
$height = $params->{height} || 1024;
}
--
MichaelTempest - 07 Apr 2016
Would you like to create a patch?
--
MichaelDaum - 12 Dec 2017