我使用Python 2.7(iOS Pythonista App)和reportlab 2.7模块来创建带有表格的PDF.一切正常.RepotLab自动格式化列的宽度.但是在两种情况下,我无法理解为什么reportlab以它的方式格式化输出以及如何获得我想要的格式.
案例1:几乎我想要的一切......
+-----+----------+---------------+----------+---------------------------------------------------------------------------------------------------------------+
| Day | Date | Time | Duration | Notes |
+-----+----------+---------------+----------+---------------------------------------------------------------------------------------------------------------+
| Tue | 01.04.14 | 14:00 - 17:15 | 3.25 | Here are some notes. |
+-----+----------+---------------+----------+---------------------------------------------------------------------------------------------------------------+
| Wed | 02.04.14 | 18:00 - 20:15 | 2.25 | Sometime these notes are a little longer text so there must be a line break to let the whole note be visible! |
+-----+----------+---------------+----------+---------------------------------------------------------------------------------------------------------------+
| Thu | 02.04.14 | 14:00 - 17:15 | …Run Code Online (Sandbox Code Playgroud)