Beispiel #1
0
        /// <summary>
        /// Write Pdf object to Pdf writer
        /// </summary>
        /// <param name="writer">Pdf Writer</param>
        public override void ToPdf(PdfWriter writer)
        {
            PdfStreamWriter psw = writer.Psw;

            psw.WriteByte(0x5b);
            this.WriteContent(writer);
            psw.WriteByte(0x5d);
        }
Beispiel #2
0
        /// <summary>
        /// Write Pdf object to Pdf writer
        /// </summary>
        /// <param name="writer">Pdf Writer</param>
        public override void ToPdf(PdfWriter writer)
        {
            PdfStreamWriter psw = writer.Psw;

            psw.WriteByte(60).WriteByte(60);
            foreach (KeyValuePair <PdfName, PdfObjectBase> pair in this.dic)
            {
                pair.Key.ToPdf(writer);
                psw.WriteSpace();
                writer.WriteObject(pair.Value);
            }
            psw.WriteByte(0x3e).WriteByte(0x3e);
        }
Beispiel #3
0
 /// <summary>
 /// Writes to.
 /// </summary>
 /// <param name="psw">The PSW.</param>
 internal void WriteTo(PdfStreamWriter psw)
 {
     if (this.isHexMode)
     {
         psw.WriteByte(60);
         byte[] byteValue = this.byteValue;
         for (int i = 0; i < byteValue.Length; i++)
         {
             psw.WriteString(((byte)byteValue[i]).ToString("X2"));
         }
         psw.WriteByte(0x3e);
     }
     else
     {
         psw.WriteByte(40);
         psw.WriteBytes(this.GetEscapedBytes());
         psw.WriteByte(0x29);
     }
 }
Beispiel #4
0
        /// <summary>
        /// Writes to.
        /// </summary>
        /// <param name="psw">The PSW.</param>
        internal void WriteTo(PdfStreamWriter psw)
        {
            string name = this.name;

            if (!this.safeName)
            {
                name = FixName(name);
            }
            psw.WriteByte(0x2f).WriteString(name);
        }
Beispiel #5
0
 /// <summary>
 /// Writes the cross block.
 /// </summary>
 /// <param name="index">The index.</param>
 /// <param name="count">The count.</param>
 /// <param name="psw">The PSW.</param>
 private void WriteCrossBlock(int index, int count, PdfStreamWriter psw)
 {
     psw.WriteInt(base[index].ObjectIndex).WriteSpace().WriteInt(count);
     for (int i = index; i < count; i++)
     {
         psw.WriteLineEnd();
         psw.WriteString(((long)base[i].Offset).ToString("0000000000", CultureInfo.InvariantCulture.NumberFormat));
         psw.WriteSpace();
         psw.WriteString(((int)base[i].Generation).ToString("00000", CultureInfo.InvariantCulture.NumberFormat));
         psw.WriteSpace();
         psw.WriteByte(base[i].InUse ? nf[0] : nf[1]);
     }
 }