Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to rotate image manually in DOCX #1353

Open
1 of 5 tasks
constantinje opened this issue May 22, 2024 · 0 comments
Open
1 of 5 tasks

Unable to rotate image manually in DOCX #1353

constantinje opened this issue May 22, 2024 · 0 comments

Comments

@constantinje
Copy link

NPOI Version

File Type

  • XLSX
  • XLS
  • 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants