pdf with internationnal title

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
broucaries
Posts: 467
Joined: 2008-12-21T11:51:10-07:00

pdf with internationnal title

Post by broucaries »

Title seems really bad (from
ttps://bugs.launchpad.net/ubuntu/+source/imagemagick/+bug/667409
)

convert -compress jpeg -quality 85 rose: documentåäöÅÄÖ.pdf
pdfinfo documentåäöÅÄÖ.pdf
Title: documentåäöÖ×Ì
Producer: ImageMagick 6.7.7-10 2012-06-29 Q16 http://www.imagemagick.org
CreationDate: Sun Jul 22 00:20:29 2012
ModDate: Sun Jul 22 00:20:29 2012
Tagged: no
Pages: 1
Encrypted: no
Page size: 70 x 46 pts
File size: 4741 bytes
Optimized: no
PDF version: 1.3
wasow
Posts: 5
Joined: 2010-09-29T07:22:28-07:00
Authentication code: 8675308

Re: pdf with internationnal title

Post by wasow »

Confirms!

Code: Select all

$ echo $LANG
ru_RU.UTF-8
$ convert Документы.jpg Документы.pdf
gives pdf with title "Документы"

Code: Select all

$ echo 'ÐокÑменÑÑ' | iconv -f utf-8 -t iso-8859-1
Документы
Why pdf title is converted from iso-8859-1 to utf-8???

This is a huge problem, because there no any workarounds!
Petr
Posts: 51
Joined: 2010-01-07T09:37:51-07:00
Authentication code: 8675309

Re: pdf with internationnal title

Post by Petr »

Hello,

I got a similar bug report, see:

https://bugzilla.suse.com/show_bug.cgi?id=867943

Basically, the title (string inside parenthesis) is expected to be UTF16BE, if I understand correctly. Other way to fix would be to not write /Title at all. What do you think?
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: pdf with internationnal title

Post by magick »

International titles are supported in ImageMagick 6.9.3-0, the current release. To retrofit the patch, see coders/pdf.c.
Petr
Posts: 51
Joined: 2010-01-07T09:37:51-07:00
Authentication code: 8675309

Re: pdf with internationnal title

Post by Petr »

Thank you!
Post Reply