Esempio n. 1
0
        internal InMemoryPdf(byte[] data, IPdfReader reader, IPdfEditor editor)
        {
            Encoding.RegisterProvider(CodePagesEncodingProvider.Instance);
            _encoding = Encoding.GetEncoding(1252);
            _keywords = new PdfKeywordBytes(_encoding);

            _data                = data;
            _reader              = reader ?? new PdfReader(this);
            _editor              = editor ?? new PdfEditor(this);
            _length              = data.Length;
            Version              = _reader.ReadVersion();
            _trailer             = _reader.ReadTrailer();
            _crossReferenceTable = _reader.ReadCrossReferenceTable(_trailer);

            Root = (PdfDictionary)_reader.ReadObject(_trailer.Root);
            Info = (PdfDictionary)_reader.ReadObject(_trailer.Info);
        }
Esempio n. 2
0
 PdfObject IEditablePdfDocument.ReadObject(PdfIndirectReference reference) => _reader.ReadObject(reference);