| | |
| | | System.out.println("\n--- 测试1:单文件转换 ---"); |
| | | WordToPdfConverter converter = WordToPdfConverter.getInstance(); |
| | | // 请修改为您的 Word 文件路径 |
| | | String wordFilePath = "F:\\file\\estate\\reports\\"+uuid+".docx"; // 包含图表的 Word 文件 |
| | | String pdfFilePath = "F:\\file\\estate\\reports\\"+uuid+".pdf"; |
| | | String wordFilePath = "/data/uploads/reports/"+uuid+".docx"; // 包含图表的 Word 文件 |
| | | String pdfFilePath = "/data/uploads/reports/"+uuid+".pdf"; |
| | | |
| | | File wordFile = new File(wordFilePath); |
| | | if (!wordFile.exists()) { |
| | |
| | | } else { |
| | | System.out.println("✗ 单文件转换失败"); |
| | | } |
| | | return "http://221.182.45.100:11225/images/reports/"+uuid+".pdf"; |
| | | return "http://xllpgzx.com/report/"+uuid+".pdf"; |
| | | } |
| | | |
| | | /** |