3 # Wrapper around a variety of programs that can do PS -> PDF conversion
10 while ($ARGV[0] =~ /^-(.*)$/) {
14 if ($opt eq '-nocompress') {
19 my ($in, $out) = @ARGV;
22 die "Usage: $0 [-nocompress] infile outfile\n";
28 # 1. Acrobat distiller
29 my $r = system('acrodist', '-n', '-q', '--nosecurity', '-o', $out, $in);
30 exit 0 if ( !$r && -f
$out );
32 # 2. ps2pdf (from Ghostscript)
33 my $r = system('ps2pdf', '-dOptimize=true', '-dEmbedAllFonts=true',
34 '-dCompressPages=' . ($compress ?
'true' : 'false'),
35 '-dUseFlateCompression=true', $in, $out);
36 exit 0 if ( !$r && -f
$out );
38 # 3. pstopdf (BSD/MacOS X utility)
39 my $r = system('pstopdf', $in, '-o', $out);
40 exit 0 if ( !$r && -f
$out );