Esempio n. 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 int[] { num, gen });
     }
     catch {
     }
     return(null);
 }
Esempio n. 2
0
 /**
  * Creates a new instance of PdfContentParser
  * @param tokeniser the tokeniser with the content
  */
 public PdfContentParser(PRTokeniser tokeniser)
 {
     this.tokeniser = tokeniser;
 }