## Script to convert the PDF form data of PDF forms made by newer versions of Adobe Acrobat
## into gerneral form data according to standard.
## The script is usefull if one uses e.g. the program okular of KDE/Plasma to fill in PDF forms
## where the filled text is not seen anymore after switching to the pure display mode.
## v1 23-12-21 alban: script base
## v2 23-12-23 alban: add help text and error message
## v3 24-01-15 alban: add acceptance for wildcard *
## v4 24-01-17 alban: add file type check
##
helptext (){
echo"\n Use with one or more files (spaces in file name need quoting or escaping): \n${0##*/} Example_1.pdf \"Example 2.pdf\" Example\ 3.pdf \n\n Can be used also with wildcard: \n${0##*/} More_Examples_*.pdf \n\n"
}
## check for binaries needed
# TBD
## no parameter
if[-z"$1"];then
echo"\n\n ERROR: No file given. \n"
helptext
exit 0
fi
## help request as parameter
# TBD
## set internal field separator (IFS) because of possible spaces in file names