| | |
| | | } |
| | | String absolutePath = pdfFile.getAbsolutePath(); |
| | | |
| | | |
| | | MultipartFile multipartFile = convertToMultipartFile(stream,fileName.substring(0,fileName.lastIndexOf(".")) ); |
| | | String s = tencentCosUtil.upLoadFile(multipartFile,"/wordToPdf"); |
| | | return s; |
| | | // InputStream inputStream = new URL(url).openStream(); |
| | | // ByteArrayOutputStream stream = new ByteArrayOutputStream(); |
| | | // IConverter converter = LocalConverter.builder().build(); |
| | | // converter.convert(inputStream) |
| | | // .as(documentType) |
| | | // .to(stream) |
| | | // .as(DocumentType.PDF).execute(); |
| | | // MultipartFile multipartFile = convertToMultipartFile(stream,fileName.substring(0,fileName.lastIndexOf(".")) ); |
| | | // String s = tencentCosUtil.upLoadFile(multipartFile,"/wordToPdf"); |
| | | // return s; |
| | | return ""; |
| | | |
| | | } catch (Exception e) { |
| | | throw new RuntimeException("PDF转换失败: " + e.getMessage(), e); |