Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/tensorflow/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Apache flex 保存使用navigateToURL打开的文件_Apache Flex_Velocity_Navigatetourl - Fatal编程技术网

Apache flex 保存使用navigateToURL打开的文件

Apache flex 保存使用navigateToURL打开的文件,apache-flex,velocity,navigatetourl,Apache Flex,Velocity,Navigatetourl,我正在使用navigateToURL打开由Jasper生成的PDF文件,它运行良好。现在我被要求发送一封带有PDF文件的电子邮件作为附件。我们在应用程序中使用Velocity发送电子邮件,但要发送附件,我们必须将文件保存在某个位置,并提供路径和文件名的信息。 是否可以保存到由navigateToURL打开的文件 我使用的是FlexSDK 4.9.1 谢谢。是否使用JasperExportManager.exportReportToPdfStream()方法来显示PDF 如果是,请尝试使用Jasp

我正在使用navigateToURL打开由Jasper生成的PDF文件,它运行良好。现在我被要求发送一封带有PDF文件的电子邮件作为附件。我们在应用程序中使用Velocity发送电子邮件,但要发送附件,我们必须将文件保存在某个位置,并提供路径和文件名的信息。 是否可以保存到由navigateToURL打开的文件

我使用的是FlexSDK 4.9.1


谢谢。

是否使用JasperExportManager.exportReportToPdfStream()方法来显示PDF

如果是,请尝试使用JasperExportManager.exportReportToPdfFile() 然后您可以在服务器上保存PDF

JasperPrint jasperprint = JasperFillManager.fillReport(jasper, paramMap, con);
// Streaming pdf now?
response.setContentType("application/pdf");
JasperExportManager.exportReportToPdfStream(jasperprint, response.getOutputStream());

// Save the PDF somewhere.
JasperExportManager.exportReportToPdfFile(jasperprint, path);

谢谢你的回复。与此同时,我的经理改变了我的工作重点,这对他来说不再紧迫。当我回到这里,我会尝试你的解决方案。