I would like to use PHPWord to create forms that users can sign with their personal certificates using signature lines included in the generated document.
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
This is currently not supported by PHPWord.
I don't know if this would help, but this is a signature line extracted from a .docx document.xml:
```
Also this information helps: https://stackoverflow.com/questions/9812161/trying-to-insert-a-digital-signature-line-in-a-docx-file
With $templateProcessor->replaceBlock() I was able to see something in LibreOffice (had to use
Not sure what MSWord does with it. I'll play with it tomorrow at the office.
@swordf1zh
If we make a
${signatureblock}
Here will be the signature after replaceBlock()
${/signatureblock}
And then replaceBlock("signatureblock", $bigxmlsignature); it works for me. Gives a cross in MSOffice, with a line surrounded by a rectangle. However, it uses an existing image inside the document in LibreOffice, but at least it opens in both.
I have not been able to figure out how to sign it though. So those tests are for you.
remember to put each ${block} on a separate line (to ensure the required, separate, <w:p> paragraph's)
Issue can be closed?