Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Readers > Amazon Kindle

Notices

Reply
 
Thread Tools Search this Thread
Old 02-10-2011, 10:11 PM   #1
turygo
Junior Member
turygo began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Feb 2011
Device: kindle 3
Unhappy How to display PDF metadata in kindle3?

kindle 3 will display mobil file's metadata in home screen,To my disappointment it won't display PDF's metadata.Instead it only display PDF's filename.So does txt file.
How does kindle support metadata of other filetype expect mobil?txt file don't have metadata but Pdf does. I checked Pdf files and their metadatas were correct.
Anyone can help me ?
turygo is offline   Reply With Quote
Old 02-20-2011, 01:54 AM   #2
tomsem
Grand Sorcerer
tomsem ought to be getting tired of karma fortunes by now.tomsem ought to be getting tired of karma fortunes by now.tomsem ought to be getting tired of karma fortunes by now.tomsem ought to be getting tired of karma fortunes by now.tomsem ought to be getting tired of karma fortunes by now.tomsem ought to be getting tired of karma fortunes by now.tomsem ought to be getting tired of karma fortunes by now.tomsem ought to be getting tired of karma fortunes by now.tomsem ought to be getting tired of karma fortunes by now.tomsem ought to be getting tired of karma fortunes by now.tomsem ought to be getting tired of karma fortunes by now.
 
Posts: 6,905
Karma: 27013865
Join Date: Apr 2009
Location: USA
Device: iPhone 15PM, Kindle Scribe, iPad mini 6, PocketBook InkPad Color 3
Sometimes it will display Title and Author from the metadata. But sometimes it won't. I've never been able to detect a pattern to it. I've reported as much to kindle-feedback, but obviously it is a low priority for them.

Most readers are really weak about displaying metadata, and Kindle's no exception.
tomsem is offline   Reply With Quote
Advert
Old 02-22-2011, 01:01 AM   #3
jgreely
Junior Member
jgreely began at the beginning.
 
Posts: 3
Karma: 18
Join Date: Feb 2011
Device: Sony Reader 505, Kindle 3
In my tests, it will reliably pick up the metadata if the PDF version is below 1.5; for documents saved as version 1.5 or newer, it will only work if the metadata object is not part of a compressed object stream. The Kindle can display v1.5 PDFs, but the metadata scanner doesn't know how to find the Info dictionary inside of a compressed object stream.

So either save as version 1.3 or 1.4 (which will produce larger files), or add the metadata after the fact with a tool that does an append-only update rather than rewriting the entire file. pdftk does rewrites, Acrobat does appends unless you "Save as".

Basically, if a simple search of the file reveals an uncompressed object containing the strings /Title and /Author (followed by either plain text in () or hex-encoded Unicode text in <>), the Kindle metadata scanner can see them.

-j
jgreely is offline   Reply With Quote
Old 02-25-2011, 06:42 AM   #4
turygo
Junior Member
turygo began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Feb 2011
Device: kindle 3
Quote:
Originally Posted by jgreely View Post
In my tests, it will reliably pick up the metadata if the PDF version is below 1.5; for documents saved as version 1.5 or newer, it will only work if the metadata object is not part of a compressed object stream. The Kindle can display v1.5 PDFs, but the metadata scanner doesn't know how to find the Info dictionary inside of a compressed object stream.

So either save as version 1.3 or 1.4 (which will produce larger files), or add the metadata after the fact with a tool that does an append-only update rather than rewriting the entire file. pdftk does rewrites, Acrobat does appends unless you "Save as".

Basically, if a simple search of the file reveals an uncompressed object containing the strings /Title and /Author (followed by either plain text in () or hex-encoded Unicode text in <>), the Kindle metadata scanner can see them.

-j
Thank you for your replying.And I've tried to save pdf file as older version such as 1.3 and 1.4.But kindle still can't read metadata of pdf correctly.I've also tried to append data by using "Save as" in Acrobat.Unfortunately it didn't work too.
Is there any step I did wrong?Can you send a pdf sample which kindle can read metadata correctly to me?My email is turygo#gmail.com Thank you very much
turygo is offline   Reply With Quote
Old 02-25-2011, 03:54 PM   #5
jgreely
Junior Member
jgreely began at the beginning.
 
Posts: 3
Karma: 18
Join Date: Feb 2011
Device: Sony Reader 505, Kindle 3
Quote:
Originally Posted by turygo View Post
Is there any step I did wrong?
No, it looks like my tests were incomplete. Three hours and a custom append-only update script later, I know a lot more.

I can now state with confidence that the Kindle metadata parser is just a mess. If a non-linearized PDF file was created with metadata in a self-contained Info dictionary that is not part of a compressed object stream, then the author will show up on the main listing page, and the title and author will show up on the detail page. I've only gotten appends to work with Adobe Acrobat Pro 9.x, and only when starting with a v1.3 file, and I'll be damned if I can figure out why I can't replicate that behavior in my script.

A good, working document will have an Info dictionary that looks like this: "<</Title(My Book) /Author(Gary Stu)>>".

The MacOS X built-in print-to-PDF saves as v1.3, but splits the metadata across multiple objects, like this: "17 0 obj (My Book) endobj 18 0 obj (Gary Stu) endobj <</Title 17 0 R /Author 18 0 R>>". This is invisible to a Kindle.

I hadn't hacked PDF files by hand in 17 years, but I was sufficiently annoyed by this mess that I wrote a tool that correctly implements the incremental update spec (PDF Reference v1.7, section 3.4.3-3.4.5 with examples in appendix G.6) to add self-contained metadata objects. Acrobat, MacOS X Preview, and pdftk all see my updated metadata, but the Kindle does not.

Unless I save as v1.3, add the metadata with my script, and then pass the file through pdftk to convert my update to a rewrite! At this point I declared both victory and failure.

My metadata-appending Perl script is available here for anyone who finds it useful.

-j

Last edited by jgreely; 02-25-2011 at 04:09 PM.
jgreely is offline   Reply With Quote
Advert
Reply

Tags
pdf kindle metadata


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Display template values not saved to metadata.calibre meme Devices 2 02-13-2011 01:27 AM
Metadata Display Fabe Sigil 5 10-29-2010 04:07 PM
How to display metadata BTooze Amazon Kindle 7 09-20-2010 06:09 AM
Mobi Metadata and Kindle3 Codetoad13 Calibre 5 09-08-2010 11:03 PM
PDF display of legal texts on kindle3 oecherprinte Amazon Kindle 3 07-30-2010 12:35 PM


All times are GMT -4. The time now is 02:18 PM.


MobileRead.com is a privately owned, operated and funded community.