Example of using the https://pdftables.com/ API from Windows PowerShell
Switch branches/tags
Nothing to show
Clone or download
Permalink
Failed to load latest commit information.
README.md Update README.md Sep 22, 2017
pdftables-convert-dir.ps1 First version of script Sep 22, 2017

README.md

powershell-pdftables-api

Example of using the https://pdftables.com/ API from Windows PowerShell. This enables you to batch convert PDFs from the command line in Windows.

This script requires PowerShell 3.0 or later. This is installed by default from Windows 8. In Windows 7 you can install it from:

https://docs.microsoft.com/en-us/powershell/scripting/setup/installing-windows-powershell?view=powershell-5.1

The script will convert all PDFs in a directory (folder) using PDFTables. It will also process PDFs in sub directories and will mirror the input sub-directory structure in the output sub-directory.

This script takes three mandatory parameters:

  • Your PDFTables API Key (displayed on https://pdftables.com/pdf-to-excel-api after you login)
  • The input directory containing PDF files
  • The output directory containing PDF files (this can be the same as the input directory)

It also has one optional parameter: the format in which you want the output files. This is specified with -format VALUE where VALUE can be xlsx-single (the default), xlsx-multiple, csv or xml.

Example usage from Windows command line:

powershell -ExecutionPolicy Unrestricted -File pdftables-convert-dir.ps1 YOUR-API-KEY INPUT_DIR OUTPUT_DIR

Example usage output in CSV format:

powershell -ExecutionPolicy Unrestricted -File pdftables-convert-dir.ps1 YOUR-API-KEY INPUT_DIR OUTPUT_DIR -format csv