Manipulating Dxf images

Export eps to dxf image

Saving of eps image to dxf provided:

import aspose.pycore as aspycore
from aspose.imaging import Image
from aspose.imaging.imageoptions import DxfOptions
import os
if 'TEMPLATE_DIR' in os.environ:
templates_folder = os.environ['TEMPLATE_DIR']
else:
templates_folder = r"C:\Users\USER\Downloads\templates"
delete_output = 'SAVE_OUTPUT' not in os.environ
data_dir = templates_folder
output_file_path = os.path.join(data_dir, "result.dxf")
with Image.load(os.path.join(data_dir, "template.eps")) as image:
options = DxfOptions()
options.text_as_lines = True
options.convert_text_beziers = True
options.bezier_point_count = 20
image.save(output_file_path, options)
if delete_output:
os.remove(output_file_path)