This file contains hidden or 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
| // Open first document | |
| Document pdfDocument1 = new Document(dataDir + "Concat1.pdf"); | |
| // Open second document | |
| Document pdfDocument2 = new Document(dataDir + "Concat2.pdf"); | |
| // Add pages of second document to the first | |
| pdfDocument1.getPages().add(pdfDocument2.getPages()); | |
| // Save concatenated output file | |
| pdfDocument1.save(dataDir+"ConcatenatePdfFiles_out.pdf"); |
This file contains hidden or 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
| // Open document | |
| Document document = new Document("input.pdf"); | |
| com.aspose.pdf.Page page = document.getPages().get_Item(1); | |
| // Create RedactionAnnotation instance for specific page region | |
| com.aspose.pdf.RedactionAnnotation annot = new com.aspose.pdf.RedactionAnnotation(page, new com.aspose.pdf.Rectangle(200, 500, 300, 600)); | |
| annot.setFillColor(com.aspose.pdf.Color.getGreen()); | |
| annot.setBorderColor(com.aspose.pdf.Color.getYellow()); | |
| annot.setColor(com.aspose.pdf.Color.getBlue()); |
This file contains hidden or 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 the path to the working directory. | |
| String dir = "/Desktop/"; | |
| // Load the source SVG document by initializing a constructor of the SVGDocument class. | |
| com.aspose.html.dom.svg.SVGDocument svgDocument = new com.aspose.html.dom.svg.SVGDocument("input.svg"); | |
| // Instantiate an object of the XpsSaveOptions class. | |
| com.aspose.html.saving.XpsSaveOptions options = new com.aspose.html.saving.XpsSaveOptions(); | |
| // Invoke the setBackgroundColor to set the background color. |
This file contains hidden or 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
| // Prepare SVG code | |
| var code = "<svg xmlns='http://www.w3.org/2000/svg'>" + | |
| "<circle cx ='100' cy ='100' r ='55' fill='green' stroke='red' stroke-width='10' />" + | |
| "</svg>"; | |
| // Prepare a path for converted file saving | |
| string savePath = Path.Combine(dataDir, "svgtojpgimage.jpg"); | |
| // Create an instance of the ImageSaveOptions class | |
| var options = new Aspose.Html.Saving.ImageSaveOptions(Aspose.Html.Rendering.Image.ImageFormat.Jpeg); |
This file contains hidden or 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 an instance of the ZArchive class. | |
| Aspose.Zip.Z.ZArchive archive = new Aspose.Zip.Z.ZArchive(); | |
| // Invoke the setSource method to set the content to be compressed within the archive. | |
| archive.SetSource("first.txt"); | |
| // Call the save method to save Z archive to destination file provided. | |
| archive.Save("archive.z"); |
This file contains hidden or 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 STL image | |
| using (var cadImage = (Aspose.CAD.FileFormats.Cad.CadImage)Aspose.CAD.Image.Load("input.stl")) | |
| { | |
| // Initialize PdfOptions class instance | |
| Aspose.CAD.ImageOptions.PdfOptions pdfOptions = new Aspose.CAD.ImageOptions.PdfOptions(); | |
| string outPath = "test.pdf"; | |
| // Convert STL to PDF | |
| cadImage.Save(outPath, pdfOptions); |
This file contains hidden or 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
| Aspose.Words.Document doc = new Aspose.Words.Document(); | |
| Aspose.Words.DocumentBuilder builder = new Aspose.Words.DocumentBuilder(doc); | |
| Aspose.Words.Drawing.Shape shape = builder.InsertChart(Aspose.Words.Drawing.Charts.ChartType.Pie, 432, 252); | |
| Aspose.Words.Drawing.Charts.Chart chart = shape.Chart; | |
| chart.Series.Clear(); | |
| Aspose.Words.Drawing.Charts.ChartSeries series = chart.Series.Add("Series 1", | |
| new string[] { "Category1", "Category2", "Category3" }, | |
| new double[] { 2.7, 3.2, 0.8 }); |
This file contains hidden or 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 MPP file | |
| com.aspose.tasks.Project project = new com.aspose.tasks.Project("New Project.mpp"); | |
| // Initiate XlsxOptions class object | |
| com.aspose.tasks.XlsxOptions options = new com.aspose.tasks.XlsxOptions(); | |
| options.setPageSize(com.aspose.tasks.PageSize.A4); | |
| // Convert MS Project MPP to Excel XLSX | |
| project.save("MS Project.xlsx", options); |
This file contains hidden or 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 MPP file | |
| com.aspose.tasks.Project project = new com.aspose.tasks.Project("New Project.mpp"); | |
| // Create CsvOptions class object | |
| com.aspose.tasks.CsvOptions options = new com.aspose.tasks.CsvOptions(); | |
| options.setTextDelimiter(com.aspose.tasks.CsvTextDelimiter.Semicolon); | |
| // Save the output CSV file | |
| project.save("CsvOptions_out.csv", options); |
This file contains hidden or 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 an object of CompareOptions class | |
| GroupDocs.Comparison.Options.CompareOptions compareOptions = new GroupDocs.Comparison.Options.CompareOptions(); | |
| compareOptions.DirectoryCompare = true; | |
| // Initiate an instance of the Comparer class and specify the folders | |
| GroupDocs.Comparison.Comparer comparer = new GroupDocs.Comparison.Comparer("C:\\folder1\\", compareOptions); | |
| comparer.Add("C:\\folder2\\", compareOptions); | |
| // Compare folders | |
| comparer.Compare("C:\\res.html", compareOptions); |