[pdftex] display unicode string with \pdfannot

Suman_Tripathy Suman_Tripathy at satyam.com
Fri Aug 29 15:16:18 CEST 2008


Thank you for reply. It works though my hyperref is old. I missed \PreloadUnicodePage previously.
Thanks & Regards,
Suman

-----Original Message-----
From: pdftex-bounces at tug.org [mailto:pdftex-bounces at tug.org] On Behalf Of Heiko Oberdiek
Sent: Friday, August 29, 2008 5:58 PM
To: pdftex at tug.org
Subject: Re: [pdftex] display unicode string with \pdfannot

On Fri, Aug 29, 2008 at 01:35:28PM +0530, Suman_Tripathy wrote:

> The problem is I cannot use
> \pdfstringdef\ContentsString{Phrase Code = \textcopyright\texttrademark}
> I get the string from database which contains some Unicode characters.

You haven't tried it or your hyperref is too old.
\pdfstringdef implements some shortcuts from UTF-8 using
LaTeX's utf8.def or utf8x.def of package ucs.

> So I cannot use  \textcopyright etc. Instead I will get something like
> "abc{Unicode for copyright}" string. If I directly use Unicode with
> hyperref it does not work and gives the same error \PrerenderUnicode
> etc....

\documentclass{article}
\let\OrgShow\show
\usepackage{ucs}
\AtBeginDocument{\let\show\OrgShow}
\usepackage[utf8x]{inputenc}
\PreloadUnicodePage{0}
\PreloadUnicodePage{33}
\usepackage[unicode]{hyperref}[2006/08/01]
\begin{document}
Hi
\pdfstringdef\ContentsString{Phrase Code = ^^c2^^a9^^e2^^84^^a2}
\pdfannot{%
  /Subtype/Square%
  /Border[0 0 .1]%
  /C[0 0 1]%
  /T(BoilerPlate)%
  /Contents(\ContentsString)%
}
\end{document}

Yours sincerely
  Heiko <oberdiek at uni-freiburg.de>
--
_______________________________________________
pdftex mailing list
pdftex at tug.org
http://tug.org/mailman/listinfo/pdftex


DISCLAIMER:
This email (including any attachments) is intended for the sole use of the intended recipient/s and may contain material that is CONFIDENTIAL AND PRIVATE COMPANY INFORMATION. Any review or reliance by others or copying or distribution or forwarding of any or all of the contents in this message is STRICTLY PROHIBITED. If you are not the intended recipient, please contact the sender by email and delete all copies; your cooperation in this regard is appreciated.


More information about the pdftex mailing list