npoi icon indicating copy to clipboard operation
npoi copied to clipboard

Unable to rotate image manually in DOCX

Open constantinje opened this issue 9 months ago • 0 comments

NPOI Version

File Type

  • [ ] XLSX
  • [ ] XLS
  • [X] DOCX
  • [ ] XLSM
  • [ ] OTHER

Upload the Excel File

20230913_Le_Rados.docx

Reproduce Steps

Here 's the code

XWPFParagraph para = resultPhoto.Table.GetRow(resultPhoto.Row).GetCell(resultPhoto.Col).GetParagraphArray(0);
para.Alignment = ParagraphAlignment.LEFT;
para.SpacingAfter = 0;
para.SpacingAfterLines = 0;
para.SpacingBefore = 0;
para.SpacingBeforeLines = 0;
para.SpacingBetween = 1;
XWPFRun r = para.CreateRun();
using (MemoryStream ms = new MemoryStream())
{
     //pic.Resize(resized.Width, resized.Height);
     pic.Write(ms);
     ms.Position = 0;
     r.AddPicture(ms, (int)PictureType.PNG, picName, widthEmus, heightEmus);
}

Issue Description

In the resulting file when we try to rotate the picture only the frame is moving

constantinje avatar May 22 '24 08:05 constantinje