Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
658 commits
Select commit Hold shift + click to select a range
4f61510
Autoport ApiExamples 22.6
sdfleod Jun 6, 2022
198d228
Added ported examples
Jun 7, 2022
ac2b241
Fixed test
Jun 7, 2022
6a577c2
Fixed tests
sdfleod Jun 10, 2022
3bf2b54
Updated API examples
Jun 16, 2022
e58e120
Updated API examples
Jun 16, 2022
0094a84
Merge branch 'master' into ReleasePreparation
Jun 16, 2022
613f320
Autoport ApiExamples 22.7
sdfleod Jul 8, 2022
2a69ecb
Update ExStyles
sdfleod Jul 13, 2022
a9ef23a
Updated refs
Jul 15, 2022
38d2263
Autoport ApiExamples 22.8
sdfleod Aug 8, 2022
f6ba1ae
Added changes
Aug 8, 2022
4726290
Added DocumentExplorer
Sep 2, 2022
612236d
Added images
Sep 2, 2022
87b0f3f
Autoport ApiExamples 22.9
sdfleod Sep 6, 2022
05a9acc
Updated example
Sep 16, 2022
e521f98
Fixed typo
Oct 3, 2022
d216a91
Updated versions
Oct 3, 2022
516194f
Updated versions, fixed typo
Oct 3, 2022
78df1a7
Autoport ApiExamples 22.10
sdfleod Oct 7, 2022
9b05c43
Autoport DocsExamples
sdfleod Oct 7, 2022
fa1b4e9
Update ExLoadOptions
sdfleod Oct 13, 2022
6310140
Autoport ApiExamples 22.11
sdfleod Nov 8, 2022
31b3c4a
Fix failed tests
sdfleod Nov 16, 2022
6bbf029
Autoport ApiExamples 22.12
sdfleod Dec 7, 2022
4e73383
Updated examples
Dec 8, 2022
df9dc8a
Updated examples
Dec 9, 2022
6a92ddf
Updated API examples
Dec 9, 2022
3898a25
Removed example
Dec 9, 2022
563a32b
Merge branch 'master' into ReleasePreparation
Dec 9, 2022
69c0fee
Autoport ApiExamples 23.01
sdfleod Jan 17, 2023
2d85861
Updated examples
Jan 17, 2023
0a1ebbf
Updated Python examples (Python 3.6 compatible)
Feb 1, 2023
398b005
Merge pull request #97 from Vusneduj/Python3Compatibility
sdfleod Feb 1, 2023
95e2b6f
Fix failed test
sdfleod Feb 2, 2023
06ca800
Autoport ApiExamples 23.02
sdfleod Feb 8, 2023
73b13f7
Updated examples
Feb 9, 2023
d24c8b5
Autoport ApiExamples 23.03
sdfleod Mar 9, 2023
14ef910
Updated examples
Mar 9, 2023
4c34451
Fix test
sdfleod Mar 15, 2023
edd14a8
Updated libs
Mar 20, 2023
473e56e
Updated API examples
Mar 20, 2023
6eca9b1
Autoport ApiExamples 23.04
sdfleod Apr 5, 2023
c1544a2
Updated examples
falleretic Apr 7, 2023
ace29fc
Delete Deprecated private method
sdfleod Apr 7, 2023
f1624a3
WORDSJAVA-2801 Fix ApiExamples for ApiReferences
sdfleod Apr 13, 2023
9bd8ae0
Autoport ApiExamples 23.05
sdfleod May 5, 2023
e368427
Updated examples
falleretic May 5, 2023
252c84f
Fix for Javadoc generation
sdfleod May 11, 2023
0728282
Updated libs
falleretic May 15, 2023
80a1354
Merge branch 'master' into ReleasePreparation
falleretic May 15, 2023
2dceb8a
Merge branch 'ReleasePreparation'
falleretic May 15, 2023
bcd6a34
Autoport DocsExamples
sdfleod May 23, 2023
625ed03
Updated examples
falleretic May 24, 2023
a859c6e
Added gists, updated gist tags
falleretic May 24, 2023
e37e7f7
Synchronized gists
falleretic May 24, 2023
7baee0c
Fixed gist name
falleretic May 25, 2023
2b27b9a
Updated gists tags
falleretic May 29, 2023
4519c28
Updated gist tags
falleretic May 29, 2023
dbe6fc1
Updated modules
falleretic May 29, 2023
d93f80a
Autoport ApiExamples 23.06
sdfleod Jun 9, 2023
0f64b77
Autoport DocsExamples
sdfleod Jun 9, 2023
e9d6bac
Added new examples
falleretic Jun 15, 2023
7231c73
Fix Failed Tests
sdfleod Jun 16, 2023
bc78a0c
Autoport ApiExamples 23.07
sdfleod Jul 7, 2023
6375cb4
Fix Failed Tests
sdfleod Jul 11, 2023
ce54981
Update pom version
sdfleod Jul 13, 2023
85acda3
Updated examples
falleretic Jul 20, 2023
3946df5
Autoport ApiExamples 23.08
sdfleod Aug 9, 2023
b88e898
Added new gists
falleretic Aug 11, 2023
1b8582e
Updated examples
falleretic Aug 11, 2023
e067238
Fix for Javadoc generation
sdfleod Aug 11, 2023
e36df45
UEX-395 Fix examples formatting
sdfleod Aug 14, 2023
1dfe4f6
Updated examples
falleretic Aug 14, 2023
c99e685
Updated file
falleretic Aug 15, 2023
b4fff30
Fix for Javadoc generation
sdfleod Aug 15, 2023
623cc10
Autoport ApiExamples 23.09
sdfleod Sep 11, 2023
f719bd0
Autoport DocsExamples
sdfleod Sep 11, 2023
e4765a1
Fix failed tests
sdfleod Sep 12, 2023
cc1ccbe
Updated projects
falleretic Sep 14, 2023
774b967
Added SignatureValue example
falleretic Sep 19, 2023
f43474c
Autoport ApiExamples 23.10
sdfleod Oct 12, 2023
49c2077
Updated examples
falleretic Oct 16, 2023
77ca82a
Fix for Javadoc generation
sdfleod Oct 19, 2023
e392dfa
Updated tags
falleretic Oct 24, 2023
0d59995
Updated gists
falleretic Oct 24, 2023
386daf8
Removed submodules, added new gists
falleretic Oct 26, 2023
7c76ffc
Added OptimizeOutput example
falleretic Oct 26, 2023
edf2bd5
Autoport ApiExamples 23.11
sdfleod Nov 8, 2023
9bbfa43
Autoport DocsExamples
sdfleod Nov 8, 2023
3f3f6ab
Updated examples
falleretic Nov 9, 2023
ce38f5d
Fix ApiExamples tests
sdfleod Nov 9, 2023
17261ab
Updated examples versions
falleretic Nov 20, 2023
5e07d29
Updated versions
falleretic Nov 20, 2023
7041e32
Merge branch 'ReleasePreparation'
falleretic Nov 20, 2023
eb90cdc
Updated examples and gist
falleretic Nov 22, 2023
c39b433
Updated examples
falleretic Nov 23, 2023
9fc060c
Added HelloWorld example
falleretic Dec 5, 2023
32e1681
Updated license tests
falleretic Dec 5, 2023
f7b7b00
Updated Extract examples
falleretic Dec 6, 2023
f94dd38
Updated gist id
falleretic Dec 6, 2023
aece864
Autoport ApiExamples 23.12
sdfleod Dec 6, 2023
01d2d86
Autoport DocsExamples
sdfleod Dec 6, 2023
f511413
Updated examples
falleretic Dec 7, 2023
5b870c2
Updated ApiExamples
falleretic Dec 7, 2023
3c7d97e
Updated example
falleretic Dec 8, 2023
d46a1bd
Fix for Javadoc generation
sdfleod Dec 8, 2023
79f611c
Fix ApiExamples tests
sdfleod Dec 8, 2023
911cfa2
Update GistId
sdfleod Dec 8, 2023
bfebafa
Updated projects
falleretic Dec 14, 2023
9c41f82
Merge branch 'ReleasePreparation' into UEX-416
falleretic Dec 14, 2023
a91bd6d
Merge branch 'ReleasePreparation'
falleretic Dec 14, 2023
72d71d0
Fixed GistId
falleretic Dec 14, 2023
f81b3dc
Fixed LowCode class
falleretic Dec 14, 2023
909024d
Autoport ApiExamples 24.01
sdfleod Dec 28, 2023
a2a07ea
Autoport DocsExamples
sdfleod Dec 28, 2023
14c0389
Updated examples
falleretic Dec 28, 2023
2fb5f95
Added document
falleretic Dec 28, 2023
83827c8
Fix failed tests
sdfleod Dec 29, 2023
b96f683
Fix Person and PersonCollection
sdfleod Dec 29, 2023
607d8a4
Update GistId
sdfleod Dec 29, 2023
2e427f4
Updated versions
falleretic Jan 15, 2024
b4632eb
Merge branch 'ReleasePreparation'
falleretic Jan 15, 2024
c5f8d99
Update Reporting Engine
falleretic Jan 18, 2024
9b7e262
Updated reporting engine examples and documents
falleretic Jan 19, 2024
33ad468
Updated examples and documents
falleretic Jan 22, 2024
0b9acbe
Merge branch 'master' into ReleasePreparation
falleretic Jan 22, 2024
48aad2b
Autoport ApiExamples 24.02
sdfleod Feb 5, 2024
cf2c0c8
Added new examples
falleretic Feb 6, 2024
9091b56
Fix missed import
sdfleod Feb 8, 2024
a97318e
Fix failed tests
sdfleod Feb 9, 2024
5b048b9
Update ExampleData names
sdfleod Feb 9, 2024
1d82fb6
Update GistId for ReleaseNotes
sdfleod Feb 9, 2024
90630c0
Updated packages
falleretic Feb 15, 2024
b36085b
Autoport ApiExamples 24.03
sdfleod Mar 11, 2024
ce98384
Autoport DocsExamples
sdfleod Mar 11, 2024
f4d701a
Updated ported examples
falleretic Mar 12, 2024
f01ab60
Update GistId for ReleaseNotes
sdfleod Mar 15, 2024
4385090
Autoport ApiExamples 24.04
sdfleod Apr 8, 2024
713ac23
Autoport DocsExamples
sdfleod Apr 8, 2024
82e21cc
Updated API examples
Apr 8, 2024
ff6c456
Fix failed tests
sdfleod Apr 12, 2024
6437c9a
Update GistId for ReleaseNotes
sdfleod Apr 12, 2024
f63c0dc
Merge branch 'ReleasePreparation'
Apr 22, 2024
3659345
Fixed
Apr 22, 2024
fb80f81
Autoport ApiExamples 24.05
sdfleod May 14, 2024
a80d641
Updated examples
May 15, 2024
11885bd
Fix failed tests
sdfleod May 20, 2024
7acf03b
Update GistId for ReleaseNotes
sdfleod May 21, 2024
c3504ee
Autoport ApiExamples 24.06
sdfleod Jun 7, 2024
28bad37
Updated API examples
Jun 10, 2024
acdaf16
Fix failed tests
sdfleod Jun 13, 2024
b1f4dfb
Update GistId for ReleaseNotes
sdfleod Jun 14, 2024
57dff40
Autoport ApiExamples 24.07
sdfleod Jul 8, 2024
a65d50b
Updated examples
Jul 10, 2024
c1f020f
Updated BOM
Jul 11, 2024
5e29140
Autoport DocsExamples
sdfleod Jul 11, 2024
46814b8
Fix failed tests
sdfleod Jul 18, 2024
fb4d11a
Update GistId for ReleaseNotes
sdfleod Jul 19, 2024
ea4a30e
Autoport ApiExamples 24.08
sdfleod Aug 8, 2024
55b9ff3
Autoport DocsExamples
sdfleod Aug 8, 2024
f3020ea
Updated API examples
Aug 9, 2024
695e31b
Fix Converter tests
sdfleod Aug 14, 2024
ab27f57
Update GistId for ReleaseNotes
sdfleod Aug 15, 2024
254bb56
Fixed examples
Aug 20, 2024
dfdfbf1
Autoport ApiExamples 24.09
sdfleod Sep 10, 2024
a8a9602
Autoport DocsExamples
sdfleod Sep 10, 2024
255ad26
Updated API examples
Sep 11, 2024
2f84059
Update GistId for ReleaseNotes
sdfleod Sep 13, 2024
18adc4f
Fixed and updated examples
Sep 16, 2024
b094a6b
Ignored insertImageDynamicallyByUri test
Sep 16, 2024
0b73745
Merge branch 'ReleasePreparation'
Sep 16, 2024
c4778b5
Autoport ApiExamples 24.10
sdfleod Oct 7, 2024
18cca66
Autoport DocsExamples
sdfleod Oct 7, 2024
419c525
Updated API examples
Oct 7, 2024
0dcc514
Fix failed tests
sdfleod Oct 10, 2024
0160a81
Update GistId for ReleaseNotes
sdfleod Oct 10, 2024
5c0e6c8
Updated API examples 24.10
Oct 14, 2024
3d6cde9
Merge branch 'ReleasePreparation'
Oct 14, 2024
fd4fcfc
Autoport ApiExamples 24.11
sdfleod Nov 14, 2024
16aeb46
Autoport DocsExamples
sdfleod Nov 14, 2024
a46222b
Updated API examples
Nov 20, 2024
b9b1474
Fix ExAI
sdfleod Nov 21, 2024
69c4dd5
Update GistId for ReleaseNotes
sdfleod Nov 22, 2024
057c0e2
Fix failed tests
sdfleod Nov 22, 2024
7a7ffae
Autoport ApiExamples 24.12
sdfleod Dec 9, 2024
90343c2
Updated examples
Dec 10, 2024
5f998cc
Fix failed tests
sdfleod Dec 13, 2024
71f1e1d
Update GistId for ReleaseNotes
sdfleod Dec 13, 2024
f64856e
Update LICENSE
falleretic Jan 9, 2025
95201d5
Autoport ApiExamples 25.01
sdfleod Jan 9, 2025
8b8b7bc
Updated examples
Jan 14, 2025
9742bdb
Merge branch 'master' into ReleasePreparation
Jan 14, 2025
c4d28b3
Updated examples
Jan 14, 2025
9641164
Update LICENSE
falleretic Jan 15, 2025
98cf1e6
Update LICENSE
dmzot Jan 16, 2025
063404c
Update GistId for ReleaseNotes
sdfleod Jan 17, 2025
4688add
Update pom.xml
sdfleod Jan 17, 2025
f1c8766
Merge branch 'master' into ReleasePreparation
Jan 20, 2025
2a2842f
Merge branch 'ReleasePreparation'
Jan 20, 2025
4a6f83e
Autoport ApiExamples 25.02
sdfleod Feb 7, 2025
44029cf
Autoport DocsExamples
sdfleod Feb 7, 2025
e57e374
Updated API examples
Feb 7, 2025
917123e
Updated Docs examples
Feb 7, 2025
f967b63
Fix failed tests
sdfleod Feb 13, 2025
123501d
Update GistId for ReleaseNotes
sdfleod Feb 14, 2025
8cd68eb
Autoport ApiExamples 25.03
sdfleod Mar 7, 2025
a8d667f
Autoport DocsExamples
sdfleod Mar 7, 2025
803c29e
Updated examples
Mar 10, 2025
bc62505
Fix failed tests
sdfleod Mar 18, 2025
9f6891e
Update GistId for ReleaseNotes
sdfleod Mar 19, 2025
0f75224
Autoport ApiExamples 25.04
sdfleod Apr 7, 2025
b4c453d
Autoport DocsExamples
sdfleod Apr 7, 2025
c326ae9
Updated examples to API 25.4
Apr 8, 2025
85562aa
Fix ExLowCode ApiExamples tests
sdfleod Apr 15, 2025
b537e3c
Update GistId for ReleaseNotes
sdfleod Apr 16, 2025
c5382ad
Autoport ApiExamples 25.05
sdfleod May 12, 2025
4630985
Updated examples to API 25.5
sdfleod May 15, 2025
85e84f5
Fix ApiExamples tests
sdfleod May 16, 2025
a52bf2b
Added GistId
May 19, 2025
16dc618
Update GistId for ReleaseNotes
sdfleod May 19, 2025
ae09109
Autoport ApiExamples 25.06
sdfleod Jun 5, 2025
2f84342
Autoport DocsExamples
sdfleod Jun 5, 2025
873014b
Added new examples
Jun 6, 2025
513dd35
Fix ApiExamples tests
sdfleod Jun 11, 2025
ac438e0
Autoport ApiExamples 25.07
sdfleod Jul 11, 2025
2ffb0db
Updated examples
Jul 14, 2025
7f2f672
Fix failed tests
sdfleod Jul 21, 2025
9b27d1b
Updated API projects
Jul 23, 2025
04127d9
Merge branch 'ReleasePreparation'
Jul 23, 2025
472a87c
Updated java examples
Aug 7, 2025
a4e3ecd
Autoport ApiExamples 25.08
sdfleod Aug 8, 2025
fffd7f4
Autoport DocsExamples
sdfleod Aug 8, 2025
27ba90a
Updated java API examples
Aug 11, 2025
43967bc
Updated gist id's
Aug 11, 2025
e33f9c8
Fix failed tests
sdfleod Aug 14, 2025
c15e146
Updated DocsExamples
Aug 15, 2025
f5dce31
Merge branch 'Update_DocsExamples' into ReleasePreparation
Aug 15, 2025
ebad488
Updated gists
Aug 19, 2025
0feee89
Added gists
Aug 21, 2025
e923d1e
Added new gists
Aug 22, 2025
67830b8
Added new examples
Aug 22, 2025
ad986ae
Merge branch 'UEX-546' into ReleasePreparation
Aug 22, 2025
51f6f4a
Updated examples
Aug 22, 2025
06d64e3
Merge branch 'ReleasePreparation'
Aug 22, 2025
e57dfdf
Autoport ApiExamples 25.09
sdfleod Sep 5, 2025
bc19b01
Autoport DocsExamples
sdfleod Sep 5, 2025
7bd9e51
Added API 25.9 examples
Sep 5, 2025
65218fe
Updated Aspose version
Sep 18, 2025
836bf78
Merge branch 'ReleasePreparation'
Sep 18, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
6 changes: 0 additions & 6 deletions Examples/.gitignore

This file was deleted.

34 changes: 0 additions & 34 deletions Examples/.project

This file was deleted.

109 changes: 109 additions & 0 deletions Examples/ApiExamples/Java/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
<?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>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>

<groupId>com.aspose.apiexamples</groupId>
<artifactId>ApiExamples-Tests</artifactId>
<version>1.0-SNAPSHOT</version>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.0</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.0.0-M4</version>
<configuration>
<testSourceDirectory>${basedir}/src/main/java/</testSourceDirectory>
<testClassesDirectory>${project.build.directory}/classes/</testClassesDirectory>
<includes>
<include>**/Ex*.java</include>
</includes>
</configuration>
</plugin>
</plugins>
</build>

<repositories>
<repository>
<id>AsposeJavaAPI</id>
<name>Aspose Java API</name>
<url>https://releases.aspose.com/java/repo/</url>
</repository>
<repository>
<id>com.springsource.repository.bundles.external</id>
<name>SpringSource Enterprise Bundle Repository - External Bundle Releases</name>
<url>https://repository.springsource.com/maven/bundles/external</url>
</repository>
</repositories>

<dependencies>
<dependency>
<groupId>com.aspose</groupId>
<artifactId>aspose-words</artifactId>
<version>25.9</version>
<classifier>jdk17</classifier>
</dependency>
<dependency>
<groupId>com.aspose</groupId>
<artifactId>aspose-words</artifactId>
<version>25.9</version>
<classifier>shaping-harfbuzz-plugin</classifier>
</dependency>
<dependency>
<groupId>com.aspose</groupId>
<artifactId>aspose-barcode</artifactId>
<version>25.8</version>
<classifier>jdk18</classifier>
</dependency>
<dependency>
<groupId>com.aspose</groupId>
<artifactId>aspose-pdf</artifactId>
<version>25.8</version>
<classifier>jdk17</classifier>
</dependency>
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>7.5.1</version>
</dependency>
<dependency>
<groupId>javax.media.jai</groupId>
<artifactId>com.springsource.javax.media.jai.core</artifactId>
<version>1.1.3</version>
</dependency>
<dependency>
<groupId>net.sf.ucanaccess</groupId>
<artifactId>ucanaccess</artifactId>
<version>3.0.6</version>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.16.1</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-collections4</artifactId>
<version>4.4</version>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi</artifactId>
<version>5.0.0</version>
</dependency>
</dependencies>
</project>
197 changes: 197 additions & 0 deletions Examples/ApiExamples/Java/src/main/java/Examples/ApiExampleBase.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,197 @@
package Examples;

//////////////////////////////////////////////////////////////////////////
// Copyright (c) 2001-2025 Aspose Pty Ltd. All Rights Reserved.
//
// This file is part of Aspose.Words. The source code in this file
// is only intended as a supplement to the documentation, and is provided
// "as is", without warranty of any kind, either expressed or implied.
//////////////////////////////////////////////////////////////////////////

import com.aspose.words.CurrentThreadSettings;
import com.aspose.words.License;
import org.testng.annotations.AfterClass;
import org.testng.annotations.BeforeClass;

import java.io.File;
import java.net.URI;
import java.util.Locale;

/**
* Provides common infrastructure for all API examples that are implemented as unit tests.
*/
public class ApiExampleBase {

/**
* Test artifacts directory.
*/
private final File artifactsDirPath = new File(getArtifactsDir());

/**
* Delete all dirs and files from directory.
*
* @param dir directory to be deleted
*/
private static void deleteDir(final File dir) {
String[] entries = dir.list();
for (String s : entries) {
File currentFile = new File(dir.getPath(), s);
if (currentFile.isDirectory()) {
deleteDir(currentFile);
} else {
currentFile.delete();
}
}
dir.delete();
}

/**
* Delete and create new empty directory for test artifacts.
*
* @throws Exception exception for setUnlimitedLicense()
*/
@BeforeClass(alwaysRun = true)
public void setUp() throws Exception {
CurrentThreadSettings.setLocale(Locale.US);
setUnlimitedLicense();

if (!artifactsDirPath.exists()) {
artifactsDirPath.mkdir();
} else {
deleteDir(artifactsDirPath);
artifactsDirPath.mkdir();
}
}

/**
* Delete all dirs and files from directory for test artifacts.
*/
@AfterClass(alwaysRun = true)
public void tearDown() {
deleteDir(artifactsDirPath);
}

/**
* Set java licence for using library without any restrictions.
*
* @throws Exception exception for setting licence
*/
private static void setUnlimitedLicense() throws Exception {
// This is where the test license is on my development machine.
String testLicenseFileName = getLicenseDir() + "Aspose.Total.Java.lic";
if (new File(testLicenseFileName).exists()) {
// This shows how to use an Aspose.Words license when you have purchased one.
// You don't have to specify full path as shown here. You can specify just the
// file name if you copy the license file into the same folder as your application
// binaries or you add the license to your project as an embedded resource.
License wordsLicense = new License();
wordsLicense.setLicense(testLicenseFileName);

com.aspose.pdf.License pdfLicense = new com.aspose.pdf.License();
pdfLicense.setLicense(testLicenseFileName);

com.aspose.barcode.License barcodeLicense = new com.aspose.barcode.License();
barcodeLicense.setLicense(testLicenseFileName);
}
}

/**
* Gets the path to the license used by the code examples.
*
* @return licence directory
*/
static String getLicenseDir() {
return G_LICENSE_DIR;
}

/**
* Gets the path to the documents used by the code examples. Ends with a back slash.
*
* @return directory for test artifacts
*/
static String getArtifactsDir() {
return G_ARTIFACTS_DIR;
}

/**
* Gets the path to the documents used by the code examples. Ends with a back slash.
*
* @return directory with expected documents
*/
static String getGoldsDir() {
return G_GOLDS_DIR;
}

/**
* Gets the path to the documents used by the code examples. Ends with a back slash.
*
* @return directory with documents for testing
*/
static String getMyDir() {
return G_MY_DIR;
}

/**
* Gets the path to the images used by the code examples. Ends with a back slash.
*
* @return directory with images for testing
*/
protected static String getImageDir() {
return G_IMAGE_DIR;
}

/**
* Gets the path to the codebase directory.
*
* @return directory with data files for testing
*/
static String getDatabaseDir() {
return G_DATABASE_DIR;
}

/**
* Gets the path of the free fonts. Ends with a back slash.
*
* @return directory with public fonts for testing
*/
static String getFontsDir() {
return G_FONTS_DIR;
}

/**
* Gets the path to the codebase directory.
*
* @return url with aspose logo image
*/
static URI getAsposelogoUri() {
return G_ASPOSELOGO_URI;
}

private static final String G_ASSEMBLY_DIR;
private static final String G_CODE_BASE_DIR;
private static final String G_LICENSE_DIR;
private static final String G_ARTIFACTS_DIR;
private static final String G_GOLDS_DIR;
private static final String G_MY_DIR;
private static final String G_IMAGE_DIR;
private static final String G_DATABASE_DIR;
private static final String G_FONTS_DIR;
private static final URI G_ASPOSELOGO_URI;

static {
try {
G_ASSEMBLY_DIR = System.getProperty("user.dir");
G_CODE_BASE_DIR = new File(G_ASSEMBLY_DIR).getParentFile().getParentFile() + File.separator;
G_LICENSE_DIR = G_CODE_BASE_DIR + "Data" + File.separator + "License" + File.separator;
G_ARTIFACTS_DIR = G_CODE_BASE_DIR + "Data" + File.separator + "Artifacts" + File.separator;
G_GOLDS_DIR = G_CODE_BASE_DIR + "Data" + File.separator + "Golds" + File.separator;
G_MY_DIR = G_CODE_BASE_DIR + "Data" + File.separator;
G_IMAGE_DIR = G_CODE_BASE_DIR + "Data" + File.separator + "Images" + File.separator;
G_DATABASE_DIR = G_CODE_BASE_DIR + "Data" + File.separator + "Database" + File.separator;
G_FONTS_DIR = G_CODE_BASE_DIR + "Data" + File.separator + "MyFonts" + File.separator;
G_ASPOSELOGO_URI = new URI("https://www.google.com/images/branding/googlelogo/1x/googlelogo_color_272x92dp.png");
} catch (Exception e) {
throw new RuntimeException(e);
}
}
}
Loading