Thoughts on printing multiple docs from PHP
Last Post 29 Mar 2013 02:10 PM by dexum. 4 Replies.
AddThis - Bookmarking and Sharing Button Printer Friendly
  •  
  •  
  •  
  •  
  •  
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
dexum
Veteran Member
Veteran Member
Posts:1158
Avatar

--
29 Mar 2013 09:33 AM

Background first:

I have written a PHP app that currently moves data from I into a scrollable grid using Jquery.

I have hyperlinks that user clicks on and data from grid is placed into a MS Word document and Word opens for user to print document.

There may be 100 or more rows in the grid and I need to automate the printing part.

I have created a select all function using Jquery and need to create documents for all selected records.

 

Thoughts:

I have been researching PHPEXCEL and thinking of trying to create an Excell workbook with a separate sheet for each document. Then user could print the complete workbook with a couple mouse clicks and save the workbook if they desire for future reference.

Does anybody have experience with PHPEXCEL or willing to offer a better solution or method?

Thanks Danny.

Danny Exum Model 515 OS Level 6.1
Scott Klement
Editorial Staff Member
Editorial Staff Member
Posts:16399
Avatar

--
29 Mar 2013 12:29 PM

If you have the data in a Word document, why can't they print that?  How does converting it to Excel help?

If you want to automate the printing, a very small Windows program containing a call to the ShellExecute() windows API should be able to do it.  It has the ability to open word and tell it to print the document.  I published an example of that, here:

http://www.iprodeveloper.com/articl...ccmd-18071

dexum
Veteran Member
Veteran Member
Posts:1158
Avatar

--
29 Mar 2013 01:35 PM

Scott it was good to see you again last week.

I have automated creating the data and creating the word document by clicking a hyperlink in a grid.

The grid could have 240 rows based on the number of truck drivers we currently have. That could grow.

I don't want the user to click a hyperlink for each driver, Click File Print and Click File Close in each Word document.

I am trying to find a way put all 240 documents into some container to be printed all at the same time. The ability to save document for future reference is a plus.

I have written the code to select all rows or a portion of rows and now trying to determine a way to speed up the printing process.

In researching I found PHPWORD and PHPEXCEL. Reading through the documentation PHPEXCEL seemed easier to accomplish the desired goal.

I was hoping some one could give some feedback on PHPEXCEL or information on a better way to accomplish the goal.

Thanks as always for your response.

Danny Exum Model 515 OS Level 6.1
Scott Klement
Editorial Staff Member
Editorial Staff Member
Posts:16399
Avatar

--
29 Mar 2013 01:45 PM
My suggestion will print the Word document automatically (under prgoram control).  Was that helpful?
dexum
Veteran Member
Veteran Member
Posts:1158
Avatar

--
29 Mar 2013 02:10 PM

Read the link and yes it might be helpful.

 

Still researching........

Danny Exum Model 515 OS Level 6.1
You are not authorized to post a reply.

Acceptable Use Policy