All across the planet, particularly in more computerized nations, bookstores are facing increasing challenges, from the dual competition of ebooks and Amazon, or both simultaneously.

Amazon beats local bookstores on price, and beats them on digital sales completely. Most people think local bookstores don’t stand a chance. Plenty have done well enough, but there’s a way out of this mess anyway. We can fix bookstores so they survive for decades to come.

In two easy steps.

Recognizing the impending doom of the current model

Local bookstores currently face the difficulties of increased overhead due to real estate costs and inventory issues, whereas Amazon can cut those costs by shipping from a central warehouse in the middle of nowhere, or by ordering directly from publishers. Nowadays people shop at physical bookstores, browsing through the selection to find what they like, then buy it on Amazon for less. This is no doubt causing the local bookseller no end of frustration. They’re being used, but not compensated. Furthermore, they’re losing out to digital books, a market in which the local bookstore can’t make any money at all.

Enter the dual solutions that will turn the industry on its head (or rather, back on its feet): Print on demand, and tablet computer affiliate sales.

Step 1: Embrace the machine age

A machine has been invented recently called the Espresso Book Machine, which can print a 300 page black and white book in 4 minutes. Binding, glue, pages, ink, colorful cover artwork, everything. 4 minutes. Indistinguishable from certain types of factory-printed books. Total cost of production is about a penny per page, or $3 for a 300 page book. These machines aren’t cheap ($100,000 each!), but it’s a long-term investment, and costs will come down, and sooner or later allow fancier printing as well. Available formats are limited, but as machines improve, it can eventually become the norm.

Now imagine, if you will, a customer walks into a local bookstore. He or she browses through a selection of books, finds something interesting, then walks over to the machine. You just scan the barcode, swipe a credit card, and the machine spits out a brand new, hot-off-the-press book, especially for you, in just 4 minutes. Or if you’re in a hurry, you just buy a printed book right off the shelf like you normally would, and the machine will simply print a new one to replace it.

Now imagine the advantages of switching to such a model. First, you cut down the cost of rent, by cutting the bookstore in half. The books on the shelves would merely be a storefront; customers browse the selection, but the books don’t need to be sold. You don’t need fifty copies of Twilight on hand at all times; you need just one. If a customer wants a copy, the machine takes care of it. With half the retail space, your rent cost could come down dramatically.

Plus, you don’t need to worry about having enough copies of whatever book, or worry about when the shipment will arrive, or keep track of which books need to be replaced. You need only send the order for more paper, which can be automated according to sales volume. Maintenance costs on the machine are fairly small as well.

This has the added advantage of reducing shipping costs; currently, books of multiple sizes get packed in boxes, leaving dead air space throughout the shipment, and increasing costs. Imagine ordering a ream of paper instead. No wasted space, no multiple shipments, no specifying how many copies of which book you need. Just a box of paper, and, occasionally, toner and glue.

Given the reduced store footprint, which is rather significant, and the added bonus of somewhat reduced shipping, inventory, and restocking costs, book prices can come down, perhaps quite significantly. And since in-store customers get the book the same day, you’ll beat Amazon hands down on shipping time, since they get the books immediately. All of a sudden you’re able to challenge Amazon on physical book sales. Amazon can exploit print-on-demand technology as well, but they still have to ship. You don’t.

Amazon’s recent drone delivery announcement could potentially impact this strategy, but they won’t be capable of turning in-store browsers into customers, whereas bookstores can. People like going to bookstores. People like walking out with books, too. All you have to do is match the price, or come close, and you’re set.

Admittedly, the technology isn’t ready for prime time, and it may never reach the point where it can print fancy books with faux-leather binding, and the current price is out of reach for most small bookstores. But it could be implemented for mass-market paperbacks, and future versions will eventually reach higher levels of quality as well.

In the meantime, bookstores could alternatively exploit the “brick and click” approach, where local bookstores operate simply as a storefront for a centralized warehouse shipper, which could offer discounted prices, sending a commission for the sale. If customers walk into a store and want the wholesale price, the bookstore could simply place the order to the warehouse, and collect a fee, though customers could still purchase the books in-store at the full retail price if they so choose.

Print-on-demand in the long term is a superior option, but, given current technological limitations (it can’t do fancy things like faux-leather covers and so on), operating as a warehouse storefront is the better current option. Bookstores could combine the browsing experience with discounted, warehouse-shipped products, which is something Amazon doesn’t currently offer, unless they partner with existing bookstores to exploit this model before others do it first (which is already underway).

Step 2: Embrace the digital age

What about digital books, you say? Enter step two: Sprinkled throughout the store are a few tablet computers, which allow shoppers to browse through an infinite selection of books you’d never be able to fit into the store. They can find any book they want, in whatever edition they want, without worrying about whether or not it’s in stock. If they want it, they can simply swipe their credit card along the side of the machine, sign off on the transaction, and enter an email address. They get the ebook in their inbox, and you just made a sale.

Existing booksellers can exploit this model already, by simply using tablet computers to sell digital books through Amazon, making a commission in the process as an Amazon affiliate. Instead of making zero dollars on digital sales, you’d get a commission, and visitors who prefer digital books immediately become potential customers. This model already exists, though I’ve never seen a physical store make use of it.

But if the book industry wants to break Amazon’s (and, to some degree, Apple’s) semi-monopoly on digital books, they need only collaborate with local bookstores to offer a digital marketplace, so that any customer in any bookstore can buy a digital book through the tablet computers sprinkled throughout the store. The tablets know which bookstore made which sale, and credit the seller with a commission. All of a sudden physical bookstores are making money from ebooks, and have bypassed Amazon entirely. Customers might still shop directly through a Kindle (or through their smartphone’s Amazon app), but if you can cut out the Amazon middleman, you can potentially undercut them on price, and you probably don’t even have to match it exactly in order to win back customers. People like to wander through bookstores, and are happy to buy from them if the price is close enough. And the tablet is right there!

Furthermore, whenever a customer pays for a book, whether physical or digital, the tablet asks the customer if he or she would like to receive book recommendations in the future. Now you’ve got an email list! And if you know anything about online marketing, you know email lists are the best, better than Facebook or Twitter followers, because they actually want to buy things from you.

So what happens a few weeks after a customer buys a book through your bookstore? An email shows up in the inbox, offering several recommendations based on the purchase history of the customer. And who doesn’t love quality book recommendations? And guess what happens when the customer clicks on a link within the email? The local bookstore gets the credit and the commission for the sale. The book industry can perfect this by collaborating with existing book recommendation services, simply plugging that widget into the email and website of local bookstores all across the country.

And what if your customer wants a physical book? Well, no problem. In fact, here’s where you can truly beat Amazon, in its current form: The digital order is sent to whichever print-on-demand machine from whichever store is nearest, which spits out a book, and, once newer machines are developed, prints outs a shipping label and stamp as well. All you have to do is box up the books at the end of the day and throw them in the post office deposit box. This could already be done with pre-printed books immediately, without widespread implementation of print-on-demand machines. And guess what? That’s a local shipment. You know how fast local shipments ship? They can arrive the next day, or the same day. Does Amazon offer free upgrades to next-day delivery? Nope!

And what if they get free shipping from Amazon, you ask? Well, then you just offer them free shipping in exchange for signing up for book recommendations. Now you’ve got an email follower who’s likely to buy lots and lots of books from you in the future. Congratulations! Sell that customer a few ebooks, which have no shipping costs at all, and you’ll recoup the investment in no time.

(Bonus) Step 3: Party time

That email list can also include listings for local events, such as author signings and other fun stuff. But remember, since these customers have purchased books from you in the past, you’ll have an easier time announcing events they actually care about. Rather than just sending your bookstore’s newsletter to random people that barely care, you’ll be sending an announcement that his or her favorite author is in town, because you know exactly who that is. Not only will they be getting book recommendations, but they’ll be getting targeted local event listings too, meaning it will be infinitely easier to build an email list compared to the existing model of simply telling random people about random events.

In summation!

So where are we so far? Well, we’ve reduced the footprint and thus the rent cost of bookstores approximately in half, by using physical books purely as a storefront display. Customers wander through the shelves, and if they find a book they like, they get it printed on demand (or they take the display copy and the machine prints a replacement), for a reduced cost due to reduced rent, shipping, and inventory costs. Before print-on-demand becomes commonplace, bookstores can simply operate as a browsing node for a central warehouse, which offers discounted prices on books shipped straight to your door. If a customer wants a digital book, they simply buy it through the tablet computer conveniently located amongst the shelves, sending a commission your way every time.

Depending on a variety of factors, local booksellers might be able to match Amazon on price and speed of both physical and digital books, while still offering customers that much-loved local bookstore experience, of wandering through endless shelves, flipping through pages, finding something wonderful, and snapping it up the same day. Plus, they’ll become dedicated followers as you continuously recommend amazing books, targeted to their purchase history, which show up in their inbox a few weeks after their last purchase, right about when they’d be in the market for new reading material anyway.

Not only will local bookstores offer customers improved prices, but they’ll build lifelong face-to-face customer relationships at the same time. And Amazon can’t do that.

But wait! This is HARD!

Will any of this be easy? No. Do certain print editions need to be modified to work with the book machine? Yes. Will this require huge changes to existing models and infrastructure? Certainly. Will it be difficult to convince publishers to adapt to this model? Yup. Will Amazon look for a way to compete? Of course. Will some people still buy from Amazon anyway? Yes, some. But think about where bookstores are now, and consider if that strategy is solid. These alternatives allow physical stores to become more competitive on prices of physical books, offer customers warehouse pricing on books shipped to their home, and allows them to profit from digital books instead of just getting annoyed at them. They can turn non-buying browsers into loyal customers.

The great thing to remember about bookstores is that people still love them. If they can find a way to meet evolving customer demand, they may very well find some familiar faces back in the aisles again, happy to be back, and these emerging technologies could give them the tools to do it. Bookstores don’t have to go away, and we’ll be happy to see them stick around. But they’ll have to evolve soon to survive.