This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Load the input Word document | |
Aspose.Words.Document doc = new Aspose.Words.Document("Words.docx"); | |
// Initialize an object of ImageSaveOptions class | |
Aspose.Words.Saving.ImageSaveOptions options = new Aspose.Words.Saving.ImageSaveOptions(Aspose.Words.SaveFormat.Jpeg); | |
// Set the "PageSet" to "0" to convert only the first page of a document. | |
options.PageSet = new Aspose.Words.Saving.PageSet(0); | |
// Set the image's brightness and contrast. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Create a new diagram | |
Diagram diagram = new Diagram(); | |
// Get page object by index | |
Page page0 = diagram.Pages[0]; | |
// Set pinX, pinY, width and height | |
double pinX = 1, pinY = 1, width = 4, hieght = 5; | |
// Import Bitmap image as Visio shape |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Specify conversion settings. | |
Aspose.Gis.ConversionOptions options = null; | |
// This options assigns Wgs84 to the destination layer. | |
if (Aspose.Gis.Drivers.Shapefile.SupportsSpatialReferenceSystem(Aspose.Gis.SpatialReferencing.SpatialReferenceSystem.Wgs84)) | |
{ | |
options = new Aspose.Gis.ConversionOptions() | |
{ | |
DestinationSpatialReferenceSystem = Aspose.Gis.SpatialReferencing.SpatialReferenceSystem.Wgs84, | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Create a map | |
using (var map = new Aspose.Gis.Rendering.Map(800, 400)) | |
{ | |
// Use the specified SRS | |
map.SpatialReferenceSystem = Aspose.Gis.SpatialReferencing.SpatialReferenceSystem.Wgs84; | |
// Use the specified style to draw lines | |
// We also have styles for points, lines, and surfaces. | |
var symbolizer = new Aspose.Gis.Rendering.Symbolizers.SimpleLine() { Width = Aspose.Gis.Rendering.Measurement.Pixels(2) }; | |
// Open a layer and add to the map |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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% |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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% |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Load input HTML file from URL | |
HTMLDocument document = new HTMLDocument("https://www.aspose.com/"); | |
// Initialize PdfSaveOptions class object and set the encryption properties | |
PdfSaveOptions options = new PdfSaveOptions(); | |
options.setEncryption(new PdfEncryptionInfo("user", "owner", PdfPermissions.PrintDocument, PdfEncryptionAlgorithm.RC4_128)); | |
// Save output PDF file with encryption | |
Converter.convertHTML(document, options, "URLtoPDF_encrypted.pdf"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Load input HTML from URL | |
HTMLDocument document = new HTMLDocument("https://www.aspose.com"); | |
// Initialize PdfPermissions class object to allow printing and form filling in the PDF document | |
PdfPermissions permissions = PdfPermissions.PrintDocument | PdfPermissions.FillForm; | |
// Initialize PdfSaveOptions class object and set the encryption properties | |
PdfSaveOptions options = new PdfSaveOptions(); | |
options.Encryption = new PdfEncryptionInfo("user", "owner", permissions, Encryption.PdfEncryptionAlgorithm.RC4_128); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Load input PDF document | |
Document pdfDocument = new Document(dataDir + "Input.pdf"); | |
// Access any page of the input PDF | |
Page testpage = pdfDocument.Pages[1]; | |
// Create image stamp | |
ImageStamp imageStamp = new ImageStamp(dataDir + "aspose-logo.png"); | |
imageStamp.Background = true; | |
imageStamp.Height = 300; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Set license for all APIs one by one | |
Aspose.Words.License WordsLicense = new Aspose.Words.License(); | |
WordsLicense.SetLicense(@"D:\Test\Aspose.Total.Product.Family.lic"); | |
// Comment the code if you do not want to set license for any of the API | |
//Aspose.Pdf.License PdfLicense = new Aspose.Pdf.License(); | |
//PdfLicense.SetLicense(@"D:\Test\Aspose.Total.Product.Family.lic"); | |
Aspose.Cells.License CellsLicense = new Aspose.Cells.License(); | |
CellsLicense.SetLicense(@"D:\Test\Aspose.Total.Product.Family.lic"); |
NewerOlder