示例#1
0
        public void Collect(XRef xref)
        {
            if (ObjNo != -1)
            {
                return;
            }

            Entry entry = new Entry(0, 0);

            entry.Object = this;
            xref.Entries.Add(entry);
            ObjNo = xref.Entries.Count - 1;

            int count = _items.Count;

            for (int i = 0; i < count; ++i)
            {
                KeyValuePair <string, IPDFObject> keyval = _items[i];
                if (keyval.Value is PDFLink)
                {
                    IPDFObject value = (keyval.Value as PDFLink).GetValue();
                    if (value != null)
                    {
                        _items[i] = new KeyValuePair <string, IPDFObject>(keyval.Key, value);
                    }
                    //_items[i] = new KeyValuePair<string, IPDFObject>(keyval.Key, (keyval.Value as PDFLink).GetValue());
                }
                _items[i].Value.Collect(xref);
            }
        }
示例#2
0
 public void Collect(XRef xref)
 {
     for (int i = 0; i < Count; ++i)
     {
         IPDFObject item = getItem(i);
         item.Collect(xref);
     }
 }
示例#3
0
 internal Lexer(Stream stream, XRef xref, Encryptor encryptor, int bufferSize)
 {
     _stream         = stream;
     _bufferedStream = new MemoryStream(bufferSize);
     _length         = _stream.Length;
     _xref           = xref;
     _encryptor      = encryptor;
     _lastParsedByte = 0;
 }
示例#4
0
        public void Collect(XRef xref)
        {
            if (ObjNo != -1)
            {
                return;
            }

            Entry entry = new Entry(0, 0);

            entry.Object = this;
            xref.Entries.Add(entry);

            ObjNo = xref.Entries.Count - 1;

            string[] keys = _dictionary.GetKeys();
            for (int i = 0; i < keys.Length; ++i)
            {
                IPDFObject item = _dictionary[keys[i]];
                item.Collect(xref);
            }
        }
示例#5
0
 public DocumentParser(Stream stream)
 {
     _xref  = new XRef();
     _lexer = new Lexer(stream, _xref, null, 4096);
     _xref.SetLexer(_lexer);
 }
示例#6
0
 public void Collect(XRef xref)
 {
 }
示例#7
0
        //private bool _forced = false;

        public DocumentWriter(XRef xref, Compression compression)
        {
            _xref        = xref;
            _compression = compression;
        }