[英]ReportLab Two-Column TOC?
I have a PDF I am generating using ReportLab. 我有一个使用ReportLab生成的PDF。 I am using the standard TableOfContents flowable, but am trying to split it up into two columns, so it will all fit on the first page. 我正在使用标准的TableOfContents可变对象,但试图将其分为两列,因此它们都适合在第一页上。 the content will only ever be on one level, so I am not worried about odd-looking indentations. 内容将永远只在一个层次上,因此我不担心外观奇特的缩进。
Right now I have the PageTemplate using 2 Frames to create 2 columns on the first page. 现在,我有了使用2个框架的PageTemplate,可以在第一页上创建2列。 I get a 我得到一个
LayoutError: Flowable <TableOfContents at 0x.... frame=RightCol>...(200.5 x 720) too large on page 1 in frame 'RightCol'(200.5 x 708.0*)
Any ideas? 有任何想法吗?
Well, color me embarrassed. 好吧,让我感到尴尬。
For anyone else having this problem, check your DocTemplate
for allowSplitting
. 对于任何其他有此问题的人,请检查您的DocTemplate
中的allowSplitting
。 The default is 1
, but I had changed mine to 0
and that was the reason. 默认值为1
,但是我将我的更改为0
,这就是原因。
*facepalm* *脸部*
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.