Skip to content

Commit

Permalink
Added example
Browse files Browse the repository at this point in the history
  • Loading branch information
PrzemyslawKlys committed Mar 17, 2021
1 parent 90e1fb9 commit 4930a55
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions Example/Example08.Forms/Example.Forms.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
Import-Module .\PSWritePDF.psd1 -Force

$FilePath = [IO.Path]::Combine("$PSScriptRoot", "Output", "SampleAcroFormOutput.pdf")
$FilePathSource = [IO.Path]::Combine("$PSScriptRoot", "Input", "SampleAcroForm.pdf")

$FieldNameAndValueHashTable = [ordered] @{
"Text 1" = "Text 1 input"
"Text 2" = "Text 2 input"
"Text 3" = "Text 3 input"
}

Set-PDFForm -SourceFilePath $FilePathSource -DestinationFilePath $FilePath -FieldNameAndValueHashTable $FieldNameAndValueHashTable

# Reading PDF forms
$PDF = Get-PDF -FilePath $FilePath
$AcrobatFormFields = Get-PDFFormField -PDF $PDF
$AcrobatFormFields | Format-Table
Close-PDF -Document $PDF
Binary file not shown.
Binary file not shown.

0 comments on commit 4930a55

Please sign in to comment.