How do you make a table within a cell in rtf? Here's the simplest table I know:
{\rtf\ansi\deff0
\trowd
\intbl
\cellx1000 Item 1\cell
\cellx2000 Item 2\cell
\row
}
How do I replace Item 1
and Item 2
with tables that have an arbitrary number of rows & columns?
Use itapX
notation for table level definition. Try this:
{\rtf\ansi\deff0
\trowd
\intbl\itap1\cellx2000
\ql{Item 1 - Before}
\par
\intbl\itap2
\ql{Table inside item 1 \line }
{\nestcell{\nonesttables\par}\pard}
{\*\nesttableprops \trowd\cellx1000\nestrow}
\intbl\itap1
\ql{Item 1 - After}
\cell
\intbl\itap1\cellx4000
\ql{Item 2}
\cell
\row
\pard\itap0
}
For other examples or tests see the sigma-z project "PHPRtfLite". Other samples and basic editor for help you.
https://github.com/phprtflite/PHPRtfLite
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With