npoi
npoi copied to clipboard
Add more image wrapping support
When using an existing document as a template, not all types of image text wrapping get correctly added to a new generated document. This will lead to the following message from Word:
The document is still able to be opened when repaired.
To clarify, these are what I mean with image text wrapping:
I think this issue was fixed in #504.
Which NPOI version are you using? Can you provide the word document to help reproduce the issue?
This is in NPOI 2.6.0
This is an example document https://github.com/Zt-freak/npoi/blob/master/ExampleForTony.docx
The major problem happens in header1.xml
ct_wrapTight is not implemented in NPOI so far
<wp:wrapTight wrapText="bothSides">
<wp:wrapPolygon edited="0">
<wp:start x="4922" y="0"/>
<wp:lineTo x="0" y="3281"/>
<wp:lineTo x="0" y="17225"/>
<wp:lineTo x="4922" y="20506"/>
<wp:lineTo x="15585" y="20506"/>
<wp:lineTo x="20506" y="17225"/>
<wp:lineTo x="20506" y="3281"/>
<wp:lineTo x="15585" y="0"/>
<wp:lineTo x="4922" y="0"/>
</wp:wrapPolygon>
</wp:wrapTight>
This wp14:sizeRelH is a new tag from new openxml
<wp14:sizeRelH relativeFrom="margin">
<wp14:pctWidth>0</wp14:pctWidth>
</wp14:sizeRelH>