Pdf.Tables

This function retrieves any tables present in a PDF file. An optional parameter, named options, can be provided to define additional properties. The options parameter can include the following fields:...

Syntax

Pdf.Tables(pdf as binary, optional options as nullable record) as table.

About

This function retrieves any tables present in a PDF file. An optional parameter, named options, can be provided to define additional properties. The options parameter can include the following fields: - Implementation: This field specifies the version of the algorithm to use when detecting tables. Older versions are maintained for backward compatibility, ensuring that existing queries are not affected by algorithm updates. The latest version is recommended for the most accurate results. Valid values include "1.3", "1.2", "1.1", or null. - StartPage: This field indicates the first page to be examined within the specified range of pages. The default value is 1. - EndPage: This field specifies the last page to be examined within the specified page range. The default is the last page of the document. - MultiPageTables: This field controls whether similar tables across consecutive pages should be automatically merged into a single table. The default setting is true. - EnforceBorderLines: This field determines w

Explanation

The function retrieves the tables found in the sample.pdf file. It uses the Power Query M code, specifically the M function Pdf.Tables(File.Contents("c:\sample.pdf")). The result is displayed in a table format with three columns: Name, Kind, and Data.