B4J Question [XLUtils] add image to Word question

PaulMeuris

Well-Known Member
Licensed User
In the tutorial you refer to the image tag only has 4 attributes you can use.
img - adds an image. It expects the following attributes: Dir, FileName, Width and Height. png and jpg images are supported. This is a self-closed tag.
Pass "assets" for assets files.
You can however create a Word table and place the text in a cell left, right, above or below the image.
You can find an example of this in the attachment (testenvironment79.zip).
 

Attachments

  • testenvironment79.zip
    141.5 KB · Views: 28
Upvote 0

feng

Member
Thank you very much for your reply, maybe I didn express myself clearly.
When adding an image to a Word document, the image wrapping mode is embedded by default and cannot be freely dragged. I want the image to be able to be dragged freely. Currently, I have to manually change the image wrapping method in Word to float above the text so that it can be freely dragged.
 
Upvote 0

PaulMeuris

Well-Known Member
Licensed User
Searching the internet i found this link: Wrap text around an image
If you are familiar with some inline java coding you can have a solution to your problem. It is somewhat of a "hack" though.
In this testcase example the image gets a wrapSquare (vierkant) setting:

You can then move the image in the document:

If you create a testproject you can try some things out... And if you get stuck... publish what you have on the forum and maybe some member with java skills can help you...
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…