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-PPT-to-GIF.js
Last active April 24, 2024 07:37
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.o")
@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
Created April 16, 2024 20:42
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
Created April 15, 2024 21:57
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.
@aspose-com-gists
aspose-com-gists / PNG-to-PSD-Converter.java
Last active April 23, 2024 02:51
Convert PNG to Photoshop File 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 PNG to Photoshop File - PNG to PSD Converter
public class Main
{
public static void main(String... args)
{