According to the Leptonica API there is a special function pixReadTiff
which reads a certain page from your tif file as Pix.
PIX *pixReadTiff(const char *filename, l_int32 n)
It returns NULL
or an error if the page does not exists.
Just iterate through all pages.
To get the number of pages, you can use this function:
l_int32 tiffGetCount(FILE *fp, l_int32 *pn)
For other details you might want to look into the API yourself. You might look into this: http://tpgit.github.io/Leptonica/tiffio_8c_source.html