[pdftex] line breaking in pdfannot

kuzn at htsc.mephi.ru kuzn at htsc.mephi.ru
Tue Mar 24 12:15:02 CET 2009


Dear pdftex experts,

Is it possible to break line in the  \pdfannot ?
As written in the pdftex manual:
the <general text> is inserted as raw pdf code to the contents of annotation.
I unsuccessfully tried to break line using both tex '\\' command (assuming
that line breaking is provided by TeX) and hexadecimal or octal newline-code
as well as escaped newline symbol '\n' (assuming that the string is a raw
pdf code)

The following command

\def\tip#1#2{%
  \pdfannot width 0pt height 0pt depth 0pt {
    /Subtype /Text
    /Open false
    /T (sample)
    /Contents (#1)
    /NM (ctip Text 0)
	}%
}

used with pdflatex provides the following output in annotation

\tip{a
b}       -> a b

\tip{a\n b}     % newline recommended by PDF 1.7
! Undefined control sequence.
<argument> a\n

\tip{a\\ b}     % TeX newline
! Undefined control sequence.
\\  ->\let \reserved at e
                       \relax \let \reserved at f \relax \@ifstar {\let
\reserv...


\tip{a<0A> b}     % Hexadecimal code for line feed and carriage return
    -> a<0A0D> b


\tip{a(\012) b}     % Octal code for line feed and carriage return
! Undefined control sequence.
<argument> a(\012\0

What is wrong?

Thanks in advance,
Alexey Kuznetsov




More information about the pdftex mailing list