Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create TextBox with a radius border #2047

Open
ahmed-bhs opened this issue Mar 23, 2021 · 1 comment
Open

Create TextBox with a radius border #2047

ahmed-bhs opened this issue Mar 23, 2021 · 1 comment

Comments

@ahmed-bhs
Copy link

I'm trying to create a TextBox with a redius a border in PHPWord, but setting borderRedius or borderSize to 0 or null has no effect and I always get a rectangular around the text box.

$phpWord = new \PhpOffice\PhpWord\PhpWord();
$textbox = $section->addTextBox(
    array(
        'alignment'   => \PhpOffice\PhpWord\SimpleType\Jc::END,
        'width'       => 200,
        'height'      => 40,
        'borderRedius' => 50,
        'borderColor' => null,
        'borderSize'  => 0,
    )
);
$textbox->addText('dummy-text ...', null, array('alignment' => \PhpOffice\PhpWord\SimpleType\Jc::END));
$objWriter = \PhpOffice\PhpWord\IOFactory::createWriter($phpWord);
$objWriter->save('dummy.docx');

Any help would be appreciated!!

@jcesarht
Copy link

jcesarht commented Dec 3, 2023

Hi there, somebody help me with a border radius, because does not work to table element and textbox element. My version PhpWord is 1.1. thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants