void InitDocument(PdfDocument document, PipelineFactory factory) { var globalStats = factory.CreateGlobalInstance <PipelineDocumentStats>(); var page = document.GetPage(1); var rect = page.GetPageSize(); globalStats.X = rect.GetX(); globalStats.H = rect.GetY(); globalStats.Height = rect.GetHeight(); globalStats.Width = rect.GetWidth(); }
public PipelineText(PipelineFactory factory, IPipelineContext context, IEnumerable <TT> stream, TransformIndexTree indexTree, IDisposable chain) { this.Context = context; this.CurrentStream = stream; _tracker = new PipelineDisposeHelper(); _tracker.TrackInstance(chain); _indexTree = indexTree; _factory = factory; if (FORCE_INMEMORY_PROCESS) { this.CurrentStream = stream.ToArray(); } }
public void Dispose() { PdfReaderException.ClearContext(); if (_outputCanvas != null) { _outputCanvas.Release(); _outputCanvas = null; } if (_factory != null) { _factory.Dispose(); _factory = null; } }
public PipelineFactory(PipelineFactory parentContext) { if (parentContext == null) { throw new ArgumentNullException(nameof(parentContext)); } // At this time, there is no need to have multiple nested context // We limit this to one to prevent unecessary nesting // But we can review this policy later whenever needed if (parentContext._parentContext != null) { throw new InvalidOperationException("only single nested level is allowed at this time"); } _parentContext = parentContext; _scope = CreateScope(); }
public Pipeline(PipelineFactory factory, IConfigurationStore configurationStore) { _factory = factory; _configStore = configurationStore; }
public Pipeline() { _factory = new PipelineFactory(); }
public PipelineFactory() { _parentContext = null; _scope = CreateScope(); }