Search This Blog

Loading...

Tuesday, December 10, 2013

End-of-central-directory signature not found. Either this file is not a zipfile, or it constitutes one disk of a multi-part archive. In the latter case the central directory and zipfile comment will be found on the last disk(s) of this archive.

I frequently export epubs from InDesign and used to simply unzip them in Terminal. However, now I am greeted with the ugly error message in this blog post title.

Luckily, there is a simple fix. Change the file extension from .epub to .zip. Then, unzip away.


See that subl .? That's a nifty way of opening the files in Sublime from the command line. Maybe you already know this, but I thought I would mention it.

Tuesday, October 15, 2013

Hack: How to Fix Blank Pages After Large Images in E-Ink Kindles

When doing an image-heavy ebook where a single image constitutes a whole page, such as in a children's book, I always format primarily for Kindle Fire DX with images being 1200 px wide. My reasoning is that most kids are looking at ebooks on newer generation Kindle Fires and not e-ink Kindles. 

However, if you have a 1200 px x 2000 px image (approx double the size of Kindle Fire's screen but an image size that still looks large and clear on Kindle Fire DX), you will see blank pages inserted after each image when previewing on an e-Ink Kindle. Frustrating!

But wait, what about adding an amzn-mobi stylesheet with the CSS like this?

img {
     page-break-after: avoid !important;
     page-break-inside: avoid !important;
     max-width: 522px !important;
}

Unfortunately older generation Kindles ignore all of this CSS, especially max-width. 

But there is a solution! All you need to do is create a second set of images sized to a maximum height of 600 px and put a hisrc tag in the image attribute. 

What this does is assigns hisrc images to e-Ink Kindles and regular imgs to Kindle Fires. Doing so may seem counterintuitive since hisrc is meant for hi-res images, but it's a hack that does work for mobi files. Plus, you don't even need to add image sizes. 

Your img tag would look something like this: 

<img src="images/a.jpg" hisrc="images/aa.jpg"  alt="" />

Of course you will still need to add all of the resized images to your opf file, so it can be time-consuming, but this fix does work and will end all of the questions from your clients like "Why are there blank pages showing up when I preview my ebook on my super old black-and-white Kindle from 2007????"

Note: epub will not accept hisrc images and will throw a bunch of errors at your if you run the epub through the Epub Validator. So, always keep two working copies of the epub, one with hisrc and one without. Or better yet, two git branches. 


Tuesday, October 8, 2013

Blank Pages After Images in iPad Epub

Even if your book flows perfectly in Kindle and Nook, you may encounter unwanted blank pages in your epub when opened in iBooks. The three most common reasons for this happening are:

1) You have a "page-break-after: always" somewhere in your CSS. Remove it. In fact, I remove all mentions of page-breaks in my CSS for the iPad, even "page-break-inside". For whatever reason, these page-break CSS properties are glitchy and unpredictable in iPad epubs.  

2) Your images or text + image on the same page are exceeding the iPad screen size of 1024 x 768. This means that if you have a 600 px image and more than 500 px worth of text, your pages are going to break, sometimes with blank pages.

3) Your images are simply sized too big. Even though iBooks should scale your images automatically, if you are experiencing blank pages and can't figure out why, try sizing full-page images down to 1000 x 700. Make sure that single full-page image is the only thing on the page. 

Monday, September 30, 2013

Black Background Color of the Expanded Crop Tool in Photoshop

I frequently use the Crop tool to expand my image canvas, and it's a handy tool for doing so. However, my foreground color is almost always set to white. And, if you expand your canvas with a white foreground color, you end up with a black background color. Frustrating!


I've searched high and low for a setting for this problem, but there is none. I mean it, I've spent hours pouring through longtail searches and Photoshop guides. There is no setting, at least for CS6.

The rule is simply that "Your foreground color must be set to black in order for your expanded canvas background to be white."

Once I accepted this reality, I now rely heavily upon the "x" key, which is the keyboard shortcut key to switch your foreground and background colors.

And if your foreground and background colors are set to other colors, use the keyboard shortcut "d" to reset the color picker to black and white. Then, use "x" to set black as the foreground color.

Soon you'll live in an xxx world just like me and I don't mean that in the pornographic sense ;)

The Amazon URL to Browse Ebooks in the Kindle Lending Library

I find it annoying and cumbersome to browse ebooks to loan on my actual Kindle Fire. Luckily, you can browse them on any browser on Amazon. Simply click the link below:

Browse the Amazon Kindle Lending Library

*Note: this selection of ebooks in the Prime Lending Library is sorted by "Most Reviews." You can see newly listed ebooks by choosing "New & Popular" in righthand Sort By dropdown menu.

*Note #2: You cannot borrow the ebooks from these pages online. Once you find an ebook you want to borrow, you have to go to your actual Kindle Fire, open the Lending Library, and search for the book.

If the above link does not work, follow these steps:

1) From the Amazon main left navigation box, choose Shop By Department -> Books -> Books (not Ebooks).

2) Scroll down the left navigation until you see the Prime Eligible Box. Check it.

3) Choose Kindle Edition.

I then click the "Image" icon at the top of the page so that I can see more book thumbnails per page. There are a lot of low quality ebooks to sort through in the "New & Popular "category.


My next stop is the Sort By button on the right hand side of the page. Always sort by "Most Reviews" to see the most popular, higher quality ebooks in the Lending Library.


Tuesday, September 24, 2013

PhotoBooth Fix: There Is No Connected Camera Error Message

This is not related to books at all, but I get this error message a lot on my MacBook Air when I open PhotoBooth: There Is No Connected Camera.


The fix is easy. Just close PhotoBook and open Terminal, then paste this in your home directory prompt:

sudo killall VDCAssistant

Enter your password. Then, reopen PhotoBooth and your camera will be connected again.

Why do I used PhotoBooth? A little bit of vanity, a little bit of self-documentation. It certainly is interesting to view your PhotoBooth photo library over the years.

Tip: Turn off the flash on PhotoBooth before taking your picture! Also, for even more ambient lighting, turn down the screen brightness. You won't look as green and pasty if you are not bathed in the artificial lighting of your monitor.

How to turn off the flash for PhotoBooth: Go to the Menu, choose Camera, then uncheck Enable Screen Flash.

Hello, world!

Thursday, September 12, 2013

Copy Paste from PDF Results in Alien Symbols

I do a lot of conversions from PDFs and occasionally I will copy and paste text that results in these alien head symbols in my markup:


Turns out that alien is Mac's hilarious unicode symbol to indicate that the text is protected or unreadable, and cannot be pasted. Here's a close-up:


I was particularly frustrated to see this symbol because I had been copying and pasting from a PDF in Preview yesterday, then resumed my work today and was hit with this symbol.

I re-opened the file in Adobe Acrobat, tried outlining text, saving as rich text, etc, but nothing worked. There are some other good suggestions on this thread: http://superuser.com/questions/137824/pdf-has-garbled-text-when-copy-pasting

However, nothing worked. The file was too large to open in Google Docs, and when I opened it in Chrome and copied and pasted the text, I encountered a whole new set of weird symbols.

This client's PDF is not encrypted or protected in any way. She created it using InDesign and with standard fonts (Minion Pro). After all of the struggle to save the PDF as something else, I knew that the copy paste had worked yesterday, so I simply scrapped the version I had and re-downloaded the original. And it worked. I could copy and paste again without issue.

I wish I had a better answer than that to solve this problem, but it was the classic "turn it on and off again" situation. If you know of a fail-proof solution, PLEASE post below.

Thanks, Amy