Import module from pdf2image import convert_from_pathĬonvert_from_path(pdf_path, dpi=200, output_folder=None, first_page=None, last_page=None, fmt=’ppm’, jpegopt=None, thread_count=1, userpw=None, use_cropbox=False, strict=False, transparent=False, single_file=False, output_file=, poppler_path=None, grayscale=False, size=None, paths_only=False, use_pdftocairo=False, timeout=None, hide_annotations=False)ĭescription: Convert PDF to Image will throw whenever one of the condition is reached Parameters: pdf_path -> Path to the PDF that you want to convert dpi -> Image quality in DPI (default 200) output_folder -> Write the resulting images to a folder (instead of directly in memory) first_page -> First page to process last_page -> Last page to process before stopping fmt -> Output image format jpegopt -> jpeg options `quality`, `progressive`, and `optimize` (only for jpeg format) thread_count -> How many threads we are allowed to spawn for processing userpw -> PDF’s password use_cropbox -> Use cropbox instead of mediabox strict -> When a Syntax Error is thrown, it will be raised as an Exception transparent -> Output with a transparent background instead of a white one.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |