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
final com.groupdocs.redaction.Redactor redactor = new com.groupdocs.redaction.Redactor(dataDir + "compare-annotations-pdf-java.jpg"); | |
try | |
{ | |
//Define the position on image | |
java.awt.Point samplePoint = new java.awt.Point(385, 485); | |
//Define the size of the area which need to be redacted | |
java.awt.Dimension sampleSize = new java.awt.Dimension(1793, 2069); | |
//Perform redaction | |
com.groupdocs.redaction.RedactorChangeLog result = redactor.apply(new com.groupdocs.redaction.redactions.ImageAreaRedaction(samplePoint, | |
new com.groupdocs.redaction.redactions.RegionReplacementOptions(java.awt.Color.BLUE, sampleSize))); |
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 Workbook object for storing JSON data | |
Aspose.Cells.Workbook JsonToPdf = new Aspose.Cells.Workbook(); | |
// Access default worksheet | |
Aspose.Cells.Worksheet wsDefault = JsonToPdf.Worksheets[0]; | |
// Read JSON data from file for saving to the selected worksheet | |
string jsonInputData = File.ReadAllText("input.json"); | |
// Instantiate JsonLayoutOptions for handling JSON data |
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); |
NewerOlder