Skip to content

Pdf

PDF module for autopylot. This module is used to extract data from PDF files.

Examples:

>>> pdf.extract_all_tables(pdf_file_path="C:\Users\user\Desktop\demo.pdf",output_folder="C:\Users\user\Desktop\",output_filename = "demo")

The module contains the following functions:

  • extract_all_tables(pdf_file_path, output_folder, output_filename, table_with_borders): Extracts all tables from a pdf file and saves them as csv files in the specified folder.

extract_all_tables(pdf_file_path, output_folder, output_filename, table_with_borders=True)

Extracts all tables from a pdf file and saves them as csv files in the specified folder.

Parameters:

Name Type Description Default
pdf_file_path str || WindowsPath

Path to the pdf file.

required
output_folder str || WindowsPath

Path to the output folder.

required
output_filename str

Name of the output file.

required
table_with_borders bool

Whether the table has borders.

True

Returns:

Type Description
None

None

Examples:

>>> pdf.extract_all_tables(pdf_file_path="C:\Users\user\Desktop\demo.pdf",output_folder="C:\Users\user\Desktop\",output_filename = "demo")