03-03-2010, 04:28 PM | #1 |
Addict
Posts: 244
Karma: 124
Join Date: Feb 2010
Device: none
|
Non-English / Unicode PDF metadata?
How do I add/edit and save non-English/Unicode PDF metadata? I tried some PDF metadata editor but none worked.
|
03-03-2010, 04:36 PM | #2 |
Wizard
Posts: 1,745
Karma: 4382514
Join Date: Jul 2006
Location: Somewhere on earth
Device: Onyx Boox Tab X
|
|
Advert | |
|
03-03-2010, 04:52 PM | #3 |
Addict
Posts: 244
Karma: 124
Join Date: Feb 2010
Device: none
|
How do I specify the encoding of the metadata to be UTF16?
|
03-03-2010, 05:46 PM | #4 |
Wizard
Posts: 1,745
Karma: 4382514
Join Date: Jul 2006
Location: Somewhere on earth
Device: Onyx Boox Tab X
|
|
03-03-2010, 07:13 PM | #5 |
Addict
Posts: 244
Karma: 124
Join Date: Feb 2010
Device: none
|
Someone can recommend any metadata editor which can specify the encoding?
|
Advert | |
|
03-03-2010, 08:12 PM | #6 |
Wizard
Posts: 1,213
Karma: 12890
Join Date: Feb 2009
Location: Amherst, Massachusetts, USA
Device: Sony PRS-505
|
I just tested with calibre's ebook-meta command line program, and it did fine with unicode characters.
E.g., I put in: ebook-meta Temp.pdf --title="ἀἐἠ" And sure, enough, the title became ἀἐἠ. Of course, you may have a problem if your shell/terminal/command line prompt doesn't support unicode input... I imagine you could do it through calibre's GUI too, though for some reason, calibre's GUI confuses me more than using the command line does (and doesn't give me control over the file name and where it goes, which is frustrating)... so I prefer to use the command line tools. Your mileage may vary. Last edited by frabjous; 03-03-2010 at 08:16 PM. |
03-03-2010, 08:47 PM | #7 |
Wizard
Posts: 1,745
Karma: 4382514
Join Date: Jul 2006
Location: Somewhere on earth
Device: Onyx Boox Tab X
|
|
03-16-2010, 07:52 PM | #8 | |
Addict
Posts: 244
Karma: 124
Join Date: Feb 2010
Device: none
|
Quote:
I will just post it here in case someone need it: Code:
#!/bin/perl use utf8; use Encode; binmode(STDOUT, ":utf8"); $numArgs = $#ARGV + 1; if ( $numArgs > 1 ) { open(INFOFILE, "> info.tmp") or die "Cannot open ./info.tmp!\n"; print INFOFILE "InfoKey: Title\n"; print INFOFILE "InfoValue: "; $title = $ARGV[1]; $title = decode('gb2312', $title); for $char ( split //, $title ) { print INFOFILE "&#",ord($char),";"; } print INFOFILE "\n"; print INFOFILE "InfoKey: Author\n"; print INFOFILE "InfoValue: "; $author = $ARGV[2]; $author = decode('gb2312', $author); for $char ( split //, $author ) { print INFOFILE "&#",ord($char),";"; } print INFOFILE "\n"; close(INFOFILE); system("pdftk $ARGV[0] update_info info.tmp output $ARGV[0].update.pdf"); system("rm info.tmp"); } else { print "Usage: pdfmeta <in.pdf> <title> [author]"; } |
|
Thread Tools | Search this Thread |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Metadata to specify default language is English? | kjk | ePub | 4 | 06-22-2010 04:05 PM |
How to create non-embedded Unicode EPUB,LRF,TXT,RTF,PDF | alexmobile | Sony Reader | 1 | 09-23-2009 10:04 PM |
English News RSS PDF | yunhaid | iRex | 8 | 05-27-2007 10:06 PM |
English News RSS PDF | yunhaid | Sony Reader | 0 | 05-24-2007 09:30 PM |
Non-English PDF problem? | each | Sony Reader | 8 | 10-06-2006 06:55 AM |