Aspose.Slides for .NET: Ink Shape in PPTX File Returns Incorrect Width and Height


Attaching a sample presentation,

There is just one ink shape in the ppt
Kindly check the width and height values obtained from aspose api:

curSlide.Shapes[0].width = 458.81
curSlide.Shapes[0].height = 4.42

is there a way to get the height of the entire ink shape which should be around 15

platform:Windows,.NET 4

Regards, (24.8 KB)

Thank you for posting the question. I’ve reproduced the problem you described.

Please note that Aspose.Slides returns the same shape size in pt with 72 DPI as PowerPoint but the Ink shapes have the line size, therefore the size of the shape looks larger.

We have opened the following new ticket(s) in our internal issue tracking system and will consider your question according to the terms mentioned in Free Support Policies.

Issue ID(s): SLIDESNET-44169

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.

The issues you found earlier (filed as SLIDESNET-44169) have been fixed in Aspose.Slides for .NET 23.10 (ZIP, MSI).
You can check all fixes on the Release Notes page.
You can also find the latest version of our library on the Product Download page.

When calculating the shape size, PowerPoint does not take into account the brush size of the Ink drawing, i.e. the boundary dimensions of the shape pass through the center of the brush. With Aspose.Slides for .NET 23.10, to take into account the visible part of the whole Ink object, it is necessary to increase the shape size by the brush size:

using var presentation = new Presentation("sample.pptx");

var inkShape = presentation.Slides[0].Shapes[0] as IInk;
if (inkShape != null)
    float visualWidth = inkShape.Width + inkShape.Traces[0].Brush.Size.Width;
    float visualHeight = inkShape.Height + inkShape.Traces[0].Brush.Size.Height;

    Console.WriteLine("Visual Width = {0}", visualWidth);
    Console.WriteLine("Visual Height = {0}", visualHeight);

Hi Andrey,
Glad to know.
Could you highlight the new API that have been edited or modified in 23.10.
Also could you describe the following

  1. what is inkshape width height ?
  2. what is inkshape traces ?
  3. what is brush size width height and why should it be added to inkshape width and height ?
  4. some shapes have a property called effective width, what does that mean ?



We have updated the ticket information to gather the requested details and will be sharing with you as soon as we have feedback against it. Please spare us little time.


We are preparing a detailed explanation in the form of a documentation article that will answer all questions. We will provide a link to the document once it is completed and published. Thank you for your patience.

Please see the following article:

Please let us know if you still have any questions.