Skip to content

Instantly share code, notes, and snippets.

View fahadadeel's full-sized avatar

Fahad Adeel fahadadeel

View GitHub Profile
@fahadadeel
fahadadeel / AddExtension.cs
Last active January 26, 2017 07:02 — forked from aspose-pdf/Examples-CSharp-AsposePDF-Annotations-AddAnnotation-AddAnnotation.cs
This Gist contains examples of Aspose.Pdf for .Net
// For complete examples and data files, please go to https://github.com/aspose-pdf/Aspose.Pdf-for-.NET
using System.Collections;
using System.Reflection;
using Microsoft.ReportingServices.ReportRendering;
// Use one of the two namespaces below depending on whether you are developing
// a WinForms or WebForms application.
using Microsoft.Reporting.WinForms;
// -- or --
// using Microsoft.Reporting.WebForms;
// For complete examples and data files, please go to https://github.com/aspose-pdf/Aspose.Pdf-for-Java
// Open source PDF document
Document pdfDocument = new Document("input.pdf");
// Delete all annotation
pdfDocument.getPages().get_Item(1).getAnnotations().delete();
// Save the update document
pdfDocument.save("output.pdf");
// For complete examples and data files, please go to https://github.com/aspose-barcode/Aspose.BarCode-for-Java
// The path to the resource directory.
String dataDir = Utils.getDataDir(ApplyALicense.class) + "License/";
String licFilePath = dataDir + "Aspose.BarCode.lic";
// Apply a license to avoid the evaluation watermark in the barcode image.
License licBarcode = new License();
licBarcode.setLicense(licFilePath);
// For complete examples and data files, please go to https://github.com/aspose-diagram/Aspose.Diagram-for-Java
// The path to the documents directory.
String dataDir = Utils.getDataDir(AddPageLevelCommentInVisio.class);
// Call the diagram constructor to load diagram
Diagram diagram = new Diagram(dataDir + "Drawing1.vsdx");
// Add comment
diagram.getPages().getPage(0).addComment(7.205905511811023, 3.880708661417323, "test@");
// Save diagram
@fahadadeel
fahadadeel / Articles-DeleteRedundantSpacesFromHtml.java
Last active December 27, 2016 10:10 — forked from aspose-cells/01_Aspose.Cells for Java
This Gist contains code snippets of examples of Aspose.Cells for Java.
//The path to the documents directory
String dataDir = Utils.getDataDir(DeleteRedundantSpacesFromHtml.class);
//Sample Html containing redundant spaces after <br> tag
String html = "<html>"
+ "<body>"
+ "<table>"
+ "<tr>"
+ "<td>"
+ "<br> This is sample data"
@fahadadeel
fahadadeel / Examples-CSharp-ApplyLicense-ApplyLicenseByPath-ApplyLicenseByPath.cs
Last active August 22, 2016 04:51
This Gist contains code snippets for sample code of Aspose.Diagram
// For complete examples and data files, please go to https://github.com/aspose-diagram/Aspose.Diagram-for-.NET
// set path of the license file, i.e. c:\temp\
string dataDir = @"c:\temp\";
License license = new License();
license.SetLicense(dataDir + "Aspose.Diagram.lic");
@fahadadeel
fahadadeel / Examples-CSharp-AdvanceProtectSettings-1.cs
Last active August 19, 2016 08:53
This Gist contains code snippets for sample code of Aspose.Cells
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-.NET
// The path to the documents directory.
string dataDir = RunExamples.GetDataDir(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
// Instantiating a Workbook object
// Opening the Excel file through the file stream
Workbook excel = new Workbook(dataDir + "book1.xls");
// Accessing the first worksheet in the Excel file
Worksheet worksheet = excel.Worksheets[0];
// For complete examples and data files, please go to https://github.com/aspose-imaging/Aspose.Imaging-for-.NET
//Create and initialize an instance of Graphics
Aspose.Imaging.Graphics graphics = new Aspose.Imaging.Graphics(image);
@fahadadeel
fahadadeel / .gitignore
Last active December 2, 2016 07:06 — forked from aspose-note/Aspose.Note-for-Java.java
This Gist contains code snippets for sample code of Aspose.Note
Temp/
obj/
classes/
generated/
*.suo
bin/
*_out_*
* Out*
* out*
// For complete examples and data files, please go to https://github.com/aspose-ocr/Aspose.OCR-for-Java
OmrTemplate template = new OmrTemplate();