Note: Advice in this article will only work for JxBrowser 6. See the corresponding article for JxBrowser 7 here.(注意:本文中的建议仅适用于JxBrowser6,JxBrowser7相应文章请点击这里。)


If you need to cancel or disable printing at all you can use the following approach:
(如果您需要取消或禁用打印,可以使用以下方法:)

browser.setPrintHandler(new PrintHandler() {
    @Override
    public PrintStatus onPrint(PrintJob printJob) {
        return PrintStatus.CANCEL;
    }
});