Skip to content

Latest commit

History

6 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

TextFromPdf - PowerShell module for extracting text from PDF.

This module can be used to extract text from a PDF. Currently, it only contains a single function that traverses a PDF line-by-line and uses a RuleSet passed as a parameter to extract particular bits of information. It's set up to extract the total, vat, date, and time from receipts.

Available Functions

FunctionAliasDescription
Get-TextFromPdfExtracts text from a PDF using a RuleSet.

Examples

Extract the total, tax, date, and time from a receipt
Get-TextFromPDF-Path 'c:\temp\receipt01.pdf'
Use a custom RuleSet to extract information
$ruleSet=@(
[pscustomobject]@{
Name="Total"Expression="(?i)Net: ?"Function= {
return [regex]::Match($text,"\d{1,2}\.\d{2}").Value
}
}
)
Get-TextFromPDF-Path '.\receipt01.pdf'-RuleSet $ruleSet

License

AGPL v3 License AGPL v3

About

PowerShell module that uses iText 7 to extract text from PDF.

Resources

Stars

13 stars

Watchers

3 watching

Forks

Releases

Packages

Contributors

Languages