Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Development

Notices

Reply
 
Thread Tools Search this Thread
Old 02-24-2024, 05:53 PM   #1
pauloney
Junior Member
pauloney began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Jun 2014
Device: None
Strange behaviour of ebook-meta on PDF files

I tried using "ebook-meta" to change the value of metadata entrie in PDF eBook fles and met some strange behaviour that I could not comprehend from the logic pioint of view.
All the example below we produce a sample file with xelatex.

1- Touching the file with "ebook-meta" changes the value of the
"Producer" from xdvipdfmx to XeTeX.

------
xelatex hello.tex

pdfinfo evince Acrobat Chrome
-------------------------------------------------
Creator: XeTeX XeTeX XeTeX XeTeX
Producer: xdvipdfmx xdvipdfmx xdvipdfmx xdvipdfmx

ebook-meta -t 'This is a title' hello.pdf

pdfinfo evince Acrobat Chrome
---------------------------------------------
Creator: XeTeX XeTeX XeTeX XeTeX
Producer: XeTeX XeTeX XeTeX XeTeX

Which is strange, because changing a title should not change
the producer, and the changer should not be XeTeX.
------

2- This command changes TWO metadata values:

------
xelatex hello.tex

pdfinfo evince Acrobat Chrome
-------------------------------------------------
Creator: XeTeX XeTeX XeTeX XeTeX
Producer: xdvipdfmx xdvipdfmx xdvipdfmx xdvipdfmx

ebook-meta -k 'BinB' hello.pdf

pdfinfo evince Acrobat Chrome
---------------------------------------------
Creator: BinB BinB BinB BinB
Producer: BinB BinB BinB BinB

Which is again strange because -k changes values of BOTH metadata entries.
------


3- In this next example, changing a "tag" makes a change in the "producer"

--------------------------------------
xelatex hello.tex

pdfinfo evince Acrobat Chrome
-------------------------------------------------
Creator: XeTeX XeTeX XeTeX XeTeX
Producer: xdvipdfmx xdvipdfmx xdvipdfmx xdvipdfmx

ebook-meta --tags 'This is a tag' hello.pdf

pdfinfo evince Acrobat Chrome
---------------------------------------------
Creator: XeTeX XeTeX XeTeX XeTeX
Producer: XeTeX XeTeX XeTeX XeTeX


Makes the value of the tag above available under the metadata name
"Keywords" as reported in pdfinfo, evince, Adobe Acrobat and Chrome
and changes the value of "Producer" to be the same of "Creator".


4- And finally the most strange of them all:

--------------------------------------
xelatex hello.tex

pdfinfo evince Acrobat Chrome
-------------------------------------------------
Creator: XeTeX XeTeX XeTeX XeTeX
Producer: xdvipdfmx xdvipdfmx xdvipdfmx xdvipdfmx

ebook-meta -c 'Comment' hello.pdf

Makes the value "Comment" to show up under the metadata "Subject"
under evince, but NOT under pdfinfo, Chrome or Acrobat.
pauloney is offline   Reply With Quote
Old 02-24-2024, 11:12 PM   #2
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,860
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
this will likely be because xelatex is producing pdf with messed up /Info dictionary. Use a pdf from a different source. Or run your pdf through pdf2ps and ps2pdf to fix it.
kovidgoyal is offline   Reply With Quote
Reply

Tags
ebook-meta, pdf


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
ebook-meta tool can read but can not set meta for markdown files. The_book Calibre 1 11-10-2020 10:08 AM
files lost, meta data remains chrissydid Library Management 6 02-19-2016 09:10 AM
custom meta-tags at PDF Files Thommynat0r Library Management 0 03-03-2012 08:33 AM
Read Meta-Tags out of EPUB-Files Eternico Calibre 0 08-17-2011 10:37 AM
6.5 PDF Meta import jimbob101 Calibre 4 08-07-2009 03:02 AM


All times are GMT -4. The time now is 12:01 PM.


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