[英]Implementing underlined header and footer while printing Java Swing
我正在創建一個程序,該程序打印帶有下划線的頁眉和頁腳的多頁文檔。 我的文檔在JTextPane中。 JComponent類的打印方法是:
JTextComponent.print(MessageFormat headerFormat, MessageFormat footerFormat,
boolean showPrintDialog, PrintService service, PrintRequestAttributeSet attributes,
boolean interactive)
打印我的文檔以及作為headerFormat和footerFormat響應傳遞的頁眉和頁腳。 但是,我需要在頁眉和頁腳下划線並更改其字體大小。
請幫幫我。
請參閱http://java-sl.com/articles.html 4篇有關使用自定義頁眉和頁腳打印JTextPane的文章。 有關頁眉和頁腳的文章 。
或者,您可以嘗試使用此打印機來打印/預覽內容。 它需要自定義的頁眉/頁腳實現,但也有可能。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.