So far 4D Write Pro documents, pictures can be either in line (just like a big character), behind or in front of the text. Text boxes (appeared in 4D v20) can also be placed in front or behind the text. A huge improvement comes with 4D 20 R5 where pictures and text boxes can now be surrounded by wrapping text!
Pictures and text boxes, position and sizes
Pictures and text boxes can be already placed anywhere in a document. Thanks to new anchor modes, text wrapping is now possible so the main document text stays visible wherever the picture or text box are located!
NEW ANCHORING MODES
Text can now automatically wrap around pictures in different ways which allows you to create documents and templates without limits! You can decide if the text must stay above and below pictures (letting sides free) or allow text to also wrap on the left, the right, or both sides of the pictures… or text boxes. And this will work fine whatever the number of pictures in your documents. Pictures and text boxes can even overlap themselves and let all the text visible.
Interface and programming
Interface
The 4D Write Pro interface has been improved to let you chose the way you want pictures and text boxes to be display. Just select the picture then choose the desired display mode !
Standard actions
New values for image/anchorLayout and textBox/anchorLayout standard action are available
- wrapTopBottom
- wrapSquare
- wrapSquareLeft
- wrapSquareRight
- wrapSquareLargest
Examples:
image/anchorLayout?value=wrapSquareLeft
textBox/anchorLayout?value=wrapSquareLargest
Programming
New attributes are available for pictures and text boxes and can be set using the well-known command WP SET ATTRIBUTES. The new attributes are wk text wrap top bottom, wk text wrap square, wk text wrap square left, wk text wrap square right, and wk text wrap square largest.
WP SET ATTRIBUTES($picture; wk anchor layout; wk text wrap square largest)
WP SET ATTRIBUTES($textBox; wk anchor layout; wk text wrap top bottom)
Import & export
Of course, import and export have not been forgotten!
This great feature is taken into account when exporting to SVG, PDF, HTML (based on embedded mode) as well as import and export to Word!
Note: Even if HTML does not support text wrapping, pictures and text boxes export has been improved. They will be placed at the closest left or right position in the document. See HDI for a sample!
Conclusion
With each new version, 4D Write Pro is enriched by new graphic possibilities. This will certainly enable you to create increasingly rich and modern documents.
As usual, consult the documentation for any further information you may need.
We look forward to hearing from you on the 4D forum!