我想将Pdf作为电子邮件附件发送(我正在使用JavaMailAPI)。我将Pdf(由jasper生成)作为byte[]。publicInputStreamexportPdfToInputStream(Useruser)throwsParseErrorException,MethodInvocationException,ResourceNotFoundException,JRException,IOException{JasperPrintjasperPrint=createJasperPrintObject(user);byte[]pdfByteArray=JasperExportM