Beispiel #1
0
        protected override void DoLayoutTextComponent(IPDFTextComponent text, Style style)
        {
            var region = this.Context.DocumentLayout.CurrentPage.LastOpenBlock().CurrentRegion;

            var line = region.CurrentItem as PDFLayoutLine;

            if (null == line)
            {
                line = region.BeginNewLine();
            }

            var bmc = line.AddMarkedContentStart(this, this.Component, PDFMarkedContentType.Text);

            base.DoLayoutTextComponent(text, style);

            if (this._addedProxyText)
            {
                for (int i = line.Runs.Count - 1; i >= 0; i--)
                {
                    if (line.Runs[i] is PDFTextRunCharacter)
                    {
                        PDFTextRunCharacter chars = (PDFTextRunCharacter)line.Runs[i];
                        chars.Characters = "";
                        break;
                    }
                }
            }
            line.AddMarkedContentEnd(this, bmc);
        }
        public LayoutEngineText(IPDFTextComponent component, IPDFLayoutEngine parent)
        {
            if (null == component)
            {
                throw new ArgumentNullException("component");
            }
            this._txt = component;
            this._par = parent;

            TextLayoutEngineCount++;
        }