PHP Word has been amazing for what i need to achieve, however there is a few issues that i have noticed a few other people have had but i can't seem to figure out how to fix.
I am using the templates processing, and anything to to do with blocks doesn't work, i am attempting a delete block, replace block and also a cloneblock. None of them sem to work.
Again the value will be replaced with the count but thie audio file is replaced but the block isn't cloned, no matter which way i try to set it up. Is this an issue with the blocks processor.
The other issue i have is when converting my finished .docx to PDF the formatitng is all messed up, i am using DOMPDF, but this doesn't keep the same formatting if it is converted, whats the best way of converting the template to PDF without breaking the format.
PHP Word has been amazing for what i need to achieve, however there is a few issues that i have noticed a few other people have had but i can't seem to figure out how to fix.
I am using the templates processing, and anything to to do with blocks doesn't work, i am attempting a delete block, replace block and also a cloneblock. None of them sem to work.
Here is my code
Here is the template tag
${VAT} This should be deleted replaced. ${/VAT}
Does nothing.
I then have a for loop that creates a cloneblock based on a count, i even removed this and tried to do it manually but still doesn't work.
$standardProcessor->cloneBlock('CLONEME', 3);
This is my block
${CLONEME} ${audio_file} ${/CLONEME}
and i replace the value inside with this:
$standardProcessor->setValue( 'audio_file' , $item['name'], 1 );
Again the value will be replaced with the count but thie audio file is replaced but the block isn't cloned, no matter which way i try to set it up. Is this an issue with the blocks processor.
The other issue i have is when converting my finished .docx to PDF the formatitng is all messed up, i am using DOMPDF, but this doesn't keep the same formatting if it is converted, whats the best way of converting the template to PDF without breaking the format.
thanks for your help
Jay