Print Page | Close Window

Unicode Metadata

Printed From: Debenu Quick PDF Library - PDF SDK Community Forum
Category: For Users of the Library
Forum Name: I need help - I can help
Forum Description: Problems and solutions while programming with the Debenu Quick PDF Library and Debenu PDF Viewer SDK
URL: http://www.quickpdf.org/forum/forum_posts.asp?TID=1213
Printed Date: 10 Apr 26 at 4:01AM
Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com


Topic: Unicode Metadata
Posted By: Michel_K17
Subject: Unicode Metadata
Date Posted: 10 Sep 09 at 4:57AM
Hi,

   I'm not sure, but it seems like I am no longer able to write Metadata using unicode text for my Japanese, Chinese etc. customers. Here is my code:

    ' Set Information of PDF
    '-----------------------
    If fUnicodeUser Then
        '1 = Author
        rtn = oPDF.SetInformation(1, oPDF.ToPDFUnicode(Author))
        '2 = Title
        rtn = oPDF.SetInformation(2, oPDF.ToPDFUnicode(Title))
        '3 = Subject
        rtn = oPDF.SetInformation(3, oPDF.ToPDFUnicode(Subject))
        '4 = Keywords
        rtn = oPDF.SetInformation(4, oPDF.ToPDFUnicode(Keywords))

    Else
        '1 = Author
        rtn = oPDF.SetInformation(1, Author)
        '2 = Title
        rtn = oPDF.SetInformation(2, Title)
        '3 = Subject
        rtn = oPDF.SetInformation(3, Subject)
        '4 = Keywords
        rtn = oPDF.SetInformation(4, Keywords)

    End If

   When I recover the data from QuickPDF, it looks OK, but when I view the information from within Adobe's Reader or FoxIt's Reader, I see garbage.

   Here is an example of what I set and recover using QuickPDF:
  • Author -サルエルパンツ
   Appears like this in PDF Reader and FoxIt Reader (with Windows set to Japanese and the Reader too):
  • Author -ƒTƒ‹ƒGƒ‹ƒpƒ“ƒc
   Any ideas?


-------------
Michel



Replies:
Posted By: shimax
Date Posted: 04 Oct 09 at 10:37AM
I am a Japenese and I am also annoyed by the samge kind of characters garbage.
 
The byte order of サムエルパンツ in Shift_JIS(most common Japanese character codes) is
0x83 54 83 80 83 47 83 8B 83 70 83 93 83 63. If these byte order is interpreted as Windows-1252, the output turns out to be ƒTƒ‹ƒGƒ‹ƒpƒ“ƒc.
 
There is the same kind of phonomena in both SetFormFieldValue and AddGlobalJavaScript as far as I test the trial: 7.1.6.



Print Page | Close Window

Forum Software by Web Wiz Forums® version 11.01 - http://www.webwizforums.com
Copyright ©2001-2014 Web Wiz Ltd. - http://www.webwiz.co.uk