We help IT Professionals succeed at work.
Get Started

How would you create this interface?

Bruce Gust
Bruce Gust asked
on
71 Views
Last Modified: 2016-01-04
I'll give you what the user wants, what I've built thus far and then you tell me how you would proceed given the realities that have recently been revealed.

What They Want...

Their are several users who are required to submit a weekly report that consists of three sections. In the past, this report has been nothing more than an email that consists of Rich Text Formatting (text that will be published in different colors, emboldened, underlined, etc) as well as portions of either an Excel spreadsheet or an online table that inevitably has some formatting as well (see below):

houston
Just as a quick aside, notice that the portion of the spreadsheet that is pictured above is truncated. Rarely, if ever, are the reports that are going out currently via email structured in a way where they can fit nicely on an 8.5 X 11 piece of paper.

What I've Done...

What I've accomplished thus far is pictured in part below:

system performance block
I built a page that has three sections like what you see above. The user can choose between a tinyMCE editor or an HTML option. There's some Javascript in place that reveals either a plain text block or the tinyMCE editor, depending in which option that user selects.

Initially, I was thinking I was being pretty, stinkin' clever. The tinyMCE editor gives the user the opportunity to format their text however they wish. I built another dynamic where the user can upload images and then reference them accordingly. This is going to be cake and ice cream, right?

Not so much.

The Excel spreadsheet dynamic gets kind of clunky. You can copy and paste what you have directly into the tinyMCE editor, but it doesn't reproduce any of the formatting you might have in place (colored cells, bold text, etc.). This is why I put the HTML text block in place. You can save your spreadsheet as an HTML doc, then copy and paste all of that code into the HTML text block and it looks great. But this is assuming the user is willing to do that and understands enough about HTML where they know what part of the code to grab.

Another thing you can do is put this all into an Outlook email and then display it in your web browser, grab the source code and you're all set. But that gets kind of clunky as well.

To make matters even more convoluted, exporting all of this into a pdf doc using PHP is doable PROVIDED THAT the architecture of your page / report is fixed. I can reproduce a webpage as a pdf doc easy enough, but I can't create tables and reproduce formatting on the fly. I can change the content, but not the structure (see https://www.experts-exchange.com/questions/28906224/Export-a-page-to-pdf-using-php.html)

What Would You Do...?

Here's what I'm thinking / needing some minds greater than my own to weigh in...

Spreadsheets need to be treated as attachments and not as entities displayed as inline objects for two reasons:
rarely are they structured to fit neatly and / or legibly within an 8.5 X 11 piece of paper
converting them into an HTML format is neither intuitive nor elegant

In light of each update varying in both content and architecture, writing code to export said page into a pdf format isn't an option. Rather, I have to provide for my user a page that is print friendly and from there they can print it as a pdf doc

I'm thinking those two thoughts satisfy my user's request for said interface. But what do you think and how do I provide for my user the ability to print a web based doc as a pdf? In the past, I've used PrimoPDF, but that's a separate download. Is there something out there that I'm not aware of that does the same thing? In other words, you go to print something and there's an option you can choose that prints your content as a pdf doc.

Can you smell what I'm cooking? What do you think?
Comment
Watch Question
Commented:
This problem has been solved!
Unlock 1 Answer and 3 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE