-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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 add image to a word document header or footer using XWPF #167
Comments
As I remember, this issue has been fixed in 2.4.1. Can you check the latest release on nuget and come back to this issue again? |
Hi, Problem: Adding picture data to docx-structure i.e. word/media/xxx.jpg While trying to add an image to a new XWPF-Document: I can add the specific bytes to the XWPFDocument-Object as PictureData and/or PackagePictureData without a problem but the write method isn't creating a word/media content. XWPFDocument outDoc = new XWPFDocument(); Without having a media-dir and image-file in the docx archive , there is a placeholder in the word doc instead of the actual picture (as to be expected). I also tried to read a template docx in that contains the image and write it out into another file (respect. copy it) and in that case the picture is in the docx but the file is having 100s of pages instead of 1 making it useless. That looks like iam just missing something while adding the picture as written above but maybe this is a bug. It would be really nice if you could check this out and come up with a fix or advise. Thanks in advance. |
Hi,
I also saw your Test "TestAddPicture":
But in result file, we don't get any images... |
Hi, |
Hi @tonyqus, did you manage to solve this bug? |
duplicate with #373 |
Hello, the problem tha I'm facing is: when I add a image first into the header, and after into the body, the image from the body is not available. And if I add the image first into the body, and after into the header, the image from the body is not available... How can I fix this problem? Thanks |
@jorgelodev can you open a new issue for your case? This one is closed and released with NPOI 2.5.2. |
Hi,
I'm trying to add a picture into the footer of a word document, using the method AddPicture of Run object.
The word document is generated, but open the document the image is not available.
Using the same method with a Paragraph and a Run contained into the body of the document it work well.
How can I fix this problem?
Thanks
The text was updated successfully, but these errors were encountered: