Skip to content

Instantly share code, notes, and snippets.

Avatar

Aspose.com Gists aspose-com-gists

View GitHub Profile
@aspose-com-gists
aspose-com-gists / pptx-to-xaml-custom.cs
Created Aug 5, 2021
Convert PowerPoint to XAML in C#
View pptx-to-xaml-custom.cs
// Load the PowerPoint presentation
using (Presentation pres = new Presentation("pres.pptx"))
{
// Set options
XamlOptions options = new XamlOptions();
options.ExportHiddenSlides = true;
// Convert presentation to XAML
pres.Save(new XamlOptions());
}
@aspose-com-gists
aspose-com-gists / Add-Tags-OneNote.java
Last active Aug 3, 2021
Create OneNote files Programmatically using Java
View Add-Tags-OneNote.java
// Create an object of the Document class
Document doc = new Document();
// Initialize Page class object
Page page = new Page(doc);
// Initialize Outline class object
Outline outline = new Outline(doc);
// Initialize OutlineElement class object
@aspose-com-gists
aspose-com-gists / 01_Create_OMR_Question_and_Answer_Sheet_Checker_or_Scanner_Software_using_Java
Last active Aug 5, 2021
Create OMR Question and Answer Sheet Checker or Scanner Software using Java
View 01_Create_OMR_Question_and_Answer_Sheet_Checker_or_Scanner_Software_using_Java
Create OMR Question and Answer Sheet Checker or Scanner Software using Java
@aspose-com-gists
aspose-com-gists / add-vba-macro-in-powerpoint.java
Last active Aug 4, 2021
Add, Extract or Remove VBA Macros in PowerPoint using Java
View add-vba-macro-in-powerpoint.java
// Instantiate Presentation
Presentation pres = new Presentation();
try {
// Create new VBA Project
pres.setVbaProject(new VbaProject());
// Add empty module to the VBA project
IVbaModule module = pres.getVbaProject().getModules().addEmptyModule("Module");
// Set module source code
@aspose-com-gists
aspose-com-gists / pptx-to-docx.cs
Last active Aug 3, 2021
Convert PowerPoint to Word using C#
View pptx-to-docx.cs
// Load the PowerPoint presentation
using(Aspose.Slides.Presentation presentation = new Aspose.Slides.Presentation("pres.pptx"))
{
using (var stream = new MemoryStream())
{
// Save presentation to memory stream
presentation.Save(stream, SaveFormat.Html);
stream.Flush();
stream.Seek(0, SeekOrigin.Begin);
@aspose-com-gists
aspose-com-gists / Convert-DXF-to-FBX.cs
Created Jul 30, 2021
Convert DXF to FBX or glTF GLB file Programmatically in C# .NET
View Convert-DXF-to-FBX.cs
// Load input DXF file with Scene class.
Aspose.ThreeD.Scene scene = new Aspose.ThreeD.Scene("Test.dxf");
// Initialize FBXSaveOptions class object.
Aspose.ThreeD.Formats.FBXSaveOptions options = new Aspose.ThreeD.Formats.FBXSaveOptions(Aspose.ThreeD.FileFormat.FBX7200ASCII);
// Convert DXF to FBX file.
scene.Save("Test.fbx", options);
@aspose-com-gists
aspose-com-gists / add-image-watermark-to-PowerPoint.java
Last active Jul 30, 2021
Add Watermark to PowerPoint Presentations in Java
View add-image-watermark-to-PowerPoint.java
// Open presentation
Presentation pres = new Presentation("presentation.pptx");
try {
// Access slide master
IMasterSlide master = pres.getMasters().get_Item(0);
Point2D.Float center = new Point2D.Float((float) pres.getSlideSize().getSize().getWidth() / 2,
(float) pres.getSlideSize().getSize().getHeight() / 2);
View 01_Working_with_Images_in_PDF_Files_using_CPP
Read the complete article about working with images in PDF files using C++ by visiting the following link.
https://blog.aspose.com/2021/08/02/working-with-images-in-pdf-files-using-cpp/
@aspose-com-gists
aspose-com-gists / add-column-chart.java
Last active Jul 30, 2021
Create Charts in PowerPoint using Java
View add-column-chart.java
// Create a new presentation
Presentation pres = new Presentation();
try {
// Add a new column chart and clear the default categories and series
IChart ch = pres.getSlides().get_Item(0).getShapes().addChart(ChartType.ClusteredColumn, 100, 100, 600, 450);
ch.getChartData().getSeries().clear();
ch.getChartData().getCategories().clear();
// Access the chart data
@aspose-com-gists
aspose-com-gists / extract-text-from-presentation.java
Last active Jul 29, 2021
Extract Text from PowerPoint Presentations in Java
View extract-text-from-presentation.java
//Instatiate PresentationEx class that represents a PPTX file
Presentation pptxPresentation = new Presentation("presentation.pptx");
//Get an Array of ITextFrame objects from the first slide
ITextFrame[] textFrames = SlideUtil.getAllTextFrames(pptxPresentation, true);
//Loop through the Array of TextFrames
for (int i = 0; i < textFrames.length; i++)
{
//Loop through paragraphs in current TextFrame