Skip to main content
Filter by
Sorted by
Tagged with
0 votes
0 answers
81 views

i am creating laravel project that parsing word doc and docx file into elements in json format. I use phpword library and loading IOFactory::load($path) code. In loading time i get error DOMDocument::...
Nuriddin Rashidov's user avatar
1 vote
1 answer
87 views

I am using PHPWord from within PHP to generate a word docment. I do use addHtml to transform some Mysql text containing multiple lines into a Word paragraph. My input text contains: <pre> Lorem ...
OfiserChris's user avatar
1 vote
0 answers
85 views

Using PhpWord in my PHP project gives me issues. I do have a variable containing CR/LF (\n) and HTML code. Something like: $str='<div style="font-style: italic; text-align:center">...
OfiserChris's user avatar
1 vote
2 answers
129 views

I'm using the PHPWord package in Laravel to replace placeholders in a DOCX template. I have a placeholder ${html} in my DOCX file, and I'm trying to replace it with HTML content like: <p>Hello,&...
Kishan's user avatar
  • 11
0 votes
0 answers
64 views

I have a template word document with a placeholder that needs to be replaced by HTML code. That HTML code has test wrapped images as well. Ill break down my requirement and the issue below. ...
Ara's user avatar
  • 83
0 votes
0 answers
37 views

In phpWord, I would like to modify the text that appears on the Table of Contents to be different from what appears in the individual section titles. // Add title styles $phpWord->addTitleStyle(1,[]...
Matthew's user avatar
  • 189
0 votes
0 answers
24 views

I've written a Laravel application that generates content for documents and inserts it into existing Word templates using PHPWord. My desired approach is pretty simple: I generate the content that I ...
Cornel Verster's user avatar
0 votes
0 answers
225 views

I'm writing code that inserts sections of content into a pre-defined Word template using PHPWord. I put tags like ${INTRODUCTION} in my template, and then I use the Template Processors's setValue ...
Cornel Verster's user avatar
-2 votes
1 answer
48 views

I downloaded and installed the dompdf release http://dompdf_3-0-2.zip/ I am not using composer, so I added this line: require_once '../dompdf/autoload.inc.php'; Running some sample code: $phpWord = ...
Cymro's user avatar
  • 1,484
0 votes
0 answers
21 views

Using this code with PhPWord, the addImage() function seems to inject a line break. $Format['width']=36; $Format['height']=36; $Format['wrappingStyle']='square'; $Format['positioning']='absolute'; $...
Cymro's user avatar
  • 1,484
0 votes
0 answers
59 views

I have created a WORD docx document with phpWord. It can be opened and looks ok (just as intended) with LibreOffice (newest version). I do not have a WORD version myself but a colleague told me it ...
Tacitus5's user avatar
-1 votes
1 answer
67 views

When generating a file from a word template, is it possible to delete personal data left in the template? For example, the author's name. I checked if the author's name is left in the template, in the ...
Dmitriy's user avatar
0 votes
1 answer
92 views

Using PHPWord, I've managed with this line: $section->addText('<'); to provoke an Error in Microsoft Word opening the .docx file: +---------------------------------------------------------------...
Cymro's user avatar
  • 1,484
1 vote
1 answer
175 views

The image showing in docx file is not visible in pdf when converted using unoconv where the image is displayed using $document = new \PhpOffice\PhpWord1\TemplateProcessor($docx_temp_file_path); $...
user_777's user avatar
  • 805
0 votes
0 answers
73 views

When creating word documents, PHPWord allows for defining custom paragraph styles, which in turn text content can be assigned to. The features that can be defined when creating paragraph styles seem ...
TheodorusMaximus's user avatar
1 vote
1 answer
118 views

The documentation for Manual Install is out of date. I tried to manually write an Autoloader class and maybe it worked? but the only output I get in Sample-01.php is 02:56:03 Create new PhpWord object ...
zitot's user avatar
  • 67
1 vote
0 answers
36 views

Im trying to do an offline file filler (but they specifically asked for a browser experience so aigth) for a company that does the same paperwork over and over again. they assigned me to do a fairly ...
Jugador Misterio's user avatar
0 votes
1 answer
34 views

There is a space in the table. I couldnt remove it. It's not just a space, tab, align or 4space. this image is the wrong one, it should be like this this image is the true one $information = ...
Azimjon Ganiev's user avatar
1 vote
1 answer
138 views

I have a doc template which contains the following table: and with php I fill the variable with this line: $templateProcessor->setValues(array("{key1}" => 59, "{key2}" => ...
Fabbio's user avatar
  • 353
1 vote
1 answer
82 views

I am using PhpOffice\PhpWord\TemplateProcessor to modify my template DOCX document and its setValue method works well. but I am not sure how to use $templateProcessor->deleteBlock(); Here is my ...
Moriah Buckridge's user avatar
0 votes
0 answers
39 views

I'm using laravel 9, vue 3 and phpoffice/phpword. I've also uploaded a word document which lives in my storage folder and that word document has stylings in it. What I'm trying to do is display that ...
Chibi's user avatar
  • 21
0 votes
0 answers
113 views

So I have in my word document a placeholder: {{ test }}. I want to replace this placeholder with some html. But I can't seem to get it working an I do not know why. This is the error that I'm getting: ...
Moemen Hussein's user avatar
0 votes
1 answer
654 views

I attempted to convert my Word document to PDF, but the formatting was lost and did not match the original. Specifically, I was converting a certificate from a Word file to PDF, resulting in incorrect ...
puvanandy24's user avatar
0 votes
1 answer
145 views

if (!empty($params['responsibilitiesItems'])) { $cnt = count($params['responsibilitiesItems']); $templateProcessor->cloneBlock('responsibilitiesItems', $cnt, true, true); $section = new ...
Dmitriy's user avatar
0 votes
1 answer
622 views

I use PhpWord to generate a .docx file using TemplateProcessor. In the script, I include an image with a statement $templateProcessor->setImageValue('aName', [ 'path' => '/path/to/file', ...
Dima Dz's user avatar
  • 546
1 vote
1 answer
333 views

I'm using PHPWord to create a table like this: But I got this: My Code: $phpWord = new \PhpOffice\PhpWord\PhpWord(); $section = $phpWord->addSection(); $fullWidth = 11906.85; $...
Wilson's user avatar
  • 825
1 vote
1 answer
569 views

I want to autofit phpword table to window. So, I has add array('unit' => 'pct', 'width' => 5000) when create table. But , the table column show in reversed order in output docx file. I don't ...
Premlatha's user avatar
  • 2,004
0 votes
0 answers
114 views

I have created table using phpword. Cell 1 has border, cell 2 has no border. when I generate pdf, whole table come out with borders. I have use tcpdf renderer to generate pdf <?php include_once '../...
Premlatha's user avatar
  • 2,004
0 votes
1 answer
511 views

I has create table using phpword. I want set border for specific cell only. For testing, I have create two array style, border=6 and border=0. I set style1 to cell 1 and style2 to cell 2. In word file ...
Premlatha's user avatar
  • 2,004
1 vote
0 answers
104 views

We are trying to create a word document with phpWord. The word file contains html and we are saving the html with tinyeditor (tinyMCE) to db. From an api call, it returns html that is from tinyMCE and ...
Kevinhub-tech's user avatar
1 vote
0 answers
161 views

I'm attempting to convert a DOCX document to HTML using the PHPWord library. However, during the conversion process, it doesn't include images, backgrounds, headers, or footers. It only retains tables ...
user2048789's user avatar
1 vote
0 answers
171 views

I try to run PhpWord on server but have issue. autoload.php <?php function loadLibraries($class) { $path = __DIR__.'/lib/'; require_once $path.$class.".php"; } ...
Stanley01's user avatar
0 votes
1 answer
154 views

I am using PhpWord to create a document that contains comments. I can create the file successfully, but when I try to open it, Word reports that it contains unreadable content. Although Word will ...
Doom_Cat's user avatar
0 votes
0 answers
80 views

I have been tasked to create a document control system written in PHP which utilises existing word templates. The templates have content controls which I must populate from MySQL database. I am ...
JJ279's user avatar
  • 9
0 votes
0 answers
87 views

I am building a document workflow system (in PHP) which utilises word templates. I will populate some content (document number, title, issue, and signatures) from a mySQL database. The rest of the ...
JJ279's user avatar
  • 9
1 vote
1 answer
5k views

How to use template processor to add more content than just simple values? $templateProcessor = new TemplateProcessor(resource_path('prints/form.docx')); $templateProcessor->setValue('date-now', $...
DaveLV2's user avatar
  • 358
1 vote
2 answers
339 views

Am trying to save a word document using PhpWord 1.0 object Writer within the storage folder in laravel 10 but am getting an exception "mkdir(): No such file or directory". The logic is as ...
peter chege's user avatar
0 votes
2 answers
119 views

There are phpstan configuration files in the phpword sources https://github.com/PHPOffice/PHPWord/tree/0.18.2 , but composer does not include these on phpword installation, thus there are none of ...
Alexandr Shavykin's user avatar
0 votes
1 answer
957 views

Hi I am using PhpWord to convert a docx file to a html file. This works well however it contains HTML, HEAD and BODY tags, how do I convert a file without these tags, just the body content. $...
user3459394's user avatar
-1 votes
1 answer
442 views

I'm using phpword to add text and images to a .docx. I can add pictures that are identified by a placeholder just fine (for example ${TM-TA-PICTURE-FRONT} ), but if I try to set dimensions it ignores ...
Paulo's user avatar
  • 51
0 votes
0 answers
293 views

I have template.docx template with mark ${table} inside. I create document.docx using phpWord and need to convert it to PDF using LibreOffice on Ubuntu. Here is my code v1 filling table $...
Garry's user avatar
  • 81
0 votes
1 answer
843 views

I have PHP 8.2. with PHPWord and MPDF, installed via composer. I do not know how to properly set psr logger version. The error is: My code is: \PhpOffice\PhpWord\Settings::setPdfRendererPath($_SERVER[&...
Dux's user avatar
  • 89
0 votes
1 answer
137 views

I create multiple object which link to different sheets from same excel file using phpword template processor. I have create customized function in template processor.php to create object link to ...
Premlatha's user avatar
  • 2,004
0 votes
1 answer
260 views

there is a code like this: $templateProcessor = new TemplateProcessor('path to DOCX file.....'); $table = new Table(['unit' => TblWidth::AUTO]); $table->addRow(); $table->addCell(null, [ ...
Mister X's user avatar
1 vote
0 answers
222 views

I am creating table of content using phpword from heading 1. I have added 2 heading 1 in different page. The heading 1 on last page only added to table of content in output file. <?php ...
Premlatha's user avatar
  • 2,004
0 votes
0 answers
411 views

My code: <?php require "vendor/autoload.php"; $phpWord = new \PhpOffice\PhpWord\PhpWord(); \PhpOffice\PhpWord\Settings::setCompatibility(false); \PhpOffice\PhpWord\...
user avatar
1 vote
1 answer
1k views

I am new to the PHPWord library, and have just now installed it using composer. I want to generate a basic word file. This is my code: <?php // (A) LOAD PHPWORD require "vendor/...
user avatar
1 vote
1 answer
504 views

I have an online library application that allows users to search the content of books by keywords. To add a book to my application, I want to be able to upload the docx file of the book, then extract ...
Kmaj's user avatar
  • 101
0 votes
1 answer
373 views

I have a Full HTML text which needs to be converted accordingly to phpword and added finally in word. HTML code is : $html = '<table style="height:500px;width:600px;"><thead><...
Dinesh Chandra's user avatar
-1 votes
1 answer
204 views

What is the return value of $template_processor->saveAs()? , i tried to catch the return value to determine whether the process is successfully executed or not public function create_spm($data_spm){...
Hanhan Plentus's user avatar

1
2 3 4 5
14