code: func pageCountNative(filename string) (int, error) {
  	f, err := os.Open(filename)
  	if err != nil {
  		return 0, err
  	}
  	defer f.Close()
  	fi, err := f.Stat()
  	if err != nil {
  		return 0, err
  	}
  	p, err := pdf.NewReader(f, fi.Size())
  	if err != nil {
  		return 0, err
  	}
  	c := p.NumPage()
  	if c < 1 {
  		return 0, errors.New("encountered PDF without any pages")
  	}
  	return p.NumPage(), nil
  }
docs: // pageCountNative uses a native Go library to extract and return the number of
  // pages in the PDF document. It returns an error if the filename is not of a
  // PDF file, or if it failed to decode the PDF.