Skip to content

Instantly share code, notes, and snippets.

Avatar

Aspose.com Gists aspose-com-gists

View GitHub Profile
@aspose-com-gists
aspose-com-gists / Convert-OBJ-to-DXF.java
Created Aug 16, 2022
Convert OBJ to DXF File Programmatically in Java
View Convert-OBJ-to-DXF.java
// Load the OBJ file using the Image class
com.aspose.cad.Image image = com.aspose.cad.Image.load("template.obj");
// Create an object of CadRasterizationOptions class
com.aspose.cad.imageoptions.CadRasterizationOptions rasterizationOptions = new com.aspose.cad.imageoptions.CadRasterizationOptions();
rasterizationOptions.setPageWidth(1600);
rasterizationOptions.setPageHeight(1600);
// Create an object of DxfOptions class
com.aspose.cad.imageoptions.DxfOptions options = new com.aspose.cad.imageoptions.DxfOptions();
@aspose-com-gists
aspose-com-gists / Convert-OBJ-to-DXF.cs
Created Aug 16, 2022
Convert OBJ to DXF File Programmatically in C# .NET
View Convert-OBJ-to-DXF.cs
// Load the OBJ file using the Image class
using (var image = Aspose.CAD.Image.Load("template.obj"))
{
// Create an object of CadRasterizationOptions class
Aspose.CAD.ImageOptions.CadRasterizationOptions rasterizationOptions = new Aspose.CAD.ImageOptions.CadRasterizationOptions()
{
PageWidth = 1600,
PageHeight = 1600
};
@aspose-com-gists
aspose-com-gists / create-bubble-chart.py
Created Aug 16, 2022
Create Charts in Excel Files in Python
View create-bubble-chart.py
# Create a Workbook object
workbook = Workbook(FileFormatType.XLSX)
# Get the reference of the first worksheet and add data
worksheet = workbook.getWorksheets().get(0)
# Add some sample value to cells
cells = worksheet.getCells()
cell = cells.get("A1")
cell.setValue(50)
cell = cells.get("A2")
@aspose-com-gists
aspose-com-gists / create-pivot-table.py
Created Aug 15, 2022
Create Pivot Tables in Excel Files in Python
View create-pivot-table.py
import jpype
import asposecells
jpype.startJVM()
from asposecells.api import Workbook, PivotFieldType
# Instantiate a Workbook object
workbook = Workbook()
# Add a new worksheet and obtain its reference
@aspose-com-gists
aspose-com-gists / merge-onenote-pdf.cs
Last active Aug 15, 2022
Merge or Combine OneNote Notebook Programmatically in C# .NET
View merge-onenote-pdf.cs
// Load the OneNote .one file using Document class
Aspose.Note.Document oneSource = new Aspose.Note.Document(dataDir + "Sample1.one");
// Load the destination OneNote file
Aspose.Note.Document oneDestination = new Aspose.Note.Document(dataDir + "Quick Notes.one");
// Merge all the pages of OneNote files
oneDestination.Merge(oneSource.Select(page => page.Clone()));
// Save output PDF document
@aspose-com-gists
aspose-com-gists / merge-onenote-pdf.java
Last active Aug 15, 2022
Merge or Combine OneNote Files in Java
View merge-onenote-pdf.java
// Load the OneNote .one file using Document class
com.aspose.note.Document oneSource = new com.aspose.note.Document(dataDir + "Sample1.one");
// Load the destination OneNote file
com.aspose.note.Document oneDestination = new com.aspose.note.Document(dataDir + "Quick Notes.one");
// Clone each page of the input file
for (com.aspose.note.Page page: oneSource)
{
oneDestination.appendChildLast(page.deepClone());
View color-conversion-using-default-profiles.cs
using Aspose.Imaging;
using Aspose.Imaging.Brushes;
using Aspose.Imaging.FileFormats.Jpeg;
using Aspose.Imaging.FileFormats.Png;
using Aspose.Imaging.ImageOptions;
using Aspose.Imaging.Sources;
using System.IO;
string templatesFolder = @"c:\Users\USER\Downloads\templates\";
string dataDir = templatesFolder;
View add-diagonal-watermark-to-image.cs
using Aspose.Imaging;
using Aspose.Imaging.Brushes;
using Aspose.Imaging.FileFormats.Jpeg;
using System.IO;
string templatesFolder = @"c:\Users\USER\Downloads\templates\";
string dataDir = templatesFolder;
// Load an existing JPG image
using (Image image = Image.Load(dataDir + "template.tiff"))