Skip to content

Instantly share code, notes, and snippets.

View aspose-com-gists's full-sized avatar

Aspose.com Gists aspose-com-gists

View GitHub Profile
@aspose-com-gists
aspose-com-gists / pdf_booklet_bookmarks.py
Created July 8, 2026 09:57
Create PDF Booklet in Python
import aspose.pdf as ap
def create_pdf_booklet(input_path: str, output_path: str, add_bookmarks: bool = True):
# Load source PDF
source_doc = ap.Document(input_path)
# Initialize booklet
booklet = ap.Booklet()
booklet.layout_options = ap.BookletLayoutOptions()
booklet.layout_options.binding = ap.BookletBinding.LEFT
@aspose-com-gists
aspose-com-gists / csv_to_pdf.py
Created July 8, 2026 08:17
Convert CSV Data to PDF in Python
# Complete working code for CSV to PDF conversion
import pandas as pd
import aspose.pdf as ap
# Load CSV data using pandas
csv_path = "sample_data.csv"
df = pd.read_csv(csv_path)
# Create a new PDF document
@aspose-com-gists
aspose-com-gists / modify_pdf_annotations.py
Created July 8, 2026 06:49
Add or Remove Annotations in Python
import aspose.pdf as ap
# Load an existing PDF
pdf_path = "sample.pdf"
doc = ap.Document(pdf_path)
# -------------------------------------------------
# Add a Text Annotation (Sticky Note)
# -------------------------------------------------
text_annot = ap.annotations.TextAnnotation(doc.pages[1])
@aspose-com-gists
aspose-com-gists / readme.md
Created July 1, 2026 06:03
Complete Guide: Shapefile to CSV in Python

Complete Guide: Shapefile to CSV in Python

Learn to convert Shapefile to CSV in Python using Aspose.GIS for Python via .NET. You will learn the required installation steps, key Aspose.GIS features, handling null values, and performance tips for large datasets, plus a full working code example.

Read the full guide here: https://blog.aspose.com/gis/complete-guide-shapefile-to-csv-in-python/

@aspose-com-gists
aspose-com-gists / convert_kml_to_gpx.py
Created July 1, 2026 05:49
KML to GPX Conversion Tutorial in Python
import aspose.gis as gis
def convert_kml_to_gpx(input_kml_path: str, output_gpx_path: str):
# Load KML file
kml_file = gis.GisFile.open(input_kml_path, gis.GisFormat.KML)
# Ensure source CRS is known; if not, assume WGS‑84
source_crs = kml_file.get_spatial_reference()
if source_crs is None:
source_crs = gis.CoordinateSystem.wgs84()
@aspose-com-gists
aspose-com-gists / geojson_to_topojson.cs
Created July 1, 2026 05:14
GEOJSON to Topojson Conversion in .NET: Sample Guide
using System;
using System.IO;
using System.Threading.Tasks;
using Aspose.Gis;
using Aspose.Gis.Export;
using Aspose.Gis.Geometries;
namespace GeoJsonToTopoJsonDemo
{
class Program
@aspose-com-gists
aspose-com-gists / readme.md
Created June 29, 2026 05:22
TXT to JPG Conversion in Java: High Quality STEP by STEP
@aspose-com-gists
aspose-com-gists / readme.md
Created June 24, 2026 06:19
How to Programmatically Rotate Barcode Image in .NET

How to Programmatically Rotate Barcode Image in .NET

This tutorial shows .NET developers how to rotate barcode images using Aspose.BarCode for .NET. You'll see a clear step‑by‑step guide, a full C# code example, installation tips, configuration options, performance advice, and best‑practice recommendations to keep image quality high.

Read the full guide here: https://blog.aspose.com/barcode/how-to-programmatically-rotate-barcode-image-in-dotnet/

@aspose-com-gists
aspose-com-gists / micro_qr_generator.cs
Created June 24, 2026 05:37
Create Micro QR Code in .NET
using System;
using Aspose.BarCode;
using Aspose.BarCode.Generation;
class Program
{
static void Main()
{
// Data to encode
string qrData = "https://example.com";
@aspose-com-gists
aspose-com-gists / read_barcode_multipage_tiff.py
Created June 24, 2026 05:18
Read Barcode from Multi Page TIFF Image in Python
import asposebarcode as barcode
def read_barcodes_from_multipage_tiff(tiff_path):
# Initialize the barcode reader for all supported types
reader = barcode.BarCodeReader(tiff_path, barcode.DecodeType.ALL_SUPPORTED)
page_index = 0
while reader.read_page(page_index):
print(f"--- Page {page_index + 1} ---")
# Iterate over all barcodes found on the current page