-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #282 from JiazhenBao/main
ppt转图片
- Loading branch information
Showing
25 changed files
with
1,562 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
.idea | ||
|
||
target/ | ||
|
||
!.mvn/wrapper/maven-wrapper.jar | ||
!**/src/main/**/target/ | ||
!**/src/test/**/target/ | ||
|
||
### IntelliJ IDEA ### | ||
.idea/modules.xml | ||
.idea/jarRepositories.xml | ||
.idea/compiler.xml | ||
.idea/libraries/ | ||
*.iws | ||
*.iml | ||
*.ipr | ||
|
||
### Eclipse ### | ||
.apt_generated | ||
.classpath | ||
.factorypath | ||
.project | ||
.settings | ||
.springBeans | ||
.sts4-cache | ||
|
||
### NetBeans ### | ||
/nbproject/private/ | ||
/nbbuild/ | ||
/dist/ | ||
/nbdist/ | ||
/.nb-gradle/ | ||
build/ | ||
!**/src/main/**/build/ | ||
!**/src/test/**/build/ | ||
|
||
### VS Code ### | ||
.vscode/ | ||
|
||
### Mac OS ### | ||
.DS_Store | ||
|
||
### node_modules ### | ||
!**/node_modules/ | ||
|
||
dist/ | ||
|
||
node_modules/ | ||
|
||
**/dist-theme/ | ||
**/*.zip | ||
*.zip | ||
|
||
**/target/ | ||
|
||
|
||
diff_stat.json | ||
pr_result.json | ||
test.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# 依赖库名称 | ||
office格式转pdf | ||
|
||
## 逻辑详情 | ||
|
||
### 逻辑一 | ||
|
||
描述逻辑的功能,逻辑的出入参。 | ||
|
||
### 逻辑二 | ||
|
||
描述逻辑的功能,逻辑的出入参。 | ||
|
||
### 逻辑n... | ||
|
||
## 使用步骤说明 | ||
|
||
1. 应用引用依赖库 | ||
2. 配置应用配置参数(如果有的话) | ||
3. 逻辑调用示例截图 | ||
4. ... | ||
|
||
## 应用演示链接 | ||
|
||
[使用了本依赖库的制品应用链接] |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,175 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
<parent> | ||
<groupId>org.springframework.boot</groupId> | ||
<artifactId>spring-boot-starter-parent</artifactId> | ||
<version>2.2.9.RELEASE</version><!--与当前制品应用默认版本统一--> | ||
<relativePath/> <!-- lookup parent from repository --> | ||
</parent> | ||
|
||
<groupId>com.netease.lowcode.lib</groupId> | ||
<artifactId>office-to-pdf</artifactId> | ||
<version>1.6.0</version> | ||
|
||
<properties> | ||
<maven.compiler.source>8</maven.compiler.source> | ||
<maven.compiler.target>8</maven.compiler.target> | ||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | ||
<nasl.ide.version>3.3</nasl.ide.version> | ||
</properties> | ||
<dependencies> | ||
<!--本案例是本地系统引入nasl-metadata-collector-0.8.0.jar的方式。 | ||
若把nasl-metadata-collector-0.8.0.jar安装到自己的maven仓库, | ||
注意修改artifactId和groupId的情况下,不要使用<scope>system</scope>,会在发布时造成依赖中断。 | ||
不修改artifactId和groupId的情况下,nasl-metadata-maven-plugin会做特殊处理--> | ||
<dependency> | ||
<artifactId>nasl-metadata-collector</artifactId> | ||
<groupId>com.netease.lowcode</groupId> | ||
<version>0.10.1</version> | ||
<scope>system</scope> | ||
<systemPath>${project.basedir}/jar/nasl-metadata-collector-0.10.1.jar</systemPath> | ||
</dependency> | ||
<dependency> | ||
<artifactId>lcap-annotation</artifactId> | ||
<groupId>com.netease.lowcode</groupId> | ||
<version>1.0.4</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.fasterxml.jackson.core</groupId> | ||
<artifactId>jackson-databind</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.slf4j</groupId> | ||
<artifactId>slf4j-api</artifactId> | ||
</dependency> | ||
<!-- apache transfer--> | ||
<dependency> | ||
<groupId>org.apache.poi</groupId> | ||
<artifactId>poi</artifactId> | ||
<version>4.1.2</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.apache.poi</groupId> | ||
<artifactId>poi-ooxml</artifactId> | ||
<version>4.1.2</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.apache.pdfbox</groupId> | ||
<artifactId>pdfbox</artifactId> | ||
<version>2.0.24</version> | ||
</dependency> | ||
<!-- aspose --> | ||
<!-- excel to pdf--> | ||
<dependency> | ||
<groupId>com.aspose</groupId> | ||
<artifactId>aspose-cells</artifactId> | ||
<version>8.5.2</version> | ||
</dependency> | ||
<!-- word to pdf--> | ||
<dependency> | ||
<groupId>com.aspose</groupId> | ||
<artifactId>aspose-words</artifactId> | ||
<version>15.8.0</version> | ||
</dependency> | ||
<!-- ppt to pdf--> | ||
<dependency> | ||
<groupId>com.aspose</groupId> | ||
<artifactId>aspose-slides</artifactId> | ||
<version>15.9.0</version> | ||
</dependency> | ||
<!-- pdf to word--> | ||
<dependency> | ||
<groupId>com.aspose</groupId> | ||
<artifactId>aspose-pdf</artifactId> | ||
<version>23.1</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>junit</groupId> | ||
<artifactId>junit</artifactId> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.springframework.boot</groupId> | ||
<artifactId>spring-boot-starter-test</artifactId> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.squareup.okhttp3</groupId> | ||
<artifactId>okhttp</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.springframework.boot</groupId> | ||
<artifactId>spring-boot-starter-web</artifactId> | ||
<scope>provided</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>commons-io</groupId> | ||
<artifactId>commons-io</artifactId> | ||
<version>2.8.0</version> | ||
<scope>provided</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.auth0</groupId> | ||
<artifactId>java-jwt</artifactId> | ||
<version>3.3.0</version> | ||
<scope>provided</scope> | ||
</dependency> | ||
</dependencies> | ||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-assembly-plugin</artifactId> | ||
<version>3.3.0</version> | ||
<configuration> | ||
<descriptorRefs> | ||
<descriptorRef>jar-with-dependencies</descriptorRef> | ||
</descriptorRefs> | ||
<appendAssemblyId>false</appendAssemblyId> | ||
</configuration> | ||
<executions> | ||
<execution> | ||
<id>make-assembly</id> | ||
<phase>package</phase> | ||
<goals> | ||
<goal>single</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
<plugin> | ||
<groupId>com.netease.lowcode</groupId> | ||
<artifactId>nasl-metadata-maven-plugin</artifactId> | ||
<version>1.4.3</version> | ||
<configuration> | ||
<jarWithDependencies>true</jarWithDependencies> | ||
</configuration> | ||
<executions> | ||
<execution> | ||
<goals> | ||
<goal>archive</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
<!-- <plugin>--> | ||
<!-- <groupId>com.netease.lowcode</groupId>--> | ||
<!-- <artifactId>nasl-metadata-maven-plugin</artifactId>--> | ||
<!-- <version>1.4.3</version>--> | ||
<!-- <configuration>--> | ||
<!-- <jarWithDependencies>false</jarWithDependencies>--> | ||
<!-- </configuration>--> | ||
<!-- <executions>--> | ||
<!-- <execution>--> | ||
<!-- <goals>--> | ||
<!-- <goal>archive</goal>--> | ||
<!-- </goals>--> | ||
<!-- </execution>--> | ||
<!-- </executions>--> | ||
<!-- </plugin>--> | ||
</plugins> | ||
</build> | ||
</project> |
8 changes: 8 additions & 0 deletions
8
office-to-pdf/src/main/java/com/netease/lowcode/lib/officetopdf/LibraryAutoScan.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
package com.netease.lowcode.lib.officetopdf; | ||
|
||
/** | ||
* 依赖库自动扫描类 | ||
* @author system | ||
*/ | ||
public class LibraryAutoScan { | ||
} |
12 changes: 12 additions & 0 deletions
12
...a/com/netease/lowcode/lib/officetopdf/OfficeToPdfBasicSpringEnvironmentConfiguration.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package com.netease.lowcode.lib.officetopdf; | ||
|
||
import org.springframework.context.annotation.ComponentScan; | ||
import org.springframework.context.annotation.Configuration; | ||
|
||
/** | ||
* 加入spring环境配置(在spring.factories中指定) | ||
*/ | ||
@Configuration | ||
@ComponentScan(basePackageClasses = LibraryAutoScan.class) | ||
public class OfficeToPdfBasicSpringEnvironmentConfiguration { | ||
} |
51 changes: 51 additions & 0 deletions
51
office-to-pdf/src/main/java/com/netease/lowcode/lib/officetopdf/api/FileOverrideApi.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
package com.netease.lowcode.lib.officetopdf.api; | ||
|
||
|
||
import com.netease.lowcode.core.annotation.NaslLogic; | ||
import com.netease.lowcode.lib.officetopdf.dto.ResultDTO; | ||
import org.slf4j.Logger; | ||
import org.slf4j.LoggerFactory; | ||
import org.springframework.stereotype.Component; | ||
|
||
/** | ||
* 文件相关复写逻辑 | ||
*/ | ||
@Component | ||
public class FileOverrideApi { | ||
|
||
private final Logger log = LoggerFactory.getLogger("LCAP_EXTENSION_LOGGER"); | ||
|
||
/** | ||
* 判断是否存在fileUrl对应的记录 | ||
* | ||
* @param fileUrl | ||
* @return 文件key | ||
*/ | ||
@NaslLogic(override = true) | ||
public String isPreviewExist(String fileUrl) { | ||
return null; | ||
} | ||
|
||
/** | ||
* 保存info信息 | ||
* | ||
* @param resultDTO | ||
* @return | ||
*/ | ||
@NaslLogic(override = true) | ||
public Boolean updatePreviewInfo(ResultDTO resultDTO) { | ||
return true; | ||
} | ||
|
||
/** | ||
* 查询key对应的urlList和real count, | ||
* | ||
* @param key | ||
* @return ResultDTO结果 | ||
*/ | ||
@NaslLogic(override = true) | ||
public ResultDTO getPreviewInfo(String key) { | ||
return null; | ||
} | ||
|
||
} |
Oops, something went wrong.