ISBNs are assigned to text-based monographic publications (i.e. one-off publications rather than journals, newspapers, or other types of serials).
Any book made publicly available, whether for sale or on a gratis basis, can be identified by ISBN.
In addition, individual sections (such as chapters) of books or issues, or articles from journals, periodicals, or serials that are made available separately may also use the ISBN as an identifier.
With regard to the various media available, it is of no importance in what form the content is documented and distributed; however, each different product form (e.g. paperback, EPUB, .pdf) should be identified separately.
You can find examples of types of qualifying products and more information about the scope of the ISBN here.