Hello,
Please send the DOCX template you are using to contact[at]phpdocx.com so we can check it.
Also please note that BulkProcessing (https://www.phpdocx.com/documentation/introduction/bulk-processing-documents-PHP) uses arrays in arrays to generate the documents, for example (included sample BulkProcessing/replaceText/sample_2.php):
$variables =
array(
// first DOCX
array(
'date' => date('Y/m/d'),
'name' => 'John',
'address' => 'Acme Street 1',
'url' => 'https://www.phpdocx.com',
'signature' => 'phpdocx',
'footer' => 'phpdocx\nfooter',
),
// second DOCX
array(
'date' => date('Y/m/d'),
'name' => 'Mary',
'address' => 'Acme Street 2',
'url' => 'https://www.phpdocx.com',
'signature' => 'phpdocx',
'footer' => 'phpdocx\nfooter',
),
// third DOCX
array(
'date' => date('Y/m/d'),
'name' => 'Tom',
'address' => 'Acme Street 3',
'url' => 'https://www.phpdocx.com',
'signature' => 'phpdocx',
'footer' => 'phpdocx\nfooter',
),
);
$options = array(
'parseLineBreaks' => true,
);
$bulk->replaceText($variables, $options);
The first subarray is only for the first DOCX to be generated, the second subarray for the second DOCX to be generated and so on. Maybe you setting the placeholders for multiple DOCX when you need to set them for a single DOCX?
BulkProcessing feature (https://www.phpdocx.com/documentation/introduction/bulk-processing-documents-PHP) allows generating multiple DOCX outputs based on the same template. But if you need to generate a single DOCX output from a template, the best solution is using template methods (https://www.phpdocx.com/documentation/practical/working-with-templates).
Regards.