AdSense Mobile Ad

Showing posts with label blurb. Show all posts
Showing posts with label blurb. Show all posts

Wednesday, November 21, 2012

Creating a Compliant PDF for a Blurb Book with TeX

I'm an avid Blurb user since I receive my first photo book. They're just awesome. But I'm not going to talk about photos this time.

Today, I received my first text book, 440 pages, trade format (6x9 inches), printed in black and white and with hardcover and dust jacket. I opened it and it's just awesome. As awesome as a custom-made text book can be, at least for that price (approximately $33). The book is heavy, seems sturdy, doesn't look cheap, the text is finely printed and the paper is very good, with a nice creamy colour and nice to the touch.

I just tried Blurb's text and photo books, and they really live up to the expectations. If you're wondering whether you should try them: you definitely should. Furthermore, Blurb has recently expanded their offerings including magazines, brochures, planners and other products. I haven't tried them yet (and don't know if I will), but should I need one of them, I wouldn't hesitate to purchase them from Blurb.

The Downside of Using TeX with Blurb

TeX (and TeX-derived processors) are wonderful, provided you know how to use them. And if you have some scientific academic background, chances are you do. I've been a faithful TeX user since the 90's, and I never switched to other editors, not even for pure text books. TeX's advantages are manifold, but suffice it to say that the quality of the documents you can produce is high, much higher (from a typesetting standpoint) than what you can achieve with a basic desktop publishing software (such as Microsoft Word). And TeX is it's really WYSIWYG and portable.

Blurb provides many tools to easily create books and upload them to their site. Most of them take care of producing a Blurb-compliant book so that users have not to worry about that. Adobe Lightroom 4, for example, has a very flexible Book module that mimics built upon Blurb's BookSmart. Here you can find the update list of available tools for editors.

What's the problem with TeX? The problem is that the output of a TeX engine depends on the engine itself. For "generic" books, Blurb has got a PDF To Book feature that allows users to upload a Blurb-compliant PDF for print. And what's "Blurb-compliancy"? Blurb obviously checks for a lot of things about the PDF in order to make sure the book is printed as the client wants it to be. Basically, the pages in the PDF files must conform to the sizes specified by Blurb's PDF To Book Specification. which, on the other hand, obviously depend on your book geometry. For example, the number of pages and the paper type determine the height of a book's spine, and you've got to take that into account when designing your book cover. This reasoning applies to all parameters of a book geometry (such as page size, cropped size, bleed, margins and safe boundaries).

To complicate things even further, Blurb requires the PDF to be a compliant PDF/X-3 file. Needless to say, many PDF export tools (such as OS X save to PDF or pdfTeX) don't guarantee such compliance.

When it comes to TeX, then, apart from setting up your page geometry according to Blurb specifications (which is a problem which affects every publishing tool you may use), you've required to produce a compliant PDF/X-3 file, otherwise the Blurb preflight checks will fail.

The purpose of this blog post is describing how I solved this problem and help TeX/LaTeX users out there easily produce a Blurb-compliant PDF file.

My workflow usually is:
  • Typeset the book in TeX with approximate book specifications: you don't really know them until the exact number of pages is known, so don't even bother nailing them at the beginning.
  • Once the number of pages is known, I fine tune the book specs.
  • Once the book is ready for print, I manage to produce a compliant PDF/X-3 file.

Book Specifications

This is the easy part, and that's one TeX is really great for. On the other hand, since TeX is so flexible, how you achieve it depends on parameters such as the TeX engine and the packages you're using.

When editing text books, I usually rely on LaTeX and the memoir document class. Why? Because it encapsulate common functionality for book editing provided by lots of other packages (without dealing with each of them), it's extremely well documented and it's easy to use, especially when it comes to stock and page size tuning. If you use other engines or classes, however, don't worry: rely on their documentation to discover how to tune the page size according to Blurb specs.

Furthermore, as we'll see later, pdfTeX (and company) doesn't produce PDF/X-3 file, and you've got to rely on some tricks to produce a proper file. Maybe you should check other TeX engines (such as the excellent ConTeXt) which now supports PDF/X out of the box. Getting a Blurb-compliant PDF with ConTeXt is a no-brainer. But you might lose the possibility of using other packages you're used to (such as the memoir class, which I really like). If you're beginning your book, I suggest you take a look at ConTeXt and see whether it fits your needs.

Here's an example of a book setup in case you decide to use LaTeX and the memoir class. Let's suppose your book has got 390 pages, hardcover with dust jacket, black and white printing. According to Blurb, the book specifications are (in points):
  • Final PDF should measure: 441x666
  • Page size / trim line: 432x648
  • Bleed: 9
  • Inset for margins (top, bottom, outer): 18
  • Inset for margins (binding): 45 

This is a screenshot of the Blurb calculator:

Blurb Calculator - Specifications for a book

To tune your memoir document, you can use this code (I prefer to use inches in the book):

\setstocksize{9.25in}{6.125in}
\settrimmedsize{9in}{6in}{*}
\settrims{0.125in}{0.0625in}
\settypeblocksize{*}{\lxvchars}{1.618}
\setlrmargins{*}{*}{0.618}
\setulmargins{*}{*}{1}
\setbinding{0.625in}
\checkandfixthelayout

Please note that the settypeblocksize is not required to get a compliant book, it's just a suggestion to get a beautifully proportioned typeblock size.

Change the dimensions accordingly (remember that 1 inch corresponds to 72 point) to match your book dimensions using Blurb calculator. If you need more insights on the features provided by the memoir class, check its documentation.

Producing a PDF/X-3 Compliant File

This is the tricky part, and I was lucky enough to find a proven solution on the Internet (according to a discussion thread in TeX - StackExchange). In fact, I worried about this only when the book was typeset, and I started worrying whether I should switch to ConTeXt (and losing part of the typesetting work) or purchasing Adobe Distiller. Fortunately, there was a solution.

To have pdfTeX produce a compliant file, you should add this fragment just before the \begin{document} statement and tune it to your needs:

\pdfinfo{
/Title (Your Book Title)    % set your title here
/Author (The Author)        % set author name
/Subject (The Subject)      % set subject
/Keywords (The Keyword Set) % set keywords
/Trapped (False)
/GTS_PDFXVersion (PDF/X-3:2002)
}
% I think Blurb ignores both the MediaBox and the TrimBox, but I put it anyway
\pdfpageattr{
/MediaBox [0 0 441.00000 666.00000]
/TrimBox [0.00000 9.00000 432.00000 657.00000]}
\pdfminorversion=3
\pdfcatalog{
/OutputIntents [ <<
/Info (none)
/Type /OutputIntent
/S /GTS_PDFX
/OutputConditionIdentifier (Blurb.com)
/RegistryName (http://www.color.org/)
>> ]
}

The MediaBox and the TrimBox are the important parts, which establish the page geometry. As you can see, the MediaBox is set to the Blurb final PDF specification (beware that the box coordinates are swapped compared to the output of the Blurb calculator).

The TrimBox is a little trickier to "casual users". Since the bleed is 9, I set the first of the trim box corners to (0pt, 9pt) (that's why you'd better get point measures from Blurb) and the second corner was set to (432pt, 657pt). Why? 432pt is the trimmed size width, and you can leave it as is. Since the bleed affects the bottom and the top of the page, you can subtract it from the media box: 666 - 9 = 657. Assuming your text won't run so close to the trim lines.

Run your input file through pdfTeX and you should get a compliant PDF/X-3 file. The compliancy can be checked with the free Adobe Reader application. First of all, you should see the yellow trim box you specified on your PDF pages and, most importantly, you should get the following two entries into the document properties (both required by PDF/X-3):
  • PDF Version: 1.3 (Acrobat 4.x).
  • GTS_PDFXVersion: PDF/X-3:2002

The former is found in the main document properties tab (called Description), the latter into the Custom tab, as shown in the following picture:

Adobe Reader - Document Properties - Custom

What About the Cover?

The same reasoning applies. However, even if I consider myself an hardcore TeX user, I just rely on Adobe InDesign and Blurb's InDesign Plugin to get a good cover. You can certainly argue you can design it with TeX, and it's true, but when I'm dealing with images in a single page cover, I just prefer to use InDesign, especially since Adobe lets us rent it for approximately $30 bucks a month. I try to accumulate some jobs and process them on a single month.

Sometimes it's not possible and it certainly is a deal breaker for many, I do realise it. Anyway, as I already said, there are many other options, just check Blurb's website.

Conclusion

As you can see, producing a TeX book for printing with Blurb should be easy enough for any TeX user. The results are wonderful, both because TeX is a great engine and because Blurb is delivering awesome quality products at reasonable prices.

I hope this helps a lot of TeX users out there.

Wednesday, March 21, 2012

A Review of My First Blurb Photo Books

Today my first two Blurb books were delivered to me. I bought them as a kind of test to evaluate their quality, before entrusting Blurb more important and expensive orders.

This review is by no means scientific: I just express my own point of view and impressions. However, to avoid getting disappointed, I made sure I chose pictures where printing problems would be more likely to show up.

In fact, to conduct this test, I used good quality and sharp pictures with the following characteristics:
  • Pictures with well saturated primary RGB colors (such as deep blue skies or almost pure greens).
  • Pictures with several degrees of details in deep shadow areas.
  • Pictures with large and soft color gradients (such as big skies printed on a two page layout).
  • High key pictures with almost evanescent skin tones. 

The characteristics of the books I ordered are the following:
  • Format: Standard Landscape (10x8 inches, 25x20 centimeters).
  • Cover: softcover and hardcover with dust jacket.
  • Paper: Premium Lustre (148 g/m2).
  • Number of pages: 40 (softcover), 80 (hardcover with dust jacket).
  • Price: €28.69 (40 pages, softcover) and €36.74 (80 pages, hardcover with dust jacket).

If you're wondering, I ordered the book from Spain and it looks like they have been printed in The Netherlands: the origin, according to UPS tracking information, is Eindhoven. Take this into account if your experience is different than mine.

Overall Quality

The overall quality of the book is very good. Both covers are as good as expected and both seem very resistant. The softcover is somewhat thin, but not much thinner than the cover of any paperback you can get from any major publishing company.

Bindings are very good and both have survived the "stress test" they were subjected to, including opening wide each and every page and applying a reasonable tension on the binding itself.

The only thing I'd really like, although I understand it's something impossible to ask for this price, is a sewn binding booklet. I've never seen a cheap paperback with one, however, let alone a unique copy of a book made exclusively for you.

In the next picture you can see the binding of the softcover book (the binding of the hardcover book is essentially the same):

The Binding

The Premium Lustre paper has been a good surprise: this pretty heavy (148 g/m2) paper is very pleasant to touch and I'm satisfied with the print characteristics (more on this on the following sections). For most books I wouldn't buy the cheaper Standard paper nor the more expensive ProLine papers (although I'm curious to try it, too).

Color Fidelity

Rendering colors on devices with different gamuts inevitably causes problems. Blurb uses the CMYK process on HP Indigo presses (set at a resolution of 175 lpi) and I wanted to test how good (almost) pure RGB colors would render.

When you're concerned about the color fidelity of a device output, you should always work with a color managed workflow. In my case, I'm working on a calibrated monitor and tried to soft-proof my images before sending them to Blurb in order to have an idea about what to expect.

Blurb provides only a generic ICC profile, which cannot be considered by any means reliable. To be so, they should provide a profile for every printer settings possibly used (to take into account parameters such as the paper you've chosen). However, out of curiosity, I decided to try the profile anyway and I did it both in Photoshop and in Aperture.  (A warning for Lightroom users: Blurb's profile is a CMYK one and cannot be used in Lightroom. Don't even lose time trying).

As expected, according to the profile, the rendition of many colors would be much duller than the image on the monitor.

With my great surprise, the colors in the books I received are much better than what the profile had anticipated. In fact, at first sight, the perception I had deceived me into thinking that there was no shift at all. A closer inspection, however, revealed some loss in saturation in both blues and greens, but it was much smaller than expected.

Incidentally, the printed images and the out of gamut zones (as far as I can tell) correspond more with a soft proof made in Lightroom using the sRGB profile than with the soft proof made with the Blurb ICC profile.

As stated earlier, I haven't tried any paper other than the Premium Lustre. I suppose that the result using  ProLine papers would be even better.

This is a photo of the book cover and the original picture sent to blurb (cropped):

Book Cover - Photo

Original Picture (Cropped)

Colors are satisfactorily rendered both in the shadows and in the highlights range. In the following picture you can see a close-up of a printed high-key image where the color texture is nowhere near to fading away:

Close-up (approx. 5x) of a Printed High Key Image

The original colors in the model forehead are close to Adobe RGB (240, 230, 230) and the printed version is pretty faithful.

Print Quality

The print quality of the book is very good. After careful review, I haven't spotted any problem whatsoever. Soft color gradients, even in problematic color zones, show no banding nor posterization. Here's a 100% crop of the previous picture so that you can appreciate how the blue smoothly transitions from darker to lighter:

Smooth Color Gradient

To be honest, if you inspect an image very closely, you can recognize a characteristic banding of the printing process (not very dissimilar to the texture of classical offset printing), but it's really, really hard to notice with naked eye. Here's an extremely magnified picture:

Close Detail

Conclusion

I'm very pleased with Blurb photo books and I'm likely to order more in the near future. The quality-price ratio is very good: according to my experience, it even exceeds expectations, especially if you consider the cost of a page. Here you can see Blurb pricing policy, summing it all up:
  • You pay a base €19.49 for a Standard Landscape book (10x8 in, 25x20 cm) with 20 Premium Lustre pages.
  • You pay additional €5 difference to get a book in the 20-40 pages range.
  • You pay additional €10 difference to get a book in the 40-80 pages range, and so on. 

20 more pages cost a maximum of €5, or €0.25/page.

Let's consider a direct Blurb's competitor I had the masochistic pleasure to try: Apple (with its iPhoto books). A book of the same characteristics (L-size, 20 pages, softcover), without even the possibility of choosing a paper quality, is offered here in Spain for an initial price of €20.05. The maximum number of pages per book is 100 for an additional fee of €0.70 a page.

A ridiculously high price, especially when comparing the quality of the two products. In my opinion, Blurb books have an overall better quality, especially as far as printing is concerned. Maybe, some users choose to print an iPhoto book because of the supposed user-friendliness of their tools. Being honest and trying to step back, I consider this a myth easy to debunk. Just try one of the several applications that Blurb offers to publish a photo book. I tried all of them, including the Bookify web application, and they're perfectly usable for users of any proficiency.

As a plus, if you're an amateur or a pro who owns Adobe Lightroom or InDesign, you can now design and publish a book directly from your favorite application, without any disruption of your workflow. If you're curious, in another post in the Lightroom Tutorial series I described the new Book module that appeared with Lightroom 4.