Answer the question
In order to leave comments, you need to log in
When setting setLandscape(true) gives an error?
Good afternoon.
Prompt in what there can be a business.
private void prinTTN(Document document) {
Workbook workbook = document.getWorkbook();
Sheet sheet = workbook.getSheetAt(0);
HSSFPrintSetup ps = (HSSFPrintSetup) sheet.getPrintSetup();
ps.setLandscape(true);
}
Answer the question
In order to leave comments, you need to log in
The getPrintSetup() method returned null. And null, of course, doesn't have a setLandscape() method, so you can't call it.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question