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 / Convert-TIFF-to-PSD.java
Created May 9, 2024 09:32
Convert TIFF to PSD in Java
package com.example;
import com.aspose.imaging.Image;
import com.aspose.imaging.fileformats.psd.ColorModes;
import com.aspose.imaging.fileformats.psd.CompressionMethod;
import com.aspose.imaging.imageoptions.PsdOptions;
// Convert TIFF to PSD in Java - Image Manipulation Library
public class Main
{
public static void main(String... args)
{
@aspose-com-gists
aspose-com-gists / convert-ply-to-usd.cs
Created May 8, 2024 15:33
Convert PLY to USD in C#
using Aspose.ThreeD;
using Aspose.ThreeD.Formats;
namespace AsposeThreeD
{
class Graphics
{
// Convert PLY to USDZ/USD in C#
static void Main(string[] args)
{
// Define the directory path.
@aspose-com-gists
aspose-com-gists / convert-dwg-to-pdf.cs
Created May 7, 2024 16:15
Convert DWG to PDF in C#
using Aspose.CAD;
using Aspose.CAD.ImageOptions;
namespace AsposeThreeD
{
class DWGtoPDF {
// Convert DWG to PDF in C#
static void Main(string[] args) {
string sourceFilePath = "/sample.dwg";
// Invoke the Load method of the Image class to load the source DWG file.
@aspose-com-gists
aspose-com-gists / XPS-to-PDF.py
Created May 1, 2024 18:40
Convert XPS to PDF in Python - XPS to PDF
from aspose.page.xps import *
from aspose.page.xps.presentation.pdf import *
data_dir = "./working-files"
# Initialize streams for input and output files.
with open(data_dir + "XPStoPDF_out.pdf", "wb") as pdf_stream:
with open(data_dir + "input.xps", "rb") as xps_stream:
# Load the XPS document from the stream by creating an object of the XpsDocument class.
document = XpsDocument(xps_stream, XpsLoadOptions())
# Create an instance of the PdfSaveOptions class.
@aspose-com-gists
aspose-com-gists / Convert-PostScript-to-PDF.py
Created April 30, 2024 19:04
Convert PostScript to PDF in Python
from aspose.page.eps import *
from aspose.page.eps.device import *
# Define the working directory.
dir = "./files"
# Initialize streams for input and output files.
pdf_stream = open(dir + "outputPDF_out.pdf", "wb")
ps_stream = open(dir + "input.ps", "rb",)
# Instantiate an instance of the PsDocument class and load the source PS file.
document = PsDocument(ps_stream)
@aspose-com-gists
aspose-com-gists / SVG-to-PNG-Conversion.cs
Last active May 8, 2024 08:53
SVG to PNG Conversion in C#
using Aspose.Html.Rendering;
using Aspose.Html.Rendering.Image;
namespace Aspose.Html
{
public class SVGtoPNG
{
static void Main(string[] args)
{
// Create an instance of the SVGDocument class to load the source SVG file.