md
This commit is contained in:
parent
e789d20abd
commit
ef54839698
@ -271,9 +271,9 @@
|
||||
<orderEntry type="library" name="Maven: xml-apis:xml-apis-ext:1.3.04" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.xmlgraphics:batik-codec:1.14" level="project" />
|
||||
<orderEntry type="module-library">
|
||||
<library name="Maven: com.aspose:aspose-words:15.8.0">
|
||||
<library name="Maven: com.aspose:aspose-words:19.1.0">
|
||||
<CLASSES>
|
||||
<root url="jar://$MODULE_DIR$/../emis-biz/lib/aspose-words-15.8.0-jdk16.jar!/" />
|
||||
<root url="jar://$MODULE_DIR$/../emis-biz/lib/aspose-words-19.1-jdk16.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
|
||||
@ -230,9 +230,9 @@
|
||||
<orderEntry type="library" name="Maven: xml-apis:xml-apis-ext:1.3.04" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.xmlgraphics:batik-codec:1.14" level="project" />
|
||||
<orderEntry type="module-library">
|
||||
<library name="Maven: com.aspose:aspose-words:15.8.0">
|
||||
<library name="Maven: com.aspose:aspose-words:19.1.0">
|
||||
<CLASSES>
|
||||
<root url="jar://$MODULE_DIR$/lib/aspose-words-15.8.0-jdk16.jar!/" />
|
||||
<root url="jar://$MODULE_DIR$/lib/aspose-words-19.1-jdk16.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
|
||||
BIN
emis-biz/lib/aspose-words-19.1-jdk16.jar
Normal file
BIN
emis-biz/lib/aspose-words-19.1-jdk16.jar
Normal file
Binary file not shown.
@ -151,15 +151,26 @@
|
||||
<version>1.10.6</version>
|
||||
</dependency>
|
||||
|
||||
<!-- <dependency>-->
|
||||
<!-- <groupId>com.aspose</groupId>-->
|
||||
<!-- <artifactId>aspose-words</artifactId>-->
|
||||
<!-- <version>15.8.0</version>-->
|
||||
<!-- <scope>system</scope>-->
|
||||
<!-- <systemPath>${project.basedir}/lib/aspose-words-15.8.0-jdk16.jar</systemPath>-->
|
||||
<!-- </dependency>-->
|
||||
|
||||
<dependency>
|
||||
<groupId>com.aspose</groupId>
|
||||
<artifactId>aspose-words</artifactId>
|
||||
<version>15.8.0</version>
|
||||
<version>19.1.0</version>
|
||||
<scope>system</scope>
|
||||
<systemPath>${project.basedir}/lib/aspose-words-15.8.0-jdk16.jar</systemPath>
|
||||
<systemPath>${project.basedir}/lib/aspose-words-19.1-jdk16.jar</systemPath>
|
||||
</dependency>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- <dependency>-->
|
||||
<!-- <groupId>com.fastreport</groupId>-->
|
||||
<!-- <artifactId>fastreport</artifactId>-->
|
||||
|
||||
@ -57,16 +57,18 @@ public class DocUtils {
|
||||
* @throws Exception
|
||||
*/
|
||||
public static void wordToPdf(InputStream wordInput, OutputStream pdfOutput) throws Exception {
|
||||
getLicense();
|
||||
// getLicense();
|
||||
//通过aspose-words.jar中的类转换文件
|
||||
Document wordDoc = new Document(wordInput);
|
||||
FontSubstitutionWarningCollector callback = new FontSubstitutionWarningCollector();
|
||||
wordDoc.setWarningCallback(callback);
|
||||
if(!StringUtils.isEmpty(SystemConfig.FONT_PATH)) {
|
||||
FontSettings.setFontsFolder(SystemConfig.FONT_PATH, false);
|
||||
// FontSettings.setFontsFolder(SystemConfig.FONT_PATH, false);
|
||||
FontSettings.getDefaultInstance().setFontsFolder(SystemConfig.FONT_PATH, false);
|
||||
}
|
||||
PdfSaveOptions pso = new PdfSaveOptions();
|
||||
wordDoc.save(pdfOutput, pso);
|
||||
// PdfSaveOptions pso = new PdfSaveOptions();
|
||||
// wordDoc.save(pdfOutput, pso);
|
||||
wordDoc.save(pdfOutput, SaveFormat.PDF);
|
||||
}
|
||||
|
||||
@SneakyThrows
|
||||
|
||||
Loading…
Reference in New Issue
Block a user