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 / edit_powerpoint_files_complete_code_example.java
Created February 24, 2026 21:34
Edit PowerPoint Files Using Java Library
import com.groupdocs.editor.cloud.api.EditorApi;
import com.groupdocs.editor.cloud.model.*;
import com.groupdocs.editor.cloud.model.requests.*;
import java.nio.file.Files;
import java.nio.file.Paths;
public class PowerPointEditExample {
public static void main(String[] args) {
// Replace with your actual credentials
@aspose-com-gists
aspose-com-gists / Aspose.HTML for .NET – Markdown Processing and Manipulation in C#
Last active February 24, 2026 14:19
Parse, analyze, edit, and generate Markdown in C#. Work with AST, modify structure, and process GitHub-Flavored Markdown
Aspose.HTML for .NET – Markdown Processing and Manipulation in C#
@aspose-com-gists
aspose-com-gists / convert_html_tables_to_pdf_complete_code_example.py
Last active February 20, 2026 05:06
Convert HTML Tables to PDF with Aspose.HTML in Python via .NET
from pathlib import Path
from aspose.html import HTMLDocument
from aspose.html.converters import Converter
from aspose.html.saving import PdfSaveOptions
def convert_table_html_to_pdf(input_html: str, output_pdf: str) -> None:
Path(output_pdf).parent.mkdir(parents=True, exist_ok=True)
@aspose-com-gists
aspose-com-gists / batch_convert_multiple_html_files_to_pdf_complete_.py
Last active February 19, 2026 18:01
Batch Convert Multiple HTML Files to PDF with Aspose.HTML in Python via .NET
from pathlib import Path
from aspose.html import HTMLDocument
from aspose.html.saving import PdfSaveOptions
from aspose.html.converters import Converter
def batch_convert_html_to_pdf(input_dir: str, output_dir: str) -> dict:
input_path = Path(input_dir)
output_path = Path(output_dir)
@aspose-com-gists
aspose-com-gists / convert_ai_to_pdf_complete_code_example.py
Created February 17, 2026 11:55
Python via .NET: Simple AI to PDF Conversion
import sys
from aspose.psd import Image, PdfExportOptions
def convert_ai_to_pdf(input_path: str, output_path: str):
"""
Convert an AI file to PDF preserving vectors and layers.
"""
try:
# Load the AI file
ai_image = Image.load(input_path)
@aspose-com-gists
aspose-com-gists / html_to_pdf_conversion_complete_code_example.py
Created February 16, 2026 10:29
Boost Performance of HTML to PDF Conversion with Aspose.HTML in Python via .NET
import asyncio
import aspose.html as ahtml
from concurrent.futures import ThreadPoolExecutor
# Paths - update these to match your environment
HTML_INPUT = r"C:\Docs\sample.html"
PDF_OUTPUT = r"C:\Docs\sample_converted.pdf"
def create_converter():
# Load options with performance tweaks
@aspose-com-gists
aspose-com-gists / convert_ai_to_svg_complete_code_example.py
Created February 14, 2026 13:26
How to Convert AI Files to SVG in Python via .NET
import sys
from aspose.psd import Image
from aspose.psd.imageoptions import SvgExportOptions
def convert_ai_to_svg(input_path: str, output_path: str):
"""
Converts an AI file to SVG format.
Parameters:
input_pathPath to the source .ai file.
output_pathDesired path for the resulting .svg file.
using Aspose.Imaging;
using Aspose.Imaging.FileFormats.Png;
string dataDir = @"c:\Users\USER\Downloads\templates\";
string password = "veryStr0ngPassword";
using (Aspose.Imaging.RasterImage image = (Aspose.Imaging.RasterImage)Image.Load(Path.Combine(dataDir, @"template.png")))
{
image.EmbedDigitalSignature(password); // Embeds LSB-based signature data into the image using the specified password.
@aspose-com-gists
aspose-com-gists / convert_html_to_jpg_complete_code_example.py
Created February 11, 2026 10:09
How to Convert HTML to JPG with Python via .NET Using Aspose.HTML
import aspose.html as ah
from aspose.html import HtmlDocument, ImageSaveOptions, ImageFormat, Color
def convert_html_to_jpg(input_path: str, output_path: str,
width: int = 1200, height: int = 800,
dpi: int = 300, quality: int = 90) -> None:
"""
Converts an HTML file to a JPG image with the specified rendering options.
"""
try:
@aspose-com-gists
aspose-com-gists / convert_latex_to_bmp_complete_code_example.py
Created February 9, 2026 20:06
Step-by-Step Guide to Convert LaTeX to BMP with Python via .NET
import sys
import clr
import os
# Add reference to the Aspose.TeX .NET assembly
clr.AddReference("Aspose.TeX")
from Aspose.TeX import TeXDocument, RenderingOptions, ImageFormat
def render_latex_to_bmp(latex_path: str, output_path: str):
try: