Is this possible with PHP?

Keep it clean but fun.

Is this possible with PHP?

Postby OldRod » Fri Mar 10, 2017 1:17 pm

Have a non-game dev question for ya :)

I am undertaking a project at work and trying to decide how best to approach it.

I have approximately 100 small Microsoft Word files, with anywhere from a few words to a few paragraphs in each file. The file could contain plain text, or it could be a bulleted list, or formatted table of information, or maybe even a combination of those 3 in a given file.

What I need to create is a one page dashboard-type checklist containing a listing of all of these files, sorted in order, with checkboxes next to each one. Then the user goes through and checks the box next to the ones that they want included in a larger master document. Once all the boxes are checked, a button is clicked to create the master document and all of those Word files are merged into one document - each separated by a page break - with the original formatting of each individual file intact.

Is this something that could be done in PHP?

If PHP wouldn't work well... what other options are there?
User avatar
OldRod
 
Posts: 1307
Joined: Sun Sep 20, 2009 11:26 am
Location: Kansas
Has thanked: 0 time
Been thanked: 9 times

Re: Is this possible with PHP?

Postby a_bertrand » Fri Mar 10, 2017 1:37 pm

The most straight forward solution would be to use one of the .Net language like C# and pilot word. That can be done on the server without showing word.

Besides that there's loads of libs even for PHP which should do the trick like https://github.com/PHPOffice/PHPWord
Creator of Dot World Maker
Mad programmer and annoying composer
User avatar
a_bertrand
New Worlds Engine creator
 
Posts: 1499
Joined: Mon Feb 25, 2013 8:46 am
Has thanked: 15 times
Been thanked: 21 times

Re: Is this possible with PHP?

Postby Jackolantern » Fri Mar 10, 2017 6:35 pm

I agree with Alan. The real issue with Word documents is that they are so filled with metadata and formatting binary that dealing with them by hand is nearly impossible. At least in any kind of sane way. Obviously people have worked it out so libraries do exist. And as Alan said, .NET is a Microsoft platform so it has first-class support for anything Office-related. But any other popular platform (of which we all know PHP is one) will have libraries for working with them. I would just investigate each library's API and see which one offers all of the functionality you need and work off that. Rolling your own, you could get lost for months trying to get Word to cooperate.
The indelible lord of tl;dr
User avatar
Jackolantern
 
Posts: 10712
Joined: Wed Jul 01, 2009 6:00 pm
Location: Houston, TX
Has thanked: 21 times
Been thanked: 77 times
Blog: View Blog (1)

Re: Is this possible with PHP?

Postby OldRod » Fri Mar 10, 2017 11:42 pm

OK, I'll look into that, thanks guys!
User avatar
OldRod
 
Posts: 1307
Joined: Sun Sep 20, 2009 11:26 am
Location: Kansas
Has thanked: 0 time
Been thanked: 9 times


Return to Off-Topic

Who is online

Users browsing this forum: No registered users and 2 guests

cron

x