This repository has been archived by the owner on Mar 4, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
itning
committed
Mar 14, 2019
1 parent
a84b577
commit 191323d
Showing
12 changed files
with
179 additions
and
55 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
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
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
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
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
57 changes: 57 additions & 0 deletions
57
src/main/java/top/yunshu/shw/server/util/Office2PdfLicense.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,57 @@ | ||
package top.yunshu.shw.server.util; | ||
|
||
import java.io.FileInputStream; | ||
import java.io.InputStream; | ||
|
||
|
||
/** | ||
* @author itning | ||
*/ | ||
final class Office2PdfLicense { | ||
private static final String LICENSE_PATH = Office2PdfLicense.class.getResource("/license.xml").getPath().substring(1); | ||
|
||
/** | ||
* 获取Word的license签字验证 | ||
*/ | ||
static boolean getWordLicense() { | ||
boolean result = false; | ||
try (InputStream is = new FileInputStream(LICENSE_PATH)) { | ||
com.aspose.words.License aposeLic = new com.aspose.words.License(); | ||
aposeLic.setLicense(is); | ||
result = true; | ||
} catch (Exception e) { | ||
e.printStackTrace(); | ||
} | ||
return result; | ||
} | ||
|
||
/** | ||
* 获取Excel的license签字验证 | ||
*/ | ||
static boolean getExcelLicense() { | ||
boolean result = false; | ||
try (InputStream is = new FileInputStream(LICENSE_PATH)) { | ||
com.aspose.cells.License aposeLic = new com.aspose.cells.License(); | ||
aposeLic.setLicense(is); | ||
result = true; | ||
} catch (Exception e) { | ||
e.printStackTrace(); | ||
} | ||
return result; | ||
} | ||
|
||
/** | ||
* 获取PPT的license | ||
*/ | ||
static boolean getPPTLicense() { | ||
boolean result = false; | ||
try (InputStream is = new FileInputStream(LICENSE_PATH)) { | ||
com.aspose.slides.License aposeLic = new com.aspose.slides.License(); | ||
aposeLic.setLicense(is); | ||
result = true; | ||
} catch (Exception e) { | ||
e.printStackTrace(); | ||
} | ||
return result; | ||
} | ||
} |
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
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
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
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,13 @@ | ||
<License> | ||
<Data> | ||
<Products> | ||
<Product>Aspose.Total for Java</Product> | ||
<Product>Aspose.Words for Java</Product> | ||
</Products> | ||
<EditionType>Enterprise</EditionType> | ||
<SubscriptionExpiry>20991231</SubscriptionExpiry> | ||
<LicenseExpiry>20991231</LicenseExpiry> | ||
<SerialNumber>8bfe198c-7f0c-4ef8-8ff0-acc3237bf0d7</SerialNumber> | ||
</Data> | ||
<Signature>sNLLKGMUdF0r8O1kKilWAGdgfs2BvJb/2Xp8p5iuDVfZXmhppo+d0Ran1P9TKdjV4ABwAgKXxJ3jcQTqE/2IRfqwnPf8itN8aFZlV3TJPYeD3yWE7IT55Gz6EijUpC7aKeoohTb4w2fpox58wWoF3SNp6sK6jDfiAUGEHYJ9pjU=</Signature> | ||
</License> |
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