Learn how to Convert TXT File to CSV in Python
This file contains hidden or 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
# Import necessary modules from Aspose.PSD for working with PSD files | |
import aspose.psd as psd | |
from aspose.psd import Color | |
from aspose.psd.fileformats.psd import PsdImage, FontBaseline, FontCaps | |
from aspose.psd.fileformats.psd.layers import TextLayer | |
from aspose.pycore import cast | |
# Define the license file path for Aspose.PSD | |
license_path = "latest.lic" | |
# Apply the Aspose.PSD license to unlock full functionality |
This file contains hidden or 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
from io import BytesIO | |
import aspose.psd as psd | |
from aspose.psd.fileformats.psd import PsdImage | |
from aspose.psd.fileformats.psd.layers import Layer | |
inputFile = "sample.png" | |
outputFile = "AddFileAsLayer.psd" | |
# Open file as Stream. | |
with open(inputFile, "rb", buffering=0) as filestream: | |
stream = BytesIO(filestream.read()) |
Learn how to Convert HTML to Excel in Python
This file contains hidden or 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
Aspose.HTML for Python via .NET – How-to Articles |
This file contains hidden or 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
import os | |
import aspose.gis as gis | |
from aspose.gis import VectorLayer, Drivers | |
# Define the working directory and license path. | |
data_dir = "files" | |
license_path = "license.lic" | |
# Apply Aspose.GIS license | |
license = gis.License() | |
license.set_license(license_path) |
This file contains hidden or 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
import os | |
import aspose.gis as gis | |
from aspose.gis import VectorLayer, Drivers | |
from aspose.pycore import cast | |
# Define a class for converting Shapefiles (.shp) to JSON (.json) | |
class ShapefileToJsonConverter: | |
def __init__(self, data_dir, license_path): | |
# Store the directory containing data files | |
self.data_dir = data_dir |
This file contains hidden or 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
import os | |
import aspose.gis as gis | |
from aspose.gis import VectorLayer, Drivers, ConversionOptions | |
from aspose.gis.formats.topojson import TopoJsonOptions | |
from aspose.pycore import cast | |
# Define path for the working directory and load the Aspose.GIS license. | |
dataDir = "files" | |
license = gis.License() | |
license.set_license("License.lic") |
This file contains hidden or 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
// Define the path for the working directory. | |
string MyDir = "files"; | |
string sourceFilePath = MyDir + "conic_pyramid.dxf"; | |
// Load the source DXF file by calling the load method. | |
using (Aspose.CAD.Image image = Aspose.CAD.Image.Load(sourceFilePath)) | |
{ | |
// Create an object of CadRasterizationOptions | |
Aspose.CAD.ImageOptions.CadRasterizationOptions rasterizationOptions = new Aspose.CAD.ImageOptions.CadRasterizationOptions(); | |
// Define page width & height. | |
rasterizationOptions.PageWidth = 1200; |
This file contains hidden or 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
import aspose.cad as cad | |
from aspose.cad.imageoptions import PngOptions | |
# A class to handle CAD image conversion using Aspose.CAD for Python via .NET | |
class CadImageConverter: | |
def __init__(self, input_path, output_path, license_path): | |
# Store input, output, and license file paths | |
self.input_path = input_path | |
self.output_path = output_path | |
self.license_path = license_path |