Skip to content

Instantly share code, notes, and snippets.

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

aspose-com-kb

View GitHub Profile
@aspose-com-kb
aspose-com-kb / Merge XPS Files in C#.cs
Last active June 28, 2024 16:02
Merge XPS Files in C#.
using System.IO;
using Aspose.Page;
class Program
{
static void Main(string[] args)
{
new License().SetLicense("License.lic");
// Load XPS document
Aspose.Page.XPS.XpsDocument document = new Aspose.Page.XPS.XpsDocument("input.xps", new Aspose.Page.XPS.XpsLoadOptions());
@aspose-com-kb
aspose-com-kb / Resize EPS in Python.py
Last active June 28, 2024 15:33
Resize EPS in Python.
from aspose.page import *
from aspose.page.eps import *
from aspose.page.eps.device import *
from aspose.page.eps.xmp import *
import aspose.pydrawing
#Create an input stream for EPS file
with open("input.eps", "rb",) as input_eps_stream:
#Initialize PsDocument object with input stream
doc = PsDocument(input_eps_stream)
@aspose-com-kb
aspose-com-kb / Freeze Panes in Excel with Java.java
Created June 27, 2024 17:37
Freeze Panes in Excel with Java.
import com.aspose.cells.*;
public class Main
{
public static void main(String[] args) throws Exception // Freeze panes in Excel
{
// Set the licenses
new License().setLicense("License.lic");
// Instantiate a new Workbook.
Workbook workbook = new Workbook("Sample.xlsx");
@aspose-com-kb
aspose-com-kb / Freeze Panes in Excel using C#.cs
Last active June 27, 2024 16:09
Freeze Panes in Excel using C#.
using Aspose.Cells;
class Program
{
static void Main(string[] args)
{
new License().SetLicense("License.lic");
// Instantiate a new Workbook.
Workbook workbook = new Workbook("Sample.xlsx");
@aspose-com-kb
aspose-com-kb / Add Sparklines in Excel with Node.js
Last active June 24, 2024 18:21
Add Sparklines in Excel with Node.js
var aspose = aspose || {};
aspose.cells = require("aspose.cells");
// Set the license
new aspose.cells.License().setLicense("License.lic");
// Instantiate a Workbook object
let wb = new aspose.cells.Workbook();
let sheet = wb.getWorksheets().get(0);
@aspose-com-kb
aspose-com-kb / Merge XPS Files in Python.py
Created June 22, 2024 01:15
Merge XPS Files in Python.
import aspose.page
from aspose.page.xps import *
from aspose.page.xps.presentation.pdf import *
with open("mergedXPSfilespy.pdf", "wb") as pdf_stream:
# Initialize XPS input stream
with open("input.xps", "rb") as xps_stream:
# Load XPS document form the stream
document = XpsDocument(xps_stream, XpsLoadOptions())
@aspose-com-kb
aspose-com-kb / Add Sparklines in Excel using Java.java
Created June 21, 2024 05:44
Add Sparklines in Excel using Java.
import com.aspose.cells.*;
public class Main
{
public static void main(String[] args) throws Exception // Sparklines in Excel
{
// Set the licenses
new License().setLicense("License.lic");
// Create a Workbook object
Workbook wb = new Workbook();
@aspose-com-kb
aspose-com-kb / Convert Image to EPS in Python.py
Created June 14, 2024 17:03
Convert Image to EPS in Python.
import aspose.page
from aspose.page.eps import *
from aspose.page.eps.device import *
from aspose.page.eps.xmp import *
# Create default options
options = PsSaveOptions()
# Save image to EPS format
PsDocument.save_image_as_eps("sample_image.jpg", "output1.eps", options)
@aspose-com-kb
aspose-com-kb / Create EPS File in Python.py
Created June 14, 2024 17:01
Create EPS File in Python.
import aspose.page
from aspose.page import *
from aspose.page.eps.device import *
from aspose.page.eps import *
import io
#Create output stream for PostScript document
with open("CreateEPS.ps", "wb") as out_ps_stream:
#Create save options
import jpype
import asposecells as cells
jpype.startJVM()
from asposecells.api import License, Workbook, CellArea, SparklineType, Color
# Instantiate a license
license = License()
license.setLicense("License.lic")
# Create a Workbook object