03-18-2017, 01:52 AM | #1 |
Member
Posts: 11
Karma: 10
Join Date: Sep 2011
Device: none
|
Amazon eInk Devices: Hidden Text Possible?
Hello,
there are images with text on them, which should be searchable, in my actual eBook. So I decided to embed the image, set all the image text as HTML text down under it, and hide that text with CSS: Code:
p.hidden { color: #fff; visibility: hidden; font-size: 1px; line-height: 1px; } Is there any option to make this work? Or: Is there any better workaround, that is good enough for all devices? Thanks Tobias |
03-20-2017, 03:45 AM | #2 |
Obsessively Dedicated...
Posts: 3,200
Karma: 34977896
Join Date: May 2011
Location: JAPAN (US expatriate)
Device: Sony PRS-T2, ADE on PC
|
have you tried adding
display: none Then you should not have to worry about setting font sizes and color and line height. (it is better never to set color anywhere, to prevent conflict with the user's choice of colors. I understand also, that Kindle devices will not honor line-height below 120%. I could be wrong about that though, you should check the Amazon current formatting guidelines) Last edited by GrannyGrump; 03-20-2017 at 03:53 AM. |
Advert | |
|
03-20-2017, 03:50 PM | #3 |
Grand Sorcerer
Posts: 27,549
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
|
03-21-2017, 12:02 AM | #4 |
Member
Posts: 11
Karma: 10
Join Date: Sep 2011
Device: none
|
Yes, I meant the old MOBI. Kindle Previewer 3.9 displays everything fine. Kindle Previewer 2.94, Kindle DX shows the problems.
I tried display: none; and Kindle DX (Previewer 2.94) hides the text. What I couldn't test is the searchability, because it is not working correctly in my Previewer installations. I chose visibility: hidden; over display: none; because of searchability. Tobias |
03-21-2017, 12:02 AM | #5 |
Member
Posts: 11
Karma: 10
Join Date: Sep 2011
Device: none
|
BTW: Thanks for your suggestions!
|
Advert | |
|
03-21-2017, 11:20 AM | #6 |
Grand Sorcerer
Posts: 27,549
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
I don't think "display: none", or "visibility: hidden" are supported in the mobi format. In fact, css isn't supported in the mobi format at all. Now that's not to say that the kindlegen conversion process can't massage certain css input into mobi-compliant markup, but I know of no mobi markup (which is essentially HTML 3.2) that will create hidden text that's still searchable. In all likelihood, "display: none" (as well as "visibilty: hidden") will simply cause the text to be left out of the mobi markup entirely after conversion. In short: I strongly suspect that invisible text that can still be searched is simply not possible in the older mobi-only format. But I could be wrong. Is an img tag's alt text searchable in mobi?
Last edited by DiapDealer; 03-21-2017 at 11:28 AM. |
03-22-2017, 07:55 AM | #7 |
Grand Sorcerer
Posts: 5,584
Karma: 22735033
Join Date: Dec 2010
Device: Kindle PW2
|
Based on my informal tests, img tag alt text is not searchable in EPUB and MOBI7/AZW3 (tested with ADE 1.7-4.5, Mobipocket Reader, the Kindle for PC app and my PW2.)
I don't think that there's any mainstream epub/mobi app out there that actually supports img tag alt attributes. (Alt attribute values might be read by DAISY compliant apps with TTS support.) |
03-22-2017, 10:24 AM | #8 |
Grand Sorcerer
Posts: 6,496
Karma: 84420419
Join Date: Nov 2011
Location: Tampa Bay, Florida
Device: Kindles
|
Most Kindle books are delivered by Amazon in KFX format these days. Based on my testing with Kindle Previewer 3, in conversion to KFX hidden text and image alt text is discarded and so will be unavailable for searching or TTS.
Edit: I was wrong. I retested and found that the alt text for images is actually preserved in KFX. I do not know if it is actually used for anything. Last edited by jhowell; 03-22-2017 at 03:26 PM. Reason: Correction |
03-26-2017, 05:44 PM | #9 |
Junior Member
Posts: 8
Karma: 208038
Join Date: Mar 2016
Device: Too many to name
|
|
Tags |
hidden text, image & text |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Preparing fonts for eInk devices | GERGE | General Discussions | 24 | 05-27-2015 08:04 AM |
Is it possible to create hidden, searchable highlightable text? | Bilingual | ePub | 11 | 05-05-2015 05:14 AM |
colour eink devices - who cares??? | mpd123 | General Discussions | 47 | 11-07-2011 12:16 AM |
PDF Conversion doesn't see hidden text | Bearbait | Conversion | 3 | 02-18-2011 02:56 PM |
PDFs and Hidden Text Layers | aidren | enTourage Archive | 4 | 04-14-2010 01:23 PM |