Hi,
Please forget about my previous mail. I have solved my issue after finding it was working on another user account.
I had a bundle modification on callback.document.Export instead of callback.document.will-save to trim the trailing white space.
Thanks
Yann