PHPOffice / PHPWord

A pure PHP library for reading and writing word processing documents
https://phpoffice.github.io/PHPWord/
Other
7.28k stars 2.7k forks source link

RTF support for Margins #249

Open Centurious opened 10 years ago

Centurious commented 10 years ago

RTF support for Section Formatting in particular margins. I have a reference to the webpage for RTF:

http://www.biblioscape.com/rtf15_spec.htm#Heading28

It would also be nice as a general feature to have the ability to set the layout to different page sizes e.g. A4, A5 if possible.

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/2359363-rtf-support-for-margins?utm_campaign=plugin&utm_content=tracker%2F323108&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F323108&utm_medium=issues&utm_source=github).
ivanlanin commented 10 years ago

Good enhancement. Our RTF writer is underdeveloped. I'm currently working on the RTF reader to get to know better the structure of the file.

ivanlanin commented 10 years ago

Hi @Centurious. Please check the latest develop branch. Section formatting is now supported in RTF Writer. You can also set page size other than A4 (the default). See Sample_03_Sections.php for an example.

ivanlanin commented 10 years ago

@Centurious Any news? Can we close this issue? Thanks.

Centurious commented 10 years ago

Hi Ivan, Sorry, I have been on leave this week and have not had time to test this. I will do it on Monday and let you know how it goes. Thanks, Centurious

David Inglis Programmer BSc Computer Science

On 14 June 2014 04:37, Ivan Lanin notifications@github.com wrote:

@Centurious https://github.com/Centurious Any news? Can we close this issue? Thanks.

— Reply to this email directly or view it on GitHub https://github.com/PHPOffice/PHPWord/issues/249#issuecomment-46077524.

ivanlanin commented 10 years ago

Thanks @Centurious. Take your time.

Centurious commented 10 years ago

Hi Ivan,

I finally got a chance to test this and I tried the Sample you suggested. The RTF open in Word just displays a 4 portrait pages with no change to the margins. Is this what is expected? I downloaded the Docx version and it displays a border round the first page and landscape for the next section before going back to portrait.

Thanks, Centurious

David Inglis Programmer BSc Computer Science

On 15 June 2014 01:51, Ivan Lanin notifications@github.com wrote:

Thanks @Centurious https://github.com/Centurious. Take your time.

— Reply to this email directly or view it on GitHub https://github.com/PHPOffice/PHPWord/issues/249#issuecomment-46103583.

Centurious commented 10 years ago

Additionally I couldn't find out how to set the page size. Any advice about how I can do that would be appreciated.

Many Thanks, Centurious

David Inglis Programmer BSc Computer Science

On 1 August 2014 11:24, David Inglis inglisd101@gmail.com wrote:

Hi Ivan,

I finally got a chance to test this and I tried the Sample you suggested. The RTF open in Word just displays a 4 portrait pages with no change to the margins. Is this what is expected? I downloaded the Docx version and it displays a border round the first page and landscape for the next section before going back to portrait.

Thanks, Centurious

David Inglis Programmer BSc Computer Science

On 15 June 2014 01:51, Ivan Lanin notifications@github.com wrote:

Thanks @Centurious https://github.com/Centurious. Take your time.

— Reply to this email directly or view it on GitHub https://github.com/PHPOffice/PHPWord/issues/249#issuecomment-46103583.