Java로 인쇄 할 때 여백을 변경하는 방법에 대한 여러 가지 해결책을 찾아 왔지만 아무런 효과가없는 것 같습니다. Here 및 Here. 지금까지 IS가 무엇JTextPane의 인쇄 여백 변경
,
TextPane textPane = new JTextPane();
StyledDocument doc = textPane.getStyledDocument();
// Define a keyword attribute
SimpleAttributeSet keyWord = new SimpleAttributeSet();
StyleConstants.setBold(keyWord, true);
Style style = doc.addStyle("StyleName", null);
StyleConstants.setIcon(style, new ImageIcon(qrcode));
doc.insertString(0, "Title Here\n", null);
doc.insertString(doc.getLength(), "Ignored", style);
textPane.print();
여백이
25.4로 기본값으로 설정되어있는 붙박이 인쇄 방법을 사용하여. 인쇄 여백을 가질 수있는 동안이 여백
을 편집 할 수 있기를 바랍니다. 내가 확인 "할 것은"입니다
인쇄 대화 상자가 "페이지 설정"탭을 제공하지 않습니까? – MadProgrammer
@MadProgrammer 예.이 값은 프로그램에서 설정하고 싶습니다. – hahahakebab