Quantcast
Channel: PHPWord
Viewing all 450 articles
Browse latest View live

New Post: May I use PHPWord_Template class within a website, which I'll be selling?

$
0
0
So, can I just put a link on a page, somewhere, to download the source code of all the classes I'm using from PHPWord and everything's fine?

By the way, just to make sure, does PHPWord have a class/function to convert/safe the document as a PDF file, Or even something to protect the final .docx file from being modified, in any way possible?

New Post: May I use PHPWord_Template class within a website, which I'll be selling?

Reviewed: PHPWord 0.6.2-1 Beta (Jun 12, 2014)

$
0
0
Rated 5 Stars (out of 5) - Great stuff! People are misleaded because these examples run in background and create word document without any notification to user. If you want to see something, just add one line before ending like echo '<a href="BasicTable.docx">BasicTable.docx<a/>'; in BasicTable example, for example, and you will see.

New Post: Insert paragraph on a specific location

$
0
0
Is there a way to edit/add a paragraph at a specific line of the document?
If yes, is it possible to use ${this} to give me the location of it? (Guessing it would be quicker)

document example:
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo. Nullam dictum felis eu pede mollis pretium. Integer tincidunt. Cras dapibus.

${this}

Vivamus elementum semper nisi. Aenean vulputate eleifend tellus. Aenean leo ligula, porttitor eu, consequat vitae, eleifend ac, enim. Aliquam lorem ante, dapibus in, viverra quis, feugiat a, tellus. Phasellus viverra nulla ut metus varius laoreet. Quisque rutrum. Aenean imperdiet. Etiam ultricies nisi vel augue.
Intended result:
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo. Nullam dictum felis eu pede mollis pretium. Integer tincidunt. Cras dapibus.

new paragraph 1
new paragraph 2
new paragraph 3
new paragraph 4

Vivamus elementum semper nisi. Aenean vulputate eleifend tellus. Aenean leo ligula, porttitor eu, consequat vitae, eleifend ac, enim. Aliquam lorem ante, dapibus in, viverra quis, feugiat a, tellus. Phasellus viverra nulla ut metus varius laoreet. Quisque rutrum. Aenean imperdiet. Etiam ultricies nisi vel augue.
cheers :)

New Post: pageSize

$
0
0
I'd like change default width "word cards" ( I want little "word cards")

I do
$sectionSettings = array(
//'orientation' => 'landscape',
'pageSizeW'=>308.4,
'pageSizeH'=>487.04
);
$section = $phpWord->createSection($sectionSettings);
but this code not working. The "word card" is default size, still. (dimesion of "word card" not change. ) How to do it?
Please help

best regards
bogdan

New Post: pageSize

New Post: Insert paragraph on a specific location

New Post: Insert paragraph on a specific location

$
0
0
I'm assuming it's with "cloneRow"... if it is, where can I find "Sample_07_TemplateCloneRow.php"?


Cheers :)

New Post: pageSize

$
0
0
thanks for your reply. Couldn'nt give me example $sectionSettings?

I've tried in development version
$sectionSettings = array(
//'orientation' => 'landscape',
//'pageSizeW'=>308.4,
//'pageSizeH'=>487.04,
'paper'=>'A5'
);
$section = $phpWord->createSection($sectionSettings);
but width page is not change. : ( I'd like 5,5x5,5 "word unit" please see http://webweave.pl/other/5i5.jpg

best regards
bogdan

New Post: pageSize

New Post: Headers until the 2nd Page?

$
0
0
Hello!

What if the content on the first page is such that I don't know what point in the content will spill over to the second page? Sometimes I won't have a second page, other times it could be up to 6 pages long. I only want the header information on the 2nd and onward pages.

Thanks.

New Post: create .docx in php

$
0
0
Hi ivanlanin,
Great help from you and your support team. I cehcked the developer version. Now Checkbox, Textbox and Dropdown working great.

Is it possible to add radio buttons like Checkbox and Dropdowns?

I need to save that form elements data in Database. i used doc2txt.php file to parse .docx file, but it is unable to parse the SELECTED option from dropdown and unable to find checkbox is CHECKED or not in the .docx file. 
So, how to parse those form elements from .docx file?

What are the steps i need to follow if PHPWORD files working for PHP5.1 and 5.2 versions?

Please help me asap.
Thanks,
Kiran

New Post: pageSize

$
0
0
Ok. Glad that RTF is working for you.

New Post: Insert paragraph on a specific location

New Post: Headers until the 2nd Page?

$
0
0
Hi. The development of PHPWord is continued on GitHub. The latest stable version of PHPWord (0.11) has been able to create header/footer only on the first page. See Sample_12_HeaderFooter.php. Thanks.

New Post: create .docx in php

$
0
0
Hi Kiran,
  1. PHPWord doesn't support radio buttons nor hidden variables yet
  2. The file doc2txt.php is not part of PHPWord. Did you make it yourself? PHPWord doesn't support parsing form elements, yet.
  3. PHPWord requires 5.3 because we use namespaces. You can't use PHP version lower than that.

New Post: create .docx in php

Created Unassigned: Invalid error type specified in PHPWord.php on line 226 [77]

$
0
0
Hi,

I came across this when I specified a non-existing template file.
Warning: Invalid error type specified in PHPWord.php on line 226

Original
```PHP
trigger_error('Template file '.$strFilename.' not found.', E_ERROR);
```

Replace with
```PHP
trigger_error('Template file '.$strFilename.' not found.', E_USER_ERROR);
```

Other instances of E_ERROR found in the files and line numbers listed below.
```
PHPWord\Section\Footer.php
132 trigger_error('Src does not exist or invalid image type.', E_ERROR);
1 match in D:\wamp\www2\forms\PHPWord\Section\Footer.php
PHPWord\Section\Header.php
132 trigger_error('Src does not exist or invalid image type.', E_ERROR);
188 trigger_error('Src does not exist or invalid image type.', E_ERROR);
2 matches in D:\wamp\www2\forms\PHPWord\Section\Header.php
```

By the way... This is a great library! :)

New Post: How can we add a horizontal rule inside docx file

$
0
0
Hi all,

I was trying to add a horizontal rule(horizontal line) inside docx file. I have gone through documentation and tried with the samples provided in github, but I was not able to find a way to add horizontal rule inside docx file, kindly share your thoughts on this. I also tried with adding lines into docx file but addLine function is also not working.

Thank you

Created Unassigned: How can we create a horizontal rule inside docx file [78]

$
0
0
Hi all,

I was trying to add a horizontal rule(horizontal line) inside docx file. I have gone through documentation and tried with the samples provided in github, but I was not able to find a way to add horizontal rule inside docx file, kindly share your thoughts on this. I also tried with adding lines into docx file but addLine function is also not working.

Thank you
Viewing all 450 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>