Warning: session_start(): Session cannot be started after headers have already been sent in /home/tvrreohg/public_html/manga.php on line 13
setPaperSize();
}
/**
* Get paper size.
*
* @return string
*/
public function getPaperSize()
{
return $this->paper->getSize();
}
/**
* Set paper size.
*
* @param string $value
*
* @return self
*/
public function setPaperSize($value = '')
{
if (!$value) {
$value = Settings::getDefaultPaper();
}
if ($this->paper === null) {
$this->paper = new Paper();
}
$this->paper->setSize($value);
$this->pageSizeW = $this->paper->getWidth();
$this->pageSizeH = $this->paper->getHeight();
return $this;
}
/**
* Set Setting Value.
*
* @param string $key
* @param string $value
*
* @return self
*/
public function setSettingValue($key, $value)
{
return $this->setStyleValue($key, $value);
}
/**
* Set orientation.
*
* @param string $value
*
* @return self
*/
public function setOrientation($value = null)
{
$enum = [self::ORIENTATION_PORTRAIT, self::ORIENTATION_LANDSCAPE];
$this->orientation = $this->setEnumVal($value, $enum, $this->orientation);
/** @var float|int $longSide Type hint */
$longSide = $this->pageSizeW >= $this->pageSizeH ? $this->pageSizeW : $this->pageSizeH;
/** @var float|int $shortSide Type hint */
$shortSide = $this->pageSizeW < $this->pageSizeH ? $this->pageSizeW : $this->pageSizeH;
if ($this->orientation == self::ORIENTATION_PORTRAIT) {
$this->pageSizeW = $shortSide;
$this->pageSizeH = $longSide;
} else {
$this->pageSizeW = $longSide;
$this->pageSizeH = $shortSide;
}
return $this;
}
/**
* Get Page Orientation.
*
* @return string
*/
public function getOrientation()
{
return $this->orientation;
}
/**
* Set Portrait Orientation.
*
* @return self
*/
public function setPortrait()
{
return $this->setOrientation(self::ORIENTATION_PORTRAIT);
}
/**
* Set Landscape Orientation.
*
* @return self
*/
public function setLandscape()
{
return $this->setOrientation(self::ORIENTATION_LANDSCAPE);
}
/**
* Get Page Size Width.
*
* @return null|float|int
*
* @since 0.12.0
*/
public function getPageSizeW()
{
return $this->pageSizeW;
}
/**
* @param null|float|int $value
*
* @return \PhpOffice\PhpWord\Style\Section
*
* @since 0.12.0
*/
public function setPageSizeW($value = null)
{
$this->pageSizeW = $this->setNumericVal($value, self::DEFAULT_WIDTH);
return $this;
}
/**
* Get Page Size Height.
*
* @return null|float|int
*
* @since 0.12.0
*/
public function getPageSizeH()
{
return $this->pageSizeH;
}
/**
* @param null|float|int $value
*
* @return \PhpOffice\PhpWord\Style\Section
*
* @since 0.12.0
*/
public function setPageSizeH($value = null)
{
$this->pageSizeH = $this->setNumericVal($value, self::DEFAULT_HEIGHT);
return $this;
}
/**
* Get Margin Top.
*
* @return float|int
*/
public function getMarginTop()
{
return $this->marginTop;
}
/**
* Set Margin Top.
*
* @param float|int $value
*
* @return self
*/
public function setMarginTop($value = null)
{
$this->marginTop = $this->setNumericVal($value, self::DEFAULT_MARGIN);
return $this;
}
/**
* Get Margin Left.
*
* @return float|int
*/
public function getMarginLeft()
{
return $this->marginLeft;
}
/**
* Set Margin Left.
*
* @param float|int $value
*
* @return self
*/
public function setMarginLeft($value = null)
{
$this->marginLeft = $this->setNumericVal($value, self::DEFAULT_MARGIN);
return $this;
}
/**
* Get Margin Right.
*
* @return float|int
*/
public function getMarginRight()
{
return $this->marginRight;
}
/**
* Set Margin Right.
*
* @param float|int $value
*
* @return self
*/
public function setMarginRight($value = null)
{
$this->marginRight = $this->setNumericVal($value, self::DEFAULT_MARGIN);
return $this;
}
/**
* Get Margin Bottom.
*
* @return float|int
*/
public function getMarginBottom()
{
return $this->marginBottom;
}
/**
* Set Margin Bottom.
*
* @param float|int $value
*
* @return self
*/
public function setMarginBottom($value = null)
{
$this->marginBottom = $this->setNumericVal($value, self::DEFAULT_MARGIN);
return $this;
}
/**
* Get gutter.
*
* @return float|int
*/
public function getGutter()
{
return $this->gutter;
}
/**
* Set gutter.
*
* @param float|int $value
*
* @return self
*/
public function setGutter($value = null)
{
$this->gutter = $this->setNumericVal($value, self::DEFAULT_GUTTER);
return $this;
}
/**
* Get Header Height.
*
* @return float|int
*/
public function getHeaderHeight()
{
return $this->headerHeight;
}
/**
* Set Header Height.
*
* @param float|int $value
*
* @return self
*/
public function setHeaderHeight($value = null)
{
$this->headerHeight = $this->setNumericVal($value, self::DEFAULT_HEADER_HEIGHT);
return $this;
}
/**
* Get Footer Height.
*
* @return float|int
*/
public function getFooterHeight()
{
return $this->footerHeight;
}
/**
* Set Footer Height.
*
* @param float|int $value
*
* @return self
*/
public function setFooterHeight($value = null)
{
$this->footerHeight = $this->setNumericVal($value, self::DEFAULT_FOOTER_HEIGHT);
return $this;
}
/**
* Get page numbering start.
*
* @return null|int
*/
public function getPageNumberingStart()
{
return $this->pageNumberingStart;
}
/**
* Set page numbering start.
*
* @param null|int $pageNumberingStart
*
* @return self
*/
public function setPageNumberingStart($pageNumberingStart = null)
{
$this->pageNumberingStart = $pageNumberingStart;
return $this;
}
/**
* Get Section Columns Count.
*
* @return int
*/
public function getColsNum()
{
return $this->colsNum;
}
/**
* Set Section Columns Count.
*
* @param int $value
*
* @return self
*/
public function setColsNum($value = null)
{
$this->colsNum = $this->setIntVal($value, self::DEFAULT_COLUMN_COUNT);
return $this;
}
/**
* Get Section Space Between Columns.
*
* @return float|int
*/
public function getColsSpace()
{
return $this->colsSpace;
}
/**
* Set Section Space Between Columns.
*
* @param float|int $value
*
* @return self
*/
public function setColsSpace($value = null)
{
$this->colsSpace = $this->setNumericVal($value, self::DEFAULT_COLUMN_SPACING);
return $this;
}
/**
* Get Break Type.
*
* @return string
*/
public function getBreakType()
{
return $this->breakType;
}
/**
* Set Break Type.
*
* @param string $value
*
* @return self
*/
public function setBreakType($value = null)
{
$this->breakType = $value;
return $this;
}
/**
* Get line numbering.
*
* @return \PhpOffice\PhpWord\Style\LineNumbering
*/
public function getLineNumbering()
{
return $this->lineNumbering;
}
/**
* Set line numbering.
*
* @param mixed $value
*
* @return self
*/
public function setLineNumbering($value = null)
{
$this->setObjectVal($value, 'LineNumbering', $this->lineNumbering);
return $this;
}
/**
* Get vertical alignment.
*
* @return string
*/
public function getVAlign()
{
return $this->vAlign;
}
/**
* Set vertical alignment.
*
* @param string $value
*
* @return self
*/
public function setVAlign($value = null)
{
VerticalJc::validate($value);
$this->vAlign = $value;
return $this;
}
}