In order to obtain the placeholders existing in a DOCX, dynadocx uses the action get_variables with the parameter "-a" and a call to the template to be read:
dynadocx -a get_variables -t document.docx
Placeholders are returned as a JSON content, arranged by the content type keys: comments, document, endnotes, footers, footnotes and headers.
The following is an example of a generated JSON:
{
"comments":
[
"VAR_COMMENT_1"
],
"document":
[
"VAR_BODY_1",
"VAR_BODY_2"
],
"endnotes":
[
"VAR_ENDNOTE_1"
],
"footers":
[
"VAR_FOOTER_1",
"VAR_FOOTER_2"
],
"footnotes":
[
"VAR_FOOTNOTE_1"
],
"headers":
[
"VAR_HEADER_1",
"VAR_HEADER_2"
]
}