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-PostScript-to-GIF.java
Last active May 2, 2024 08:25
High Code Java API to Convert PostScript to GIF
package com.example;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import com.aspose.eps.PsDocument;
import com.aspose.eps.device.ImageDevice;
import com.aspose.eps.device.ImageSaveOptions;
public class Main {
// High Code Java API to Convert PostScript to GIF
@aspose-com-gists
aspose-com-gists / Convert-PPT-to-GIF.js
Last active April 30, 2024 06:48
Convert PPT to GIF using a Node.js Slides API
var aspose = aspose || {};
// Import aspose.slides.via.java into your working project.
aspose.slides = require("aspose.slides.via.java");
// Create an object of the Presentation class and load the source PPT/PPTX file.
var pres = new aspose.slides.Presentation("/first.pptx");
try
{
// Convert PPT to GIF and save the file by calling the save method.
pres.save("/PPT-to-gif.gif",aspose.slides.SaveFormat.Gif);
console.log("PPT to animated GIF conversion done successfully.")
@aspose-com-gists
aspose-com-gists / fit-all-sheet-columns-to-pdf-page.cs
Last active April 23, 2024 05:04
Excel to PDF conversion with Aspose.Cells for .NET
// Create and initialize an instance of Workbook
Workbook book = new Workbook(input);
// Create and initialize an instance of PdfSaveOptions
PdfSaveOptions saveOptions = new PdfSaveOptions();
// Set AllColumnsInOnePagePerSheet to true
saveOptions.AllColumnsInOnePagePerSheet = true;
// Save Workbook to PDF fromart by passing the object of PdfSaveOptions
@aspose-com-gists
aspose-com-gists / add_new_emails.py
Last active April 22, 2024 15:48
Create PST Files in Python
# Create a PST file
with PersonalStorage.create("sample.pst", FileFormatVersion.UNICODE) as pst:
# Access the folder to add items
inbox_folder = pst.root_folder.get_sub_folder("Inbox")
# Create a new message
message = MapiMessage("from@example.com", "to@example.com", "Subject", "Body")
# Add the message to the Inbox folder
inbox_folder.add_message(message)
@aspose-com-gists
aspose-com-gists / Convert-PowerPoint-Slide-to-Image.js
Last active April 25, 2024 05:20
Convert PowerPoint Slide to Image in Node.js
var aspose = aspose || {};
// Import the aspose.slides.via.java library into your project.
aspose.slides = require("aspose.slides.via.java");
// Create an instance of the Presentation class and load the source PPTX file.
var presentation = new aspose.slides.Presentation("/first_ppt.pptx");
try
{
// Invoke the save method to convert PPT to TIFF and save it on the disk.
presentation.save("/PPT-to-TIFF.tiff",aspose.slides.SaveFormat.Tiff);
console.log("PowerPoint slide to image conversion executed successfully.")
@aspose-com-gists
aspose-com-gists / OMR-Sheet-Reader.java
Last active April 26, 2024 05:19
OMR Sheet Reader in Java
package com.example;
import com.aspose.omr.OmrEngine;
import com.aspose.omr.RecognitionResult;
import com.aspose.omr.TemplateProcessor;
import java.io.FileOutputStream;
import java.io.PrintWriter;
// OMR Sheet Reader in Java - OMR Sheet PNG
public class Main {
public static void main(String[] args) throws Exception {
// Define working directories.