コード例 #1
0
 public static int[] CheckObjectStart(byte[] line)
 {
     try
     {
         PrTokeniser tk  = new PrTokeniser(line);
         int         num = 0;
         int         gen = 0;
         if (!tk.NextToken() || tk.TokenType != TK_NUMBER)
         {
             return(null);
         }
         num = tk.IntValue;
         if (!tk.NextToken() || tk.TokenType != TK_NUMBER)
         {
             return(null);
         }
         gen = tk.IntValue;
         if (!tk.NextToken())
         {
             return(null);
         }
         if (!tk.StringValue.Equals("obj"))
         {
             return(null);
         }
         return(new[] { num, gen });
     }
     catch
     {
     }
     return(null);
 }
コード例 #2
0
 /// <summary>
 /// Creates a new instance of PdfContentParser
 /// </summary>
 /// <param name="tokeniser">the tokeniser with the content</param>
 public PdfContentParser(PrTokeniser tokeniser)
 {
     Tokeniser = tokeniser;
 }