Exemplo n.º 1
0
        public override void Write(ExtendedPdfOutput output)
        {
            this.Dictionary["Type"]             = (IPdfObject) new PdfName("XObject");
            this.Dictionary["Subtype"]          = (IPdfObject) new PdfName("Image");
            this.Dictionary["Width"]            = (IPdfObject) new PdfInt(this.Width);
            this.Dictionary["Height"]           = (IPdfObject) new PdfInt(this.Height);
            this.Dictionary["ColorSpace"]       = (IPdfObject) new PdfName("DeviceRGB");
            this.Dictionary["BitsPerComponent"] = (IPdfObject) new PdfInt(8);
            int width  = this.Width;
            int height = this.Height;

            byte[] data = new byte[3];
            this.ibitmap_0.LockBits();
            try
            {
                for (int y = 0; y < height; ++y)
                {
                    for (int x = 0; x < width; ++x)
                    {
                        int pixel = this.GetPixel(x, y);
                        data[0] = (byte)(pixel >> 16 & (int)byte.MaxValue);
                        data[1] = (byte)(pixel >> 8 & (int)byte.MaxValue);
                        data[2] = (byte)(pixel & (int)byte.MaxValue);
                        this.XOut.Write(data);
                    }
                }
            }
            finally
            {
                this.ibitmap_0.UnlockBits();
            }
            base.Write(output);
        }
Exemplo n.º 2
0
 public void Write(ExtendedPdfOutput output)
 {
     output.Write("[");
     output.Write(ExtendedPdfOutput.ToPdfHexadecimal(this.CreatedPart));
     output.Write(" ");
     output.Write(ExtendedPdfOutput.ToPdfHexadecimal(this.ModifiedPart));
     output.WriteLine("]");
 }
Exemplo n.º 3
0
 public void Write(ExtendedPdfOutput output)
 {
     output.Write("[");
     output.Write(this.StartCID.ToString((IFormatProvider)CultureInfo.InvariantCulture));
     output.Write(" [");
     foreach (IPdfObject pdfObject in (ActiveList <IPdfObject>) this.Array)
     {
         output.Write(" ");
         output.Write(pdfObject);
     }
     output.Write(" ]]");
 }
Exemplo n.º 4
0
 public void Write(ExtendedPdfOutput output)
 {
     output.Write("[");
     if (this.Count > 0)
     {
         output.Write(this[0]);
         for (int index = 1; index < this.Count; ++index)
         {
             output.Write(" ");
             output.Write(this[index]);
         }
     }
     output.Write("]");
 }
Exemplo n.º 5
0
        public virtual void Write(ExtendedPdfOutput output)
        {
            byte[] numArray = ((IPdfOutput)output).UseFilters ? this.FilteredData : this.Data;
            if (numArray == null)
            {
                throw new InvalidOperationException("No data for stream.");
            }
            PdfDictionary pdfDictionary = this.method_1(numArray, !((IPdfOutput)output).UseFilters);

            output.WriteLine((IPdfObject)pdfDictionary);
            output.WriteLine("stream");
            output.WriteLine(numArray);
            output.Write("endstream");
        }
Exemplo n.º 6
0
        public void Write(ExtendedPdfOutput output)
        {
            string        str           = this.Value;
            StringBuilder stringBuilder = new StringBuilder(this.pdfLiteralString_0.Value.Length * 2 + 2);

            stringBuilder.Append('þ');
            stringBuilder.Append('ÿ');
            foreach (char ch in this.pdfLiteralString_0.Value)
            {
                stringBuilder.Append(PdfTextString.smethod_0((ushort)ch));
            }
            this.Value = stringBuilder.ToString();
            this.pdfLiteralString_0.Write(output);
            this.Value = str;
        }
Exemplo n.º 7
0
        public void Write(ExtendedPdfOutput output)
        {
            output.Write("<<");
            string data = this.Count > 1 ? "\n" : " ";

            output.Write(data);
            foreach (string key in this.Keys)
            {
                output.Write("/" + key + " ");
                IPdfObject pdfObject = this[key];
                output.Write(pdfObject);
                output.Write(data);
            }
            output.Write(">>");
        }
Exemplo n.º 8
0
 public void Write(ExtendedPdfOutput output)
 {
     if (this.bool_0)
     {
         StringBuilder stringBuilder = new StringBuilder(this.string_0.Length * 2);
         for (int index = 0; index < this.string_0.Length; ++index)
         {
             stringBuilder.Append(((byte)this.string_0[index]).ToString("x2"));
         }
         output.Write("<" + (object)stringBuilder + ">");
     }
     else
     {
         string str = this.string_0.Replace("\\", "\\\\").Replace("(", "\\(").Replace(")", "\\)");
         output.Write("(" + str + ")");
     }
 }
Exemplo n.º 9
0
        public override void Write(ExtendedPdfOutput output)
        {
            this.Dictionary["Type"]             = (IPdfObject) new PdfName("XObject");
            this.Dictionary["Subtype"]          = (IPdfObject) new PdfName("Image");
            this.Dictionary["Width"]            = (IPdfObject) new PdfInt(this.Width);
            this.Dictionary["Height"]           = (IPdfObject) new PdfInt(this.Height);
            this.Dictionary["ColorSpace"]       = (IPdfObject) new PdfName("DeviceGray");
            this.Dictionary["BitsPerComponent"] = (IPdfObject) new PdfInt(8);
            int width  = this.Width;
            int height = this.Height;

            this.stream_0.Position = 0L;
            byte[] data = new byte[1];
            for (int index1 = 0; index1 < height; ++index1)
            {
                for (int index2 = 0; index2 < width; ++index2)
                {
                    data[0] = (byte)this.stream_0.ReadByte();
                    this.XOut.Write(data);
                }
            }
            base.Write(output);
        }
Exemplo n.º 10
0
 public override void Write(ExtendedPdfOutput output)
 {
     this.method_2();
     base.Write(output);
 }
Exemplo n.º 11
0
 public void Write(ExtendedPdfOutput output)
 {
     output.Write(this.int_0.ToString((IFormatProvider)CultureInfo.InvariantCulture));
 }
Exemplo n.º 12
0
 public PdfContentStream()
 {
     this.stream = new MemoryStream();
     this.extendedPdfOutput_0 = new ExtendedPdfOutput((IPdfOutput)this);
 }