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 / Create-Drop-Shadow-feOffset-SVG.cs
Created Sep 23, 2022
Create Drop Shadow Effect on SVG Programmatically in C#
View Create-Drop-Shadow-feOffset-SVG.cs
// Initialize an object of SVGDocument class
Aspose.Svg.SVGDocument document = new Aspose.Svg.SVGDocument();
// Set SVG Namespace Url
string SvgNamespace = "http://www.w3.org/2000/svg";
// Get root svg element of the document
Aspose.Svg.SVGSVGElement svgElement = document.RootElement;
// Create a defs element and add to the svgElement
@aspose-com-gists
aspose-com-gists / Generate-Aztec-Barcode-Error-Correction.cs
Last active Sep 22, 2022
Generate Aztec Barcode 2D Programmatically in C#
View Generate-Aztec-Barcode-Error-Correction.cs
// Initialize BarcodeGenerator class object
BarcodeGenerator gen = new BarcodeGenerator(EncodeTypes.Aztec, "Åspóse.Barcóde© is used to generate & recognize barcodes");
// Set size value in pixels
gen.Parameters.Barcode.XDimension.Pixels = 4;
// Set symbol mode FullRange
gen.Parameters.Barcode.Aztec.AztecSymbolMode = AztecSymbolMode.FullRange;
// Set error correction capacity to 50%
@aspose-com-gists
aspose-com-gists / Generate-Aztec-Barcode-Error-Correction.java
Last active Sep 22, 2022
Generate Aztec Barcode 2D Programmatically in Java
View Generate-Aztec-Barcode-Error-Correction.java
// Initialize BarcodeGenerator class object
BarcodeGenerator gen = new BarcodeGenerator(EncodeTypes.AZTEC, "Åspóse.Barcóde© is used to generate & recognize barcodes");
// Set size value in pixels
gen.getParameters().getBarcode().getXDimension().setPixels(2);
// Set symbol mode full range
gen.getParameters().getBarcode().getAztec().setAztecSymbolMode(AztecSymbolMode.FULL_RANGE);
// Set error correction capacity to 50%
@aspose-com-gists
aspose-com-gists / CSVtoExcel.cs
Last active Sep 22, 2022
Convert CSV to Excel or XLSX/XLS to CSV with C# VB.NET
View CSVtoExcel.cs
// Create LoadOptions for CSV file
LoadOptions loadOptions = new LoadOptions(LoadFormat.CSV);
// Create a Workbook object and initialize with CSV file's path and the LoadOptions object
Workbook workbook = new Workbook("Sample.csv", loadOptions);
// Save CSV file as XLSX
workbook.Save("CSVtoExcel.xlsx", SaveFormat.Xlsx);
@aspose-com-gists
aspose-com-gists / readme.md
Last active Sep 21, 2022
Adjust Row Height and Column Width in Excel using Python
View readme.md
@aspose-com-gists
aspose-com-gists / Gaussian-Blur-feGaussianBlur-SVG.cs
Created Sep 20, 2022
Create Gaussian Blur Filter on SVG in C# | feGaussianBlur Effect on Scalable Vector Graphics in .NET
View Gaussian-Blur-feGaussianBlur-SVG.cs
// Initialize a SVGDocument class object
Aspose.Svg.SVGDocument document = new Aspose.Svg.SVGDocument("complex.svg");
// Set SVG Namespace Url
string SvgNamespace = "http://www.w3.org/2000/svg";
// Get root svg element of the document
Aspose.Svg.SVGSVGElement svgElement = document.RootElement;
// Create an image element and add it to the svgElement
@aspose-com-gists
aspose-com-gists / crop-images-with-rectangle.cs
Created Sep 20, 2022
Crop Images Programmatically in C#
View crop-images-with-rectangle.cs
// Load the image.
using (RasterImage rasterImage = (RasterImage)Image.Load("image.png"))
{
// Before cropping, the image should be cached for better performance.
if (!rasterImage.IsCached)
{
rasterImage.CacheData();
}
// Create an instance of Rectangle class with desired size and crop the image.
View Generate-Pdf417-Barcode-RowColumns.java
// Initialize an object of BarcodeGenerator class
BarcodeGenerator gen = new BarcodeGenerator(EncodeTypes.PDF_417, "Åspóse");
// Set the pixels
gen.getParameters().getBarcode().getXDimension().setPixels(2);
// Set number of columns and rows
gen.getParameters().getBarcode().getPdf417().setColumns(4);
gen.getParameters().getBarcode().getPdf417().setRows(9);
View crop-images-with-rectangle.java
// Load an image.
try (RasterImage rasterImage = (RasterImage) Image.load("image.jpg")) {
// Before cropping, the image should be cached for better performance.
if (!rasterImage.isCached()) {
rasterImage.cacheData();
}
// Create an instance of Rectangle class with desired size.
Rectangle rectangle = new Rectangle(20, 20, 20, 20);