0

我正在尝试使用打印管理器作为 PDF 在 WEP 视图中的回收器视图中打印列表,它卡在准备预览中,直到它崩溃不知道该怎么做,我的代码是

    PrintManager printManager = (PrintManager) getSystemService(Context.PRINT_SERVICE);
    PrintDocumentAdapter printAdapter = webView.createPrintDocumentAdapter();
    String jobName = editText.getText().toString();
    PrintAttributes.Builder builder = new PrintAttributes.Builder();
    builder.setMediaSize(PrintAttributes.MediaSize.ISO_A4);
    PrintJob printJob = printManager.print(jobName, printAdapter, builder.build());`
4

0 回答 0