BoldSign®Effortlessly integrate e-signatures into your app with the BoldSign® API. Create a sandbox account!
Hi everyone,
I am reading an Excel worksheet in a .xlsx file which contains a group (1 picture + 1 red rectangle textbox above the picture to highlight a part of picture).
The problem is that I cannot extract this whole group as an image in order to save to local computer.
Noted that, if I used the following block of code, then I can ungroup the original group, and then can be able to extract and save the picture, but the saved picture will loose the red text box drawn on top of the picture:
if (worksheetShapes[i] is IGroupShape groupShape)
{
foreach (IShape shape in groupShape.Items)
{
if (shape
is BitmapShapeImpl bitmapShape)
{
Image image = bitmapShape.Picture;
byte[] byteArray = image.ToByeArray();
................
}
}
}
Any suggestions?
Many thanks,
Hi,
Please refer to the attached sample below for the conversion of worksheet with group shape to Image.
Additionally, refer to this UG for the conversion of worksheet to Image.
https://help.syncfusion.com/file-formats/xlsio/worksheet-to-image-conversion
Regards
Kurmitha M.
HiSuggest a reply,
It does not seem to be related to my problem.
I have uploaded my Sample.xlsx file here for you to clearly understand about the issue:
I want to extract the whole picture with red rectangle shape on top of it without the text Text B2 and without white redundant white space on 4 edges of the shape:
Could you please give me some ideas to retrieve this?
Many thanks,
Attachment: Sample_aaa4df70.zip
Hi,
The conversion of group shapes to images is not directly supported; we get the group shape position, and we use the worksheet for image conversion to achieve the group shape to image conversion based on that position.
Please refer to the attached sample below for the conversion of worksheet with group shape to Image.
Regards,
Mugil M.