2012-06-27 21 views

回答

1

你必須距設置爲您的文檔,以考慮到頭部使用的空間。看看這個example。特別是你對此感興趣:Document constructor

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

我只是想改變內容的位置,紙張大小不變。 – Rancho

+0

您不會更改紙張尺寸,只是邊距。實際上,你需要做的唯一事情就是修改'marginTop'以使文本的位置低於默認位置。 –

+0

那麼,如何更改marginTop和marginBottom?它在一個類裏面? – Rancho

相關問題