如何强制文本显示在标题下方? [英] How to force text to be displayed below the header?

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

问题描述

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

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)

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

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆