PDF

class py_doc.PDF(name)[source]

A class for representing PDFs.

Parameters:

name (str) – The name of the document.

convert_to_images()[source]

Turn a PDF into an array of Image objects.

Returns:

A list of images.

Return type:

list

draw_classifications(output_file)[source]

Draw the bounding boxes on the images and merge them into a single PDF.

Parameters:

output_file (string) – The path of the folder where the images should be stored.

Returns:

None

Return type:

None

get_name()[source]

Get the name of the document.

Returns:

The name of the document.

Return type:

str

store_images(output_path, images=None)[source]

Turn a PDF into images and stores them on your local machine using the class attribute images if a list of images is not provided.

Parameters:

output_path (string with folder name) – The path of the folder where the images should be stored.

Returns:

None

Return type:

None

store_images_from_doc(output_path)[source]

Turn a PDF into images and stores them on your local machine using the provided document from the constructor.

Parameters:

output_path (string with folder name) – The path of the folder where the images should be stored.

Returns:

None

Return type:

None