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 / pdf417-barcode.java
Last active June 30, 2025 17:15
Generate A Pdf417 Barcode in Java
package com.example;
import com.aspose.barcode.generation.BarCodeImageFormat;
import com.aspose.barcode.generation.BarcodeGenerator;
import com.aspose.barcode.generation.EncodeTypes;
import com.aspose.barcode.generation.Pdf417ErrorLevel;
import com.aspose.barcode.generation.Pdf417Parameters;
public class main {
public static void main(String[] args) {
try {
@aspose-com-gists
aspose-com-gists / dgn-to-psd.py
Last active June 26, 2025 12:00
DGN to PSD in Python
import aspose.cad as cad
# Define the path for the working files.
inputDir = "sample.dgn"
outputDir = "result.psd"
# Invoke the load method to load the source DGN file.
image = cad.Image.load(inputDir)
# Create an object of the CadRasterizationOptions class.
cadRasterizationOptions = cad.imageoptions.CadRasterizationOptions()
#Define the image height, width and Zoom setting.
cadRasterizationOptions.page_height = 500.5
@aspose-com-gists
aspose-com-gists / dgn-to-pdf.py
Created June 25, 2025 12:12
Convert DGN File to PDF in Python
import aspose.cad as cad
inputDir = "sample.dgn"
outputDir = "result.pdf"
# The Image.load method will load the source DGN file.
image = cad.Image.load(inputDir)
# Create an object of the CadRasterizationOptions class.
cadRasterizationOptions = cad.imageoptions.CadRasterizationOptions()
# Set the image height, width and Zoom setting.
cadRasterizationOptions.page_height = 500.5
@aspose-com-gists
aspose-com-gists / dxf-to-svg.cs
Created June 23, 2025 23:02
Convert Dxf File to Svg in C#
class Program
{
static void Main()
{
// The path to the documents directory.
string MyDir = "data";
string sourceFilePath = MyDir + "conic_pyramid.dxf";
// Load the source DXF file by calling the Image.Load method.
using (Aspose.CAD.Image image = Aspose.CAD.Image.Load(sourceFilePath))
{
@aspose-com-gists
aspose-com-gists / convert-dgn-to-svg.py
Last active June 25, 2025 10:28
Export DGN As SVG
import aspose.cad as cad
inputDir = "sample.dgn"
outputDir = "ouput_1.svg"
# Invoke the Image.load method to load the source DGN file.
with cad.Image.load(inputDir) as image:
# Create an instance of the CadRasterizationOptions class.
cadRasterizationOptions = cad.imageoptions.CadRasterizationOptions()
# Set the image height.
cadRasterizationOptions.page_height = 800.5
@aspose-com-gists
aspose-com-gists / about.cjs
Last active June 19, 2025 17:06
Aspose.Page for Node.js via C++
const AsposePage = require('asposepagenodejs');
console.log("Aspose.Page for Node.js via C++ examples.");
AsposePage().then(AsposePageModule => {
//AsposePageAbout - Get info about Product
const json = AsposePageModule.AsposePageAbout();
console.log("AsposePageAbout => %O", json.errorCode == 0 ? JSON.parse(JSON.stringify(json).replace('"errorCode":0,"errorText":"",','')) : json.errorText);
});
import aspose.cad as cad
# Set path for the working files.
inputDir = "sample.dgn"
outputDir = "ouput_1.dxf"
# Load the DGN file by calling the Image.load method.
with cad.Image.load(inputDir) as image:
# Create DXF options by initializing an object of the CadRasterizationOptions class.
dxf_options = cad.imageoptions.CadRasterizationOptions()
# Instantiate an instance of the DxfOptions class.
export_options = cad.imageoptions.DxfOptions()