如何强制文本显示在标题下方

如何强制文本显示在标题下方

本文介绍了如何强制文本显示在标题下方?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何避免文档文本和标题重叠?

How can I avoid the document text and the header overlapping?

推荐答案

您必须为文档设置边距才能拍摄考虑到标题使用的空间。请查看此。特别感兴趣的是:

You'll have to set margins to your document, in order to take into account the space used by the header. Have a look at this example. In particular, you are interested by this Document constructor:

Document doc = new Document(Rectangle pageSize,
    float marginLeft,
    float marginRight,
    float marginTop,        // <-- you want to play with this paramater
    float marginBottom)

这篇关于如何强制文本显示在标题下方?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-16 05:34