示例#1
0
        public PdfXObjectStream(Image image, PdfName name)
            : base()
        {
            this.image = image;
            this.name = name;
            this.width = new PdfName("Width");
            this.height = new PdfName("Height");
            this.filter = new PdfName("Filter");

            image.Save(base.s.BaseStream, image.RawFormat);
            s.Write("\n");

            // Add the elements for an image XObject to the stream dictionary
            this.streamDictionary.Add(type, new PdfName("XObject"));
            this.streamDictionary.Add(subType, new PdfName("Image"));
            this.streamDictionary.Add(new PdfName("Name"), name);
            this.streamDictionary.Add(width, new PdfInt(image.Width));
            this.streamDictionary.Add(height, new PdfInt(image.Height));
            this.streamDictionary.Add(new PdfName("BitsPerComponent"), new PdfInt(8)); //TODO: Remove test
            this.streamDictionary.Add(filter, new PdfName("DCTDecode"));
            this.streamDictionary.Add(new PdfName("ColorSpace"), new PdfName("DeviceCMYK"));
        }
示例#2
0
 public void Remove(PdfName key)
 {
     ((IDictionary)this).Remove(key);
 }
示例#3
0
 public void Add(PdfName key, PdfObject value)
 {
     ((IDictionary)this).Add(key, value);
 }
示例#4
0
 public bool Contains(PdfName key)
 {
     return ((IDictionary)this).Contains(key);
 }
示例#5
0
 public PdfObject this[PdfName key]
 {
     get { return (PdfObject)((IDictionary)this)[key]; }
     set { ((IDictionary)this)[key] = value; }
 }