Beispiel #1
0
 public static void UnicodeWrite(TPdfStream DataStream, string Text, TPdfFont aFont)
 {
     byte[] Buffer = null;
     Buffer = aFont.EncodeString(Text);
     Byte[] Buff2 = TPdfStringRecord.EscapeString(Buffer);
     DataStream.Write(Buff2);
 }
Beispiel #2
0
        internal TLinkAnnot(real ax1, real ay1, real aWidth, real aHeight, string URL) :
            base(ax1, ay1, aWidth, aHeight)
        {
            //only 7-bits allowed.

            byte[] bt = TPdfStringRecord.EscapeString(Encoding.ASCII.GetBytes(URL));
            FURL = TPdfTokens.GetString(TPdfToken.OpenString) +
                   Encoding.ASCII.GetString(bt, 0, bt.Length) +
                   TPdfTokens.GetString(TPdfToken.CloseString);
        }
Beispiel #3
0
 public static void UnicodeWrite(TPdfStream DataStream, string Text, bool NeedsUnicode, string UnicodePrefix)
 {
     byte[] Buffer = null;
     if (NeedsUnicode)
     {
         Buffer = Encoding.BigEndianUnicode.GetBytes(UnicodePrefix + Text);
     }
     else
     {
         Buffer = Coder.GetBytes(Text);
     }
     Byte[] Buff2 = TPdfStringRecord.EscapeString(Buffer);
     DataStream.Write(Buff2);
 }