Skip to content

Commit f809137

Browse files
author
Evgeniy Sidenko
committed
Updated up to the version 23.11
1 parent 3c378bc commit f809137

File tree

5 files changed

+33
-0
lines changed

5 files changed

+33
-0
lines changed
28.3 KB
Binary file not shown.
35.1 KB
Binary file not shown.

Examples/data/Fonts/arial.ttf

894 KB
Binary file not shown.

Examples/data/cdr/test3.cdr

2.16 MB
Binary file not shown.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# GROUP: TEST_FILE_FORMATS
2+
from aspose.imaging import Image, FontSettings
3+
import os
4+
5+
6+
# Initialization
7+
def get_data_root_dir_local():
8+
if 'BASE_DIR' in os.environ:
9+
return os.environ["BASE_DIR"]
10+
return "."
11+
12+
13+
if 'get_data_root_dir' not in dir():
14+
get_data_root_dir = get_data_root_dir_local
15+
16+
if 'get_output_dir' not in dir():
17+
get_output_dir = get_data_root_dir_local
18+
19+
# Example code:
20+
print("Running example SupportTextStylesItalicUnderline")
21+
# The path to the documents directory.
22+
data_dir = os.path.join(get_data_root_dir(), 'cdr')
23+
input_file_name = os.path.join(data_dir, "test3.cdr")
24+
out_file = os.path.join(get_output_dir(), "test3.cdr.jpg")
25+
FontSettings.set_fonts_folder(os.path.join(get_data_root_dir(), 'Fonts'))
26+
27+
with Image.load(input_file_name) as image:
28+
image.save(out_file)
29+
30+
if 'SAVE_OUTPUT' not in os.environ:
31+
os.remove(out_file)
32+
33+
print("Finished example SupportTextStylesItalicUnderline")

0 commit comments

Comments
 (0)