[pdftex] display unicode string with \pdfannot

Vasile Gaburici vgaburici at gmail.com
Thu Aug 28 15:25:31 CEST 2008


Of course it doesn't work because \pdfannot takes raw PDF as input.
LICRs, which is what the ucs package produces for any char > 127, will
not do what you think. For instance:

\pdfannot{/Subtype /Square /Border [ 0 0 0.1 ] /C [0 0 1] %
/T (Some title) /Contents (My text: \backslash) }

Will produce a box with this contents:

My Text: delimiter "026E30F

You need to change catcodes so you can output UTF-16BE unmolested,
which is what PDF needs for *its* strings; see section 3.8.1 in PDF
1.7 reference.

On Thu, Aug 28, 2008 at 3:15 PM, Suman_Tripathy
<Suman_Tripathy at satyam.com> wrote:
> Please check my sample code. It does not work. I am attaching the output as well. The two question marks are for "degree" and "Registered Trade Mark" symbol.Unicode for them is 176 and 174 respectively. I tried with \PreloadUnicodePage{0} as well. It did not work.
>
> \documentclass{article}
> \usepackage{amsmath}
> \usepackage{ucs}
> %\PreloadUnicodePage{0}
> \PrerenderUnicode{??}
> \usepackage[utf8x]{inputenc}
> %\PrerenderUnicode{??}
> \begin{document}
> \section{Introduction}
> Hi
> \pdfannot{/Subtype /Square /Border [ 0 0 0.1] /C [0 0 1]
> /T (BoilerPlate) /Contents (Phrase Code =?? )}
> \end{document}
>
> Thanks & Regards,
> Suman Tripathy
>
> -----Original Message-----
> From: Vasile Gaburici [mailto:vgaburici at gmail.com]
> Sent: Monday, August 25, 2008 12:28 PM
> To: Suman_Tripathy
> Cc: pdftex at tug.org
> Subject: Re: [pdftex] display unicode string with \pdfannot
>
> On Mon, Aug 25, 2008 at 8:03 AM, Suman_Tripathy
> <Suman_Tripathy at satyam.com> wrote:
>> I am trying to get a simple thing solved for quite long time.Can you help please?
>>
>> Can I display unicode string with \pdfannot ?
>>
>> unicode is working in the pdf for normal text display. But I am not able to display string which contains unicode in pop-up notes by using \pdfannot.It gives error as "Please insert PrerenderUnicode{°} into preamble".
>
> Why don't you do that? You need to do it to overcome a limitation of
> the ucs package. Please refer to page 5 of the documentation of ucs
> (http://www.ctan.org/get/macros/latex/contrib/unicode/ucs.ps.gz)
>
>>
>> Thanks & Regards,
>>
>> Suman Tripathy
>
> 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