Example #1
0
        protected virtual IPDFToken ProcessKeyword(PDFKeyword token)
        {
            switch (token.Name)
            {
            case "true": return(new PDFBoolean {
                    Value = true
                });

            case "false": return(new PDFBoolean {
                    Value = false
                });

            case "null": return(new PDFNull());

            case "obj": return(new PDFToken(PDFTokenType.StartObject));

            case "xref": return(new PDFToken(PDFTokenType.Xref));

            case "startxref": return(new PDFToken(PDFTokenType.StartXref));

            case "endobj": return(PDFObject.Parse(this));

            case "trailer": return(PDFXref.Parse(this));

            case "n": return(PDFXrefEntry.Parse(this, PDFTokenType.XrefEntryInUse));

            case "f": return(PDFXrefEntry.Parse(this, PDFTokenType.XrefEntryFree));

            case "R": return(PDFObjRef.Parse(this));

            default: throw new InvalidDataException(String.Format("Unknown keyword '{0}'", token.Name));
            }
        }
        protected override IPDFToken ProcessKeyword(PDFKeyword token)
        {
            switch (token.Name)
            {
            case "W": return(ProcessOperator("W", "re"));

            case "EMC": return(ProcessBlock("EMC", "BMC", "BDC"));

            //case "ET": return ProcessBlock("ET", "BT");
            default: return(ProcessOperator(token.Name));
            }
        }