M
M
madc0de2018-03-21 23:56:27
PHP
madc0de, 2018-03-21 23:56:27

How to fill the right places in docx with text using PHP?

There are places in the Docx document that need to be filled with arbitrary data.
For example ,
full name _______________________________________________________
underlining to the edge of the document
and how can I make it so that my text is inserted in the center just above the line?
Who faced the formation of a template? Please help me in solving the problem PHPWord
used
but there is some terrible array if I open my document
Unable to work

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
Konstantin Tolmachev, 2018-03-22
@madc0de

Look, firstly, you don’t write text above the underline, you need to create a table row for this matter. Well, then, purely technical points.
Docx is essentially a zip archive with a specific extension, inside there are folders and files. You will need to unpack the conditional archive, and go through a certain file with the same str_replace, and then pack the archive back. Well it if the most short variant to use.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question