We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
2.7.2
I am using NPOI 2.7.2 in ASP.NET Core 3.1 to insert a JPG image into a specific row using the following code.
foreach (var paragraph in doc.Paragraphs) { foreach (var run in paragraph.Runs) { if (run.Text.Contains(placeholder)) { run.SetText(run.Text.Replace(placeholder, "")); using (FileStream ms = new FileStream(imagePath, FileMode.Open, FileAccess.Read)) { var pic = run.AddPicture(ms, (int)PictureType.JPEG, "jpg", imageWidth * 9525, imageHeight * 9525); } paragraph.VerticalAlignment = TextAlignment.TOP; paragraph.Alignment = ParagraphAlignment.CENTER; break; // 跳出当前循环,防止重复处理同一段落 } } }
The saved Word document is shown in the image below.
The image is blank and does not display. It needs to be selected, and its text wrapping setting must be configured before it will appear.
The text was updated successfully, but these errors were encountered:
If you have time, could you please take a look? Thank you!
Sorry, something went wrong.
No branches or pull requests
NPOI Version
2.7.2
File Type
Issue Description
I am using NPOI 2.7.2 in ASP.NET Core 3.1 to insert a JPG image into a specific row using the following code.
The saved Word document is shown in the image below.
The image is blank and does not display. It needs to be selected, and its text wrapping setting must be configured before it will appear.
The text was updated successfully, but these errors were encountered: