Skip to content

Releases: openize-com/openize-open-xml-sdk-net

v25.6.1 - Add word features

18 Jun 14:43
23cc80c
Compare
Choose a tag to compare

What's Changed

Full Changelog: v25.6.0...v25.6.1

v25.6.0

10 Jun 12:36
b39da97
Compare
Choose a tag to compare

What's Changed

Full Changelog: v25.5.2...v25.6.0

v25.5.2

29 May 11:55
ad1df93
Compare
Choose a tag to compare

What's Changed

  • Refactored animation methods into separate classes for better code organization.
  • Introduced IAnimation interface for consistent animation generation logic.
  • Improved maintainability and scalability of animation system.
  • Prepared foundation for future animation customization and testing.
  • Added new Bounce animation for dynamic visual effects.

Full Changelog: v25.5.1...v25.5.2

Add bounce animation to a rectangle shape

// Open an existing presentation from the specified file path
Openize.Slides.Presentation presentation = Openize.Slides.Presentation.Open("file.pptx");

// Create a new slide to add shapes and animations
Openize.Slides.Slide slide = new Openize.Slides.Slide();

// Create a new rectangle shape
Openize.Slides.Rectangle rectangle = new Openize.Slides.Rectangle();

// Set the animation type to Bounce
rectangle.Animation = Openize.Slides.Common.Enumerations.AnimationType.Bounce;

// Set rectangle dimensions and position
rectangle.Width = 300.0;
rectangle.Height = 300.0;
rectangle.X = 300.0;
rectangle.Y = 300.0;

// Draw the rectangle on the slide
slide.DrawRectangle(rectangle);

// Add the slide with the animated rectangle to the presentation
presentation.AppendSlide(slide);

// Save the updated presentation to disk (overwrites the existing file or saves to default location)
presentation.Save();

v25.5.1

19 May 14:11
9241a8e
Compare
Choose a tag to compare

What's Changed

  • Support for creating word shapes with fill options and separate word elements to element wise classes by @sabir-aspose in #23

Full Changelog: v25.5.0...v25.5.1

Creating a shape with fill options

var doc = new Openize.Words.Document();
var body = new Openize.Words.Body(doc);
var shapeColors = new Openize.Words.IElements.ShapeFillColors();
shapeColors.Color1 = Openize.Words.IElements.Colors.Red;
shapeColors.Color2 = Openize.Words.IElements.Colors.Purple;
var shape = new Openize.Words.IElements.Shape(100, 100, 400, 400,
                Openize.Words.IElements.ShapeType.Hexagone,
                Openize.Words.IElements.ShapeFillType.Pattern,
                shapeColors);
body.AppendChild(shape);
doc.Save("HexagoneShape.docx");

Creating a group shape having two connecting shapes with fill options

var doc = new Openize.Words.Document();
var body = new Openize.Words.Body(doc);
var diamond = new Openize.Words.IElements.Shape(0, 0, 200, 200,
                          Openize.Words.IElements.ShapeType.Diamond,
                          Openize.Words.IElements.ShapeFillType.Gradient,
                          new Openize.Words.IElements.ShapeFillColors());
var oval = new Openize.Words.IElements.Shape(300, 0, 200, 200,
                          Openize.Words.IElements.ShapeType.Ellipse,
                          Openize.Words.IElements.ShapeFillType.Pattern,
                          new Openize.Words.IElements.ShapeFillColors());
var groupShape = new Openize.Words.IElements.GroupShape(diamond, oval);
body.AppendChild(groupShape);
doc.Save("GroupShape.docx");

v25.5.0

09 May 08:04
2b55e2a
Compare
Choose a tag to compare

What's Changed

  • Add WorksheetPropertiesExtensions for Excel worksheet display settings by @fahadadeel in #19

Full Changelog: v25.4.2...v25.5.0

v25.4.2

30 Apr 12:05
aea3a90
Compare
Choose a tag to compare

Enhancements

  • Two new animation effects were added: Spin and Zoom In.
  • Fixed issues with assigning objects to the Float In animation to ensure consistent and expected behavior.

v25.4.1

21 Apr 06:57
1ddab4d
Compare
Choose a tag to compare

What's Changed

Full Changelog: v25.4.0...v25.4.1

Usage Code Example

            var document = new Openize.Words.Document("word.docx");
            var oldProps = document.GetDocumentProperties();
            var props = new Openize.Words.DocumentProperties();

            // Helper to print and update
            void UpdateProperty<T>(string name, T oldValue, T newValue, Action<T> setValue)
            {
                Console.WriteLine($"Old {name} : {oldValue}");
                setValue(newValue);
                Console.WriteLine($"New {name} : {newValue}");
            }

            // Update metadata
            UpdateProperty("Title", oldProps.Title, "Updated Title", val => props.Title = val);
            UpdateProperty("Subject", oldProps.Subject, "Updated Subject", val => props.Subject = val);
            UpdateProperty("Description", oldProps.Description, "Updated Description", val => props.Description = val);
            UpdateProperty("Creator", oldProps.Creator, "Updated Creator", val => props.Creator = val);
            UpdateProperty("Keywords", oldProps.Keywords, "Updated.Keyword", val => props.Keywords = val);
            UpdateProperty("LastModifiedBy", oldProps.LastModifiedBy, "Updated.Openize.OpenXML-SDK", val => props.LastModifiedBy = val);
            UpdateProperty("Revision", oldProps.Revision, "Version.Revised", val => props.Revision = val);
            UpdateProperty("Created", oldProps.Created, oldProps.Created, val => props.Created = val);

            var currentTime = DateTime.UtcNow.ToString("yyyy-MM-ddTHH:mm:ss.fffffffZ");
            UpdateProperty("Modified", oldProps.Modified, currentTime, val => props.Modified = val);

            document.SetDocumentProperties(props);
            document.Save("word2.docx"); 

v25.4.0

10 Apr 11:45
8c897eb
Compare
Choose a tag to compare

What's Changed

Full Changelog: v25.3.2...v25.4.0

v25.3.2

27 Mar 05:16
46c5dcd
Compare
Choose a tag to compare

What's Changed

Full Changelog: v25.3.0...v25.3.2

v25.3.1

23 Mar 02:20
eb19084
Compare
Choose a tag to compare

What's Changed

Full Changelog: v25.3.0...v25.3.1

Writing Metadata for new word documents

            var document = new Openize.Words.Document();

            var docMetadata = new Openize.Words.DocumentProperties();

            docMetadata.Title = "My Title";
            docMetadata.Subject = "My Subject";
            docMetadata.Description = "My Description";
            docMetadata.Keywords = "Openize.OpenXML-SDK";
            docMetadata.Creator = "Openize.OpenXML-SDK for .NET";
            docMetadata.LastModifiedBy = "Openize.OpenXML-SDK for .NET";
            docMetadata.Revision = "1";
            var currentTime = System.DateTime.UtcNow;
            docMetadata.Created = currentTime.ToString("yyyy-MM-ddTHH:mm:ss.fffffffZ");
            docMetadata.Modified = currentTime.ToString("yyyy-MM-ddTHH:mm:ss.fffffffZ");
            document.SetDocumentProperties(docMetadata);

            document.Save("word.docx");

Read metadata of an existing word document

            var document = new Openize.Words.Document("word.docx");

            var coreprops = document.GetDocumentProperties();

            Console.WriteLine("Creator: " + coreprops.Creator);
            Console.WriteLine("Keywords: " + coreprops.Keywords);
            Console.WriteLine("Title: " + coreprops.Title);
            Console.WriteLine("Subject: " + coreprops.Subject);
            Console.WriteLine("Description: " + coreprops.Description);
            Console.WriteLine("LastModifiedBy: " + coreprops.LastModifiedBy);
            Console.WriteLine("Revision: " + coreprops.Revision);
            Console.WriteLine("Created: " + coreprops.Created);
            Console.WriteLine("Modified: " + coreprops.Modified);