Ejemplo n.º 1
0
 public ExportCellPaintEventArgs(
     GridPdfExportCellElement cell,
     IPdfEditor editor,
     RectangleF rectangle)
     : base(editor, rectangle)
 {
     this.cell = cell;
 }
Ejemplo n.º 2
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);
        }
Ejemplo n.º 3
0
        public void Setup()
        {
            _document = new Mock <IEditablePdfDocument>();
            _trailer  = new PdfTrailer {
                CrossReferenceTableOffset = 10,
                TrailerDictionary         = new PdfDictionary()
            };
            _crossReferenceTable = new PdfCrossReferenceTable
            {
                ObjectOffsets = new Dictionary <int, int>(),
                Offset        = 10
            };

            _document.SetupGet(x => x.CrossReferenceTable).Returns(_crossReferenceTable);
            _document.SetupGet(x => x.Encoding).Returns(Encoding.UTF8);
            _document.SetupGet(x => x.Trailer).Returns(_trailer);

            _pdfEditor = new PdfEditor(_document.Object);
        }
Ejemplo n.º 4
0
 public ExportEventArgs(IPdfEditor editor, RectangleF rectangle)
 {
     this.editor    = editor;
     this.rectangle = rectangle;
 }