Beispiel #1
0
        internal CorePDFStream(CoreDocument doc, Stream str, long pos, CorePDFDict dict)
        {
            long num1;

            this.mRawStream   = null;
            this.mEncId       = -1;
            this.mEncGen      = -1;
            this.mDict        = dict;
            this.mDict.Parent = this;
            try
            {
                if (this.FileSpec != null)
                {
                    if (!this.FileSpec.IsValid)
                    {
                        return;
                    }
                    if (doc != null)
                    {
                        if (doc.mExtHandler != null)
                        {
                            this.mRawStream = doc.mExtHandler.GetReadStream(doc, this.FileSpec);
                            return;
                        }
                        this.mRawStream = Stream.Null;
                        return;
                    }
                    this.mRawStream = Stream.Null;
                    return;
                }
                num1            = ((PDFInteger)dict["Length"].Direct).Value;
                this.mRawStream = new SubStream(str, pos, num1);
                str.Position    = (pos + num1);
            }
            catch (InvalidCastException)
            {
                throw new PDFSyntaxException("Invalid length value in stream dictionary");
            }
            catch (NullReferenceException)
            {
                throw new PDFSyntaxException("No length value in stream dictionary");
            }
            catch (IOException exception1)
            {
                throw new PDFSyntaxException(string.Format("Error opening data stream: {S:O}}", exception1.Message));
            }
        }
Beispiel #2
0
 // Methods
 internal XRefEnumerator(CoreDocument doc)
 {
     this.mDoc  = doc;
     this.mCurr = 0;
 }
 // Methods
 internal CoreIndirectCollection(CoreDocument doc)
 {
     this.mDoc = doc;
 }
Beispiel #4
0
 internal CorePDFIndirect(CoreDocument doc, int id)
 {
     this.mDoc = doc;
     this.mId  = id;
 }