Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I'm building a website for a restaurant. They have a downloadable PDF version of their menu (which is what the "real-world" menu is printed from), but we also want to have a text-based version of the menu on the website (because it's the 21st century and you shouldn't have to read a PDF when browsing a site like this).

I'm hoping to avoid -- or minimize as much as possible -- the potential problems with maintaining data in two places (one in the PDF and one on the website).

In an ideal world, we'd build a custom dashboard interface for managing menu data, with a fully-normalized schema, and from that data we'd automatically generate the PDF and the website versions of the menu (and come up with a very expensive and flexible visual design for the PDF menu that takes into account all future permutations of data that may be contained within it -- because the visual layout of the PDF menu is very important, since that's what the "real-world" menu is printed from).

But, since the budget is not unlimited, I'm trying to think of other ways to accomplish this goal. Are there any compromise solutions or "this gets you halfway there" kind of things I could do? Obviously I'm not expecting a perfect and cheap solution, but anything that minimizes the double-data entry to the extent that it's not so much of a chore would be really helpful.

share|improve this question
3  
use LaTeX to automatically generate the pdf... –  ratchet freak Jan 23 '13 at 16:48
1  
Maybe keep the PDF as your single source of truth and look into extracting the menu data into a database... there may be a way in PDF to annotate sections of text to denote their purpose. –  Chris Jan 23 '13 at 16:53
6  
you may want to start with the question of how have the menus been done thus far, then working from there. For example perhaps the restaurant owner is used to custom-building it in MS Word with different fonts each time etc., then using a PDF-generating print driver. In this case, trying to move her to an app with forms and fields may feel like a big step backwards to her and thus be rejected without understanding the benefits. –  StevenV Jan 23 '13 at 16:56
1  
It would help if we knew the source of the text for the PDFs to be generated. Tapping into that source would likely be the easiest route, but it depends upon what form it's in and what language(s) you are using. –  GlenH7 Jan 23 '13 at 17:25
1  
@StevenV - To add on to what you said, scripts, templates and automation can be used with Word to input and extract the information. But the key bit of information we seem to be missing is how it's being done now. –  jfrankcarr Jan 23 '13 at 19:42

2 Answers 2

How "designy" is the menu? That is to say, how elaborate is the placement of the text? My immediate thought on this problem is that if there's the least little bit of creative license in the menu (ie, certain items being different from other related items), then just maintain it in two locations.

As programmers, we tend to default to thinking about uniform data being rendered through templates/repeaters. If there's 7 entrees, then of course we can just define a template for an entree and push them through to it! WRONG. Today, the chef wants the salmon to get indented and bolded on the menu with a little fish by it, but the hamburger needs to pop over to the left to make room for the big capital letter on the next line ... and so forth and so on.

Furthermore, you have very real problems when it comes to physically printing a menu that don't exist from a data perspective. Like the number of pages. If you just have repeating sections that fill the page from a datastore, there's no good way to guarantee against page breaks. If the restaurant adds 6 entrees, they'll probably play around with the formatting of the entree section to keep the menu roughly the same overall proportion.

Before programming, I used to be in the printing world, and I saw quite a lot of menus being fiddled with and tweaked by graphic designers constantly. There's actually a whole field of psychology on menu item placement and pricing!! Here's an interesting article on the subject: http://rrgconsulting.com/psychology_of_restaurant_menu_design.htm The short version is that the design of the menu effects consumer choice greatly. Meaning that as different entrees become attractive to management as their profitability changes, the restaurant will want the design to change to accommodate this.

So you have two options: build a system by which items are stored in a data source, with options for virtually every possible design configuration, and print the PDF from that. Or just tell the chef that when he/she changes the menu PDF (from Word, or whatever), that they must change the textfile/CMS that powers the website at the same time. The former is going to be very expensive and will take a long time to perfect, and the latter is fast, cheap and takes the responsibility off you.

So can you implement a perfectly designed Menu Generator that allows for great flexibility in the PDF output, while keeping the website up to date at the same time? Sure! But is there any hope of it being cheap or fast? Not a chance in hell.

share|improve this answer

When you look at this from a content management point of view, the content is leading and it should be stored in some form. The design or layout of that content is a second thing, and then both the PDF and the website can be considered a different design or layout.

So separate your content and your design, and then make sure that your content is stored in a single location. Then both the PDF and the website will need to be generated from that single content location.

A simple way of achieving this is by choosing a CMS (Content Management System) for the website, preferably one that can generate both HTML and PDF, so you don't have to do anything extra there yourself.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.