Forum


Replies: 4   Views: 3571
Page numbering?
Topic closed:
Please note this is an old forum thread. Information in this post may be out-to-date and/or erroneous.
Every phpdocx version includes new features and improvements. Previously unsupported features may have been added to newer releases, or past issues may have been corrected.
We encourage you to download the current phpdocx version and check the Documentation available.

Posted by marcushjortsberg  · 18-12-2012 - 22:53

Is there any way to count the pages in a docx-file created by phpdocx?

I want my file to be printed as a booklet. For that I need the number of pages tp be divided by 4, that is 4, 8, 12, 16, ..., ...

I want insert pages into the document if it is not dividable by 4...

Possible?

Posted by admin  · 11-04-2013 - 12:13

Hello,

Sorry but it's not possible to know how many pages are used before the document is opened in Word.

Regards.

Posted by marcushjortsberg  · 11-04-2013 - 12:13

I know I could be done in TCPDF, maybe you can learn something from that?

Idea: create document, store it on server, open document and count pages, edit document if it has to be done, store it to server again...

Possible?

I know anything is possible, you just have to think hard enough:)

Posted by admin  · 11-04-2013 - 12:13

Hello,

Yes we know that TCPDF can get the number of pages :), but it's different because a PDF is created using concrete sizes, unlike DOCX that sizes are calculated when the document is opened.
Maybe if you use a macro, you have an Office Server and you use COM functions you can get the number of pages. I think it's a little difficult and wont work in other OS than Windows but if you try it and works please let us know.

Regards.