PHPOffice / PHPWord

A pure PHP library for reading and writing word processing documents
https://phpoffice.github.io/PHPWord/
Other
7.27k stars 2.7k forks source link

Tables are set out of margins #2076

Open jmsa56 opened 3 years ago

jmsa56 commented 3 years ago

Describe the Bug

The tables are set out of paper margin. This issue is more visible when borders line are set, the text is aligned

Steps to Reproduce

Samples (Sample 09)

<?php
require __DIR__ . '/vendor/autoload.php';

$phpWord = new \PhpOffice\PhpWord\PhpWord();
$section = $phpWord->addSection();
$section->...

Expected Behavior

Table should be inside of paper margins

Current Behavior

The table is out of margin paper

Context

Please fill in your environment information:

Sample_09_Tables.docx Sample_09_Tables_expected.docx

DShkrabak commented 3 years ago

Let's see if I understood you correctly. Basic Table. I only see difference Tables/Tables_Expected in:

wakikuk commented 3 weeks ago

On the Style Table you can add : 'cellMarginTop'=>100,'cellMarginRight=>100,'cellMarginBottom'=>100,'cellMarginLeft'=>100