Пример #1
0
        public override string ToString()
        {
            PointF  pos       = TextPos;
            double  rot       = Rot;
            PDFName blocktype = BlockType;

            return((blocktype.Name ?? "") + " @(" + pos.X.ToString() + ", " + pos.Y.ToString() + ") Rot(" + rot.ToString() + "): " + Text);
            //return String.Join(" ", new[] { StartMarker.ToString() }.Concat(Content.Select(s => s.ToString())).Concat(Arguments.Select(s => s.ToString()))) + " " + Name;
        }
Пример #2
0
        public static PDFDictionary Parse(Stack <IPDFToken> tokens)
        {
            Stack <KeyValuePair <string, IPDFElement> > kvps = new Stack <KeyValuePair <string, IPDFElement> >();

            while (!tokens.Has(PDFTokenType.StartDictionary))
            {
                IPDFElement elem = tokens.Pop <IPDFElement>();
                PDFName     name = tokens.Pop <PDFName>();
                kvps.Push(new KeyValuePair <string, IPDFElement>(name.Name, elem));
            }

            tokens.Pop(PDFTokenType.StartDictionary);

            return(new PDFDictionary(kvps));
        }