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
| # -*- coding: utf-8 -*- | |
| import sys | |
| import json | |
| from aspose.gis import GisFile, GisException | |
| def convert_gpx_to_geojson(input_path: str, output_path: str) -> None: | |
| try: | |
| # Load GPX file | |
| gpx = GisFile.open(input_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
| from aspose.gis import VectorLayer, ConversionOptions | |
| from aspose.gis import Drivers | |
| # Convert file format from GPX to CSV. | |
| VectorLayer.convert( | |
| "Data/sample.gpx", | |
| Drivers.gpx, | |
| "output/destination.csv", | |
| Drivers.csv | |
| ) |
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 aspose.finance.xbrl import * | |
| import sys | |
| def convert_xbrl_to_xlsx(input_path: str, output_path: str): | |
| try: | |
| # Initialize the XBRL document | |
| xbrl_doc = XbrlDocument(input_path) | |
| # Set conversion options | |
| options = SaveOptions() |
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.cells | |
| from aspose.cells import Workbook, SaveFormat | |
| def convert_xlsx_to_csv(input_file: str, output_file: str): | |
| try: | |
| # Load the XLSX workbook | |
| workbook = Workbook(input_file) | |
| # Save the first worksheet as CSV | |
| workbook.save(output_file, SaveFormat.CSV) |
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 asposebarcode as barcode | |
| import aspose.pdf as pdf | |
| def read_barcodes_from_pdf(pdf_path): | |
| # Load PDF document | |
| pdf_doc = pdf.PdfDocument(pdf_path) | |
| # Initialize barcode reader | |
| reader = barcode.BarcodeReader() | |
| reader.decode_type = barcode.DecodeType.ALL_SUPPORTED_TYPES |
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 aspose.barcode import generation | |
| from aspose.pydrawing import Color | |
| def generate_swiss_barcode(data, jpeg_path, pdf_path): | |
| # Initialize generator with Swiss QR Code symbology | |
| generator = generation.BarcodeGenerator( | |
| generation.EncodeTypes.SWISS_POST_PARCEL, | |
| data | |
| ) |
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 aspose.barcode import generation | |
| def generate_aztec_barcode(data, output_path): | |
| # Create a BarcodeGenerator for Aztec symbology | |
| generator = generation.BarcodeGenerator( | |
| generation.EncodeTypes.AZTEC, # Symbology type | |
| data # Data to encode | |
| ) | |
| # Configure Aztec specific parameters |
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.threed as a3d | |
| def convert_fbx_to_stl(input_path: str, output_path: str): | |
| try: | |
| # Initialize the scene and load the FBX file | |
| scene = a3d.Scene() | |
| scene.open(input_path) | |
| # Set STL export options for binary format and millimeter units | |
| export_options = a3d.stl.StlExportOptions() |
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.threed as a3d | |
| def convert_glb_to_fbx(input_path: str, output_path: str): | |
| try: | |
| # Load GLB file | |
| scene = a3d.Scene.from_file(input_path) | |
| # Optional: customize FBX export options | |
| export_options = a3d.formats.FbxSaveOptions(a3d.FileFormat.FBX7500_BINARY) | |
| export_options.embed_textures = False # Improves performance for large models |
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
| """ | |
| basic_cylinder | |
| ================= | |
| Demonstrates the simplest possible approach to Create 3D Cylinder in Python | |
| using Aspose.3D. This covers the essential API pattern you will build upon. | |
| """ | |
| from aspose.threed import Scene | |
| from aspose.threed.entities import Cylinder | |
| # ─── Step 1: Create an empty 3D scene ───────────────────────────────────── |
NewerOlder