title: pdfbox header version info error
body: <p>I used PDFbox for parsing that pdf document.It throws exception that says it can not find header version info . Any idea?</p>
  
  <p>I think version is 1.3 I saw it when I cast every byte to char .
  link is <a href="http://www.selab.isti.cnr.it/ws-mate/example.pdf" rel="noreferrer">http://www.selab.isti.cnr.it/ws-mate/example.pdf</a></p>
  
  <p>here codes of method and output:</p>
  
  <pre><code> public String PDFtest(String textLink) throws IOException{
          PDFParser parser;
          String parsedText = null;
          PDFTextStripper pdfStripper;
          PDDocument pdDoc;
          COSDocument cosDoc;
          PDDocumentInformation pdDocInfo;
  
  
      StringBuilder sd=new StringBuilder();
      URL link;
      try {
          link = new URL(textLink);
          URLConnection urlConn = link.openConnection();
          BufferedInputStream in = null;
          in = new BufferedInputStream(urlConn.getInputStream());
          byte data[] = new byte[1024];
          in.read(data, 0, 1024);
  
      parser = new PDFParser(in);
      parser.parse();
      cosDoc = parser.getDocument();
      pdfStripper = new PDFTextStripper();
      pdDoc = new PDDocument(cosDoc);
      parsedText = pdfStripper.getText(pdDoc);
      } catch (MalformedURLException ex) {
          Logger.getLogger(HTMLhelper.class.getName()).log(Level.SEVERE, null, ex);
      }
      catch (NumberFormatException e){
          System.out.println("hata");
      }
  
      return parsedText;
  
  
  
  }
  </code></pre>
  
  <p>Exception:</p>
  
  <pre><code>Exception in thread "main" java.io.IOException: Error: Header doesn't contain versioninfo
      at org.apache.pdfbox.pdfparser.PDFParser.parseHeader(PDFParser.java:317)
      at org.apache.pdfbox.pdfparser.PDFParser.parse(PDFParser.java:173)
      at ParsingMachine.HTMLhelper.PDFtest(HTMLhelper.java:99)
      at ParsingMachine.tester.main(tester.java:18)
  Java Result: 1
  </code></pre>