pdf2imgs
pdf2imgs(stream: Union[str, Path, bytes]) -> Union[List[np.ndarray], None]
-
Description: Converts a PDF file into a list of images in numpy format.
-
Parameters:
- stream (
Union[str, Path, bytes]
): The path or binary data of the PDF file.
- stream (
-
Return value:
- List[np.ndarray]: Returns a list of numpy images for each page of the PDF if successful; otherwise, returns None.
-
Example:
import capybara as cb
imgs = cb.pdf2imgs('sample.pdf')