# This script converts a file that works well with acrobat # 4 into one that works also well with acrobat 5. So far # for standards. -- Hans Hagen, PRAGMA-ADE, 2001-05-10 $pdffile = $ARGV[0] ; $found = 0 ; $pdffile .= ".pdf" unless -e $pdffile ; exit unless -e $pdffile ; exit unless open (PDFINP, "<$pdffile") ; binmode PDFINP ; exit unless open (PDFOUT, ">$pdffile.new") ; binmode PDFOUT ; while () { if (s"(/Subtype\s*/Widget.*?/FT\s*/Btn.*?/DV\s*)\((.*?)\)"$1/$2 "gmois) { $found = 1 } print PDFOUT $_ } close (PDFINP) ; close (PDFOUT) ; unlink "$pdffile.new" unless $found ;