Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

get coordinates of an image from a pdf python

    import pdfplumber

    pdf_obj = pdfplumber.open(doc_path)
    page = pdf_obj.pages[page_no]
    images_in_page = page.images
    page_height = page.height
    image_bbox = (image['x0'], page_height - image['y1'], image['x1'], page_height - image['y0'])
    cropped_page = page.crop(image_bbox)
    image_obj = cropped_page.to_image(resolution=400)
    image_obj.save(path_to_save_image)



Comment

PREVIOUS NEXT
Code Example
Python :: how to take first half of list python 
Python :: how to find min, max in dictionaries 
Python :: how to get the top 100 frequent words on a python dataframe colummn 
Python :: how to add some thing in python list 
Python :: how to put my graph in tkinter interface 
Python :: python largest common divisor 
Python :: how to set environment variable in pycharm 
Python :: flask get with parameters 
Python :: python game github 
Python :: python open file location 
Python :: quick sort algorithm in python 
Python :: django-tool-bar 
Python :: geopandas replace column name 
Python :: how to delete in python 
Python :: how to input a picture into opencv raspberry pi 
Python :: geopandas with postgis 
Python :: turtle python screen border 
Python :: how to extract values from a dictionary 
Python :: fillna string 
Python :: format numbers in column to percentage in python 
Python :: loading a webpage with aiohttp 
Python :: django 3 create async rest api 
Python :: python convert float to whole part of number 
Python :: embed python discord 
Python :: python strftime cheat sheet 
Python :: plotly pdf report 
Python :: return foreignkey attribute django rest 
Python :: best python books python 3 
Python :: python how to make boxplots with swarmplot 
Python :: functools.cached_property objects in python 
ADD CONTENT
Topic
Content
Source link
Name
9+5 =