Aspose.Word Shapes

I’ve got a word document which i’m generating dynamically through our API code.
I need a particular shape which is called: Rectangle - Single corner snipped.

I have a table and i want to insert this shape into that table. I then need to add another table into that shape and then add rows to that table.

Can someone please assist me with some code snippets?

1.pdf (171.2 KB)

@RickyTailor,

Thanks for your inquiry. Please share your sample source document as ZIP file. We will look into your requirement and will guide you accordingly.

@tilal.ahmad
Thanks for your reply.
Attached is the zip file with the document templates.

Thanks

RickyTailor.zip (90.8 KB)

@RickyTailor

Thanks for your inquiry. You can add FolderCorner shape into table as following. Hopefully it will help you to accomplish the task. However, if there is some difference in your requirement and our understanding then please share some more details here. We will look into it and will guide you accordingly.

Shape shape = new Shape(doc,ShapeType.FoldedCorner);
shape.Width = 30;
shape.Height = 10;
cell.FirstParagraph.AppendChild(image);

@tilal.ahmad
Hi Tilal,
Thanks for your reply.
The FoldedCorner does not give me the correct shape.

It gives a shape different to the one i require.

Please see files attached.

Shape.zip (82.0 KB)

@tilal.ahmad
Or is there a way to create this required shape manually in Aspose?
Thanks

@RickyTailor

Thanks for your feedback. We will appreciate it if you please create and share your expected Word document using MS Word. Please also share steps to create it. We will further look into your requirement and will guide you accordingly.

Hi Tilal,
Thanks for your information.
I have already attached the work document in the above zip file attached in my 2nd last comment.
To get the shape I require in word, all you need to do is open ms word, click on the shapes icon in the tool bar and then select the required shape under the rectangle option. The shape I require is: Rectangle - Single corner snipped. It shows you an example of this shape in the zip file I attached before this reply. Thanks

@RickyTailor

Thanks for feedback. I am afraid I am unable to find Recnagle-Single corner snippet shape in MS Word 2016. But it seems shape in your shared document is FlowChartPunchedCard instead of Rectangle. Hopefully it will help you to accomplish the task. However, if it is not required shape then please confirm your MS Word version.

Shape shape = new Shape(doc, ShapeType.FlowChartPunchedCard);
shape.Width = 300;
shape.Height = 100;
shape.Filled = false;
doc.FirstSection.Body.FirstParagraph.AppendChild(shape);

@tilal.ahmad
Thanks for your reply.
I’ve already tried the FlowChartPunchedCard but when i make this shape larger, the size angle stretches. When i tried the Rectangle Single Corner shape in Word and i made this shape larger, it did not stretch the angle and made it consistant with the overall shape.

I am using Microsoft Office 2016.

I’ve attached a document which shows you the steps to get this shape i require directly in MS Word.

RickyTailor.zip (215.5 KB)

Please advice if Aspose.Word provides this shape. If it doesn’t then can you please provide me with some code which will create this shape for me dynamically.

@RickyTailor

Thanks for your feedback. I am afraid currently Aspose.Words for .NET does not support Snip Single Corner Rectangle shape. We have already logged a feature request WORDSNET-13967 for support of Snip Single Corner Rectangle shape. We have linked your thread to the issue and we will notify you as soon as it is implemented.

We are sorry for the inconvenience.

@tilal.ahmad
Thanks for your reply.
Okay how long will it take for Aspose to implement this?
Is there another way we can use the Snip Single Corner Rectangle shape via Aspose HTML or is there a way we can draw this shape from scratch in the code by using lines?
Thanks

@RickyTailor

Thanks for your feedback. I am afraid we can not share any timeline at the moment as fix of this issue depends upon some other changes in the API. Furthermore, It is difficult to suggest any workaround. You have to wait for implementation of logged feature.

Thanks for your patience and cooperation.

The issues you have found earlier (filed as WORDSNET-13967) have been fixed in this Aspose.Words for .NET 18.8 update and this Aspose.Words for Java 18.8 update.