summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xBuild/source/texk/texlive/linked_scripts/epstopdf/epstopdf.pl70
-rw-r--r--Master/texmf-dist/doc/man/man1/epstopdf.146
-rw-r--r--Master/texmf-dist/doc/man/man1/epstopdf.man1.pdfbin9859 -> 27121 bytes
-rw-r--r--Master/texmf-dist/doc/man/man1/repstopdf.man1.pdfbin9859 -> 27121 bytes
-rwxr-xr-xMaster/texmf-dist/scripts/epstopdf/epstopdf.pl70
5 files changed, 83 insertions, 103 deletions
diff --git a/Build/source/texk/texlive/linked_scripts/epstopdf/epstopdf.pl b/Build/source/texk/texlive/linked_scripts/epstopdf/epstopdf.pl
index f263df00933..697127cdff5 100755
--- a/Build/source/texk/texlive/linked_scripts/epstopdf/epstopdf.pl
+++ b/Build/source/texk/texlive/linked_scripts/epstopdf/epstopdf.pl
@@ -1,5 +1,5 @@
#!/usr/bin/env perl
-# $Id: epstopdf.pl 36129 2015-01-24 00:30:11Z karl $
+# $Id: epstopdf.pl 41287 2016-05-28 18:09:45Z karl $
# (Copyright lines below.)
#
# Redistribution and use in source and binary forms, with or without
@@ -34,9 +34,15 @@
# "%%BoundingBox: (atend)" when input is not seekable (e.g., from a pipe),
#
# emacs-page
-my $ver = "2.23";
+my $ver = "2.24";
# History
+# 2016/05/28 v2.24 (Karl Berry)
+# * new option --gray; patch from William Bader,
+# tex-k mail 9 Feb 2016 19:37:08.
+# * disallow --device completely in restricted mode,
+# to avoid maintenance of device list.
+# tex-live mail 10 Feb 2016 10:36:26.
# 2015/01/22 v2.23 (Karl Berry)
# * use # instead of = to placate msys; report from KUROKI Yusuke,
# tex-k mail 20 Jan 2015 12:40:16.
@@ -171,7 +177,7 @@ my $ver = "2.23";
### emacs-page
### program identification
my $program = "epstopdf";
-my $ident = '($Id: epstopdf.pl 36129 2015-01-24 00:30:11Z karl $)' . " $ver";
+my $ident = '($Id: epstopdf.pl 41287 2016-05-28 18:09:45Z karl $)' . " $ver";
my $copyright = <<END_COPYRIGHT ;
Copyright 2009-2014 Karl Berry et al.
Copyright 2002-2009 Gerben Wierda et al.
@@ -199,10 +205,11 @@ my $default_device = 'pdfwrite';
$::opt_autorotate = "None";
$::opt_compress = 1;
$::opt_debug = 0;
-$::opt_device= $default_device;
+$::opt_device = $default_device;
$::opt_embed = 1;
$::opt_exact = 0;
$::opt_filter = 0;
+$::opt_gray = 0;
$::opt_gs = 1;
$::opt_gscmd = "";
@::opt_gsopt = ();
@@ -315,32 +322,11 @@ my %optcheck = qw<
# In any case not suitable for restricted:
# -dDOPS
-### restricted devices
-# More or less copied from ghostscript's configure:
-# BMP_DEVS, JPEG_DEVS, PNG_DEVS, TIFF_DEVS, PCX_DEVS, PBM_DEVS
-# PS_DEVS (without text devices)
-my @restricted_devlist = ($default_device);
-my @restricted_devlist_ext = qw[
- bmpmono bmpgray bmpsep1 bmpsep8 bmp16 bmp256 bmp16m bmp32b
- jpeg jpeggray jpegcmyk
- pbm pbmraw pgm pgmraw pgnm pgnmraw pnm pnmraw ppm ppmraw
- pkm pkmraw pksm pksmraw pam pamcmyk4 pamcmyk32 plan plang
- planm planc plank
- pcxmono pcxgray pcx16 pcx256 pcx24b pcxcmyk pcx2up
- png16 png16m png256 png48 pngalpha pnggray pngmono
- psdf psdcmyk psdrgb pdfwrite pswrite ps2write epswrite psgray psmono psrgb
- tiffs tiff12nc tiff24nc tiff48nc tiff32nc tiff64nc tiffcrle tifflzw
- tiffpack tiffgray tiffsep tiffsep1 tiffscaled tiffscaled8 tiffscaled24
- svg svgwrite
-];
-push (@restricted_devlist, @restricted_devlist_ext);
-my %restricted_devlist = ( map {$_, 1} @restricted_devlist );
-
### usage
my @bool = ("false", "true");
my $resmsg = $::opt_res ? $::opt_res : "[use gs default]";
my $rotmsg = $::opt_autorotate ? $::opt_autorotate : "[use gs default]";
-my $defgsopts = "-q -dNOPAUSE -sDEVICE=pdfwrite";
+
my $usage = <<"END_OF_USAGE";
${title}Usage: $program [OPTION]... [EPSFILE]
@@ -376,6 +362,7 @@ Options for Ghostscript:
--(no)compress use compression (default: $bool[$::opt_compress])
--device=DEV use -sDEVICE=DEV (default: $::opt_device)
--(no)embed embed fonts (default: $bool[$::opt_embed])
+ --(no)gray grayscale output (default: $bool[$::opt_gray])
--pdfsettings=VAL use -dPDFSETTINGS=/VAL (default is prepress if --embed,
else empty); recognized VAL choices:
screen, ebook, printer, prepress, default.
@@ -401,21 +388,20 @@ is doing.
More about the options for Ghostscript:
Additional options to be used with gs can be specified
with either or both of the two cumulative options --gsopts and --gsopt.
- --gsopts takes a single string of options, which is split at whitespace,
- each resulting word then added to the gs command line individually.
+ --gsopts takes a single string of options, which is split at whitespace
+ and each resulting word then added to the gs command line individually.
--gsopt adds its argument as a single option to the gs command line.
It can be used multiple times to specify options separately,
and is necessary if an option or its value contains whitespace.
In restricted mode, options are limited to those with names and values
- known to be safe; some options taking booleans, integers or fixed
+ known to be safe. Some options taking booleans, integers or fixed
names are allowed, those taking general strings are not.
All options to epstopdf may start with either - or --, and may be
unambiguously abbreviated. It is best to use the full option name in
-scripts, though, to avoid possible collisions with new options in the
-future.
+scripts to avoid possible collisions with new options in the future.
-When reporting bugs, please include an input file and command line
+When reporting bugs, please include an input file and all command line
options so the problem can be reproduced.
Report bugs to: tex-k\@tug.org
@@ -431,6 +417,7 @@ GetOptions (
"device=s",
"embed!",
"exact!",
+ "gray!",
"filter!",
"gs!",
"gscmd=s", # \ref{val_gscmd}
@@ -514,8 +501,7 @@ if ($::opt_filter) {
}
### emacs-page
-### start building GS command line for the pipe
-### take --safer and --gsopts into account
+### building the gs invocation.
### option gscmd
if ($::opt_gscmd) {
@@ -534,12 +520,14 @@ push @GS, $::opt_safer ? '-dSAFER' : '-dNOSAFER';
push @GS, '-dNOPAUSE';
push @GS, '-dBATCH';
-if ($::opt_device and $restricted and
- not $restricted_devlist{$::opt_device}) {
- error "Option forbidden in restricted mode: --device=$::opt_device";
- $::opt_device = '';
+### option device
+if ($::opt_device) {
+ if ($restricted) {
+ error "Option forbidden in restricted mode: --device";
+ } else {
+ debug "Switching from $default_device to $::opt_device";
+ }
}
-$::opt_device = $default_device unless $::opt_device;
push @GS, "-sDEVICE=$::opt_device";
### option outfile
@@ -582,9 +570,11 @@ push @GS, qw[
-dEmbedAllFonts=true
] if $::opt_embed;
-
push @GS, '-dUseFlateCompression=false' unless $::opt_compress;
+push @GS, qw(-sColorConversionStrategy=Gray -dProcessColorModel=/DeviceGray)
+ if $::opt_gray;
+
if ($::opt_res and
not $::opt_res =~ /^(\d+(x\d+)?)$/) {
warnerr "Invalid resolution: $opt_res";
diff --git a/Master/texmf-dist/doc/man/man1/epstopdf.1 b/Master/texmf-dist/doc/man/man1/epstopdf.1
index cb3fb4519ce..fff723a0947 100644
--- a/Master/texmf-dist/doc/man/man1/epstopdf.1
+++ b/Master/texmf-dist/doc/man/man1/epstopdf.1
@@ -1,5 +1,5 @@
-.TH EPSTOPDF 1 "17 January 2014"
-.\" $Id: epstopdf.1 32701 2014-01-17 18:09:54Z karl $
+.TH EPSTOPDF 1 "28 May 2016"
+.\" $Id: epstopdf.1 41287 2016-05-28 18:09:45Z karl $
.SH NAME
epstopdf, repstopdf \- convert an EPS file to PDF
.SH SYNOPSIS
@@ -22,8 +22,7 @@ be resulting problems.
.SH OPTIONS
Options may start with either "\fB-\fP" or "\fB--\fP", and may be
unambiguously abbreviated. It is best to use the full option name in
-scripts, though, to avoid possible collisions with new options in the
-future.
+scripts to avoid possible collisions with new options in the future.
.PP
General script options:
.IP "\fB--help\fP
@@ -36,21 +35,21 @@ write result to \fIfile\fP. If this option is not given, and
otherwise, the default is to construct the output file name by replacing
any extension in the input file with `.pdf'.
.IP "\fB--\fP[\fBno\fP]\fBdebug\fP"
-write debugging info (default: off).
+write debugging info (default: false).
.IP "\fB--\fP[\fBno\fP]\fBexact\fP"
-scan ExactBoundingBox (default: off).
+scan ExactBoundingBox (default: false).
.IP "\fB--\fP[\fBno\fP]\fBfilter\fP"
read standard input and (unless \fB--outfile\fP is given) write standard
-output (default: off).
+output (default: false).
.IP "\fB--\fP[\fBno\fP]\fBgs\fP"
-run Ghostscript (default: on). With \fB--nogs\fP, output (to standard
+run Ghostscript (default: true). With \fB--nogs\fP, output (to standard
output by default) the PostScript that would normally be converted; that
is, the input PostScript as modified by \fBepstopdf\fP.
.IP "\fB--\fP[\fBno\fP]\fBhires\fP"
-scan HiresBoundingBox (default: off).
+scan HiresBoundingBox (default: false).
.IP "\fB--restricted\fP=\fIval\fP"
-turn on restricted mode (default: [on for repstopdf, else off]);
-this forbids the use of \fB--gscmd\fP and \fB--gsopt\fP and imposes
+turn on restricted mode (default: [true for repstopdf, else false]);
+this forbids the use of \fB--gscmd\fP and other options and imposes
restrictions on the input and output file names according to the values
of openin_any and openout_any (see the Web2c manual, http://tug.org/web2c).
.PP
@@ -58,26 +57,27 @@ Options for Ghostscript (more info below):
.IP "\fB--gscmd\fP=\fIval\fP"
pipe output to \fIval\fP (default: [\fBgswin32c\fP on Windows, else \fBgs\fP])
.IP "\fB--gsopt\fP=\fIval\fP"
-include \fIval\fP as one argument in the gs command (can be repeated),
+include \fIval\fP as one argument in the gs command (can be repeated).
.IP "\fB--gsopts\fP=\fIval\fP"
-split \fIval\fP at whitespace, include each resulting word as an
-argument in the gs command (can be repeated)
+split \fIval\fP at whitespace and include each resulting word as an
+argument in the gs command (can be repeated).
.IP "\fB--autorotate\fP=\fIval\fP"
set AutoRotatePages (default: None); recognized \fIval\fP choices:
None, All, PageByPage. For EPS files, PageByPage is equivalent to All.
.IP "\fB--\fP[\fBno\fP]\fBcompress\fP"
-use compression in the output (default: on).
+use compression in the output (default: true).
.IP "\fB--device\fP=\fIdev\fP"
-use -sDEVICE=\fIdev\fP (default: pdfwrite); not all devices are allowed
-in restricted mode.
+use -sDEVICE=\fIdev\fP (default: pdfwrite); not allowed in restricted mode.
.IP "\fB--\fP[\fBno\fP]\fBembed\fP"
-embed fonts (default: on).
+embed fonts (default: true).
+.IP "\fB--\fP[\fBno\fP]\fBgray\fP"
+grayscale output (default: false).
.IP "\fB--pdfsettings\fP=\fIval\fP"
use -dPDFSETTINGS=/\fIval\fP (default is `prepress' if \fB--embed\fP,
else empty); recognized \fIval\fP choices: screen, ebook, printer,
-prepress, default.
+repress, default.
.IP "\fB--\fP[\fBno\fP]\fBquiet\fP"
-use -q, a.k.a. -dQUIET (default: off).
+use -q, a.k.a. -dQUIET (default: false).
.IP "\fB--res\fP=\fIdpi, dpi\fPx\fIdpi\fP"
set image resolution (default: [use gs default]); ignored if
\fB--debug\fP is set.
@@ -97,11 +97,11 @@ line. It can be used multiple times to specify options separately,
and is necessary if an option or its value contains whitespace.
.PP
In restricted mode, options are limited to those with names and values
-known to be safe; some options taking booleans, integers or fixed
+known to be safe. Some options taking booleans, integers or fixed
names are allowed, those taking general strings are not.
.SH EXAMPLES
-Examples all equivalently converting `test.eps' to `test.pdf':
+These examples all equivalently convert `test.eps' to `test.pdf':
.nf
epstopdf test.eps
cat test.eps | epstopdf --filter >test.pdf
@@ -113,7 +113,7 @@ Example for using HiResBoundingBox instead of BoundingBox:
epstopdf --hires test.eps
.fi
.PP
-Example for producing \fBepstopdf\fP's attempt at corrected PostScript:
+Example for \fBepstopdf\fP's attempt at correcting PostScript:
.nf
$program --nogs test.ps >testcorr.ps
.fi
diff --git a/Master/texmf-dist/doc/man/man1/epstopdf.man1.pdf b/Master/texmf-dist/doc/man/man1/epstopdf.man1.pdf
index 094498b2fe0..1298ab4c4d2 100644
--- a/Master/texmf-dist/doc/man/man1/epstopdf.man1.pdf
+++ b/Master/texmf-dist/doc/man/man1/epstopdf.man1.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/man/man1/repstopdf.man1.pdf b/Master/texmf-dist/doc/man/man1/repstopdf.man1.pdf
index 2ae67655e63..cde74dc203f 100644
--- a/Master/texmf-dist/doc/man/man1/repstopdf.man1.pdf
+++ b/Master/texmf-dist/doc/man/man1/repstopdf.man1.pdf
Binary files differ
diff --git a/Master/texmf-dist/scripts/epstopdf/epstopdf.pl b/Master/texmf-dist/scripts/epstopdf/epstopdf.pl
index f263df00933..697127cdff5 100755
--- a/Master/texmf-dist/scripts/epstopdf/epstopdf.pl
+++ b/Master/texmf-dist/scripts/epstopdf/epstopdf.pl
@@ -1,5 +1,5 @@
#!/usr/bin/env perl
-# $Id: epstopdf.pl 36129 2015-01-24 00:30:11Z karl $
+# $Id: epstopdf.pl 41287 2016-05-28 18:09:45Z karl $
# (Copyright lines below.)
#
# Redistribution and use in source and binary forms, with or without
@@ -34,9 +34,15 @@
# "%%BoundingBox: (atend)" when input is not seekable (e.g., from a pipe),
#
# emacs-page
-my $ver = "2.23";
+my $ver = "2.24";
# History
+# 2016/05/28 v2.24 (Karl Berry)
+# * new option --gray; patch from William Bader,
+# tex-k mail 9 Feb 2016 19:37:08.
+# * disallow --device completely in restricted mode,
+# to avoid maintenance of device list.
+# tex-live mail 10 Feb 2016 10:36:26.
# 2015/01/22 v2.23 (Karl Berry)
# * use # instead of = to placate msys; report from KUROKI Yusuke,
# tex-k mail 20 Jan 2015 12:40:16.
@@ -171,7 +177,7 @@ my $ver = "2.23";
### emacs-page
### program identification
my $program = "epstopdf";
-my $ident = '($Id: epstopdf.pl 36129 2015-01-24 00:30:11Z karl $)' . " $ver";
+my $ident = '($Id: epstopdf.pl 41287 2016-05-28 18:09:45Z karl $)' . " $ver";
my $copyright = <<END_COPYRIGHT ;
Copyright 2009-2014 Karl Berry et al.
Copyright 2002-2009 Gerben Wierda et al.
@@ -199,10 +205,11 @@ my $default_device = 'pdfwrite';
$::opt_autorotate = "None";
$::opt_compress = 1;
$::opt_debug = 0;
-$::opt_device= $default_device;
+$::opt_device = $default_device;
$::opt_embed = 1;
$::opt_exact = 0;
$::opt_filter = 0;
+$::opt_gray = 0;
$::opt_gs = 1;
$::opt_gscmd = "";
@::opt_gsopt = ();
@@ -315,32 +322,11 @@ my %optcheck = qw<
# In any case not suitable for restricted:
# -dDOPS
-### restricted devices
-# More or less copied from ghostscript's configure:
-# BMP_DEVS, JPEG_DEVS, PNG_DEVS, TIFF_DEVS, PCX_DEVS, PBM_DEVS
-# PS_DEVS (without text devices)
-my @restricted_devlist = ($default_device);
-my @restricted_devlist_ext = qw[
- bmpmono bmpgray bmpsep1 bmpsep8 bmp16 bmp256 bmp16m bmp32b
- jpeg jpeggray jpegcmyk
- pbm pbmraw pgm pgmraw pgnm pgnmraw pnm pnmraw ppm ppmraw
- pkm pkmraw pksm pksmraw pam pamcmyk4 pamcmyk32 plan plang
- planm planc plank
- pcxmono pcxgray pcx16 pcx256 pcx24b pcxcmyk pcx2up
- png16 png16m png256 png48 pngalpha pnggray pngmono
- psdf psdcmyk psdrgb pdfwrite pswrite ps2write epswrite psgray psmono psrgb
- tiffs tiff12nc tiff24nc tiff48nc tiff32nc tiff64nc tiffcrle tifflzw
- tiffpack tiffgray tiffsep tiffsep1 tiffscaled tiffscaled8 tiffscaled24
- svg svgwrite
-];
-push (@restricted_devlist, @restricted_devlist_ext);
-my %restricted_devlist = ( map {$_, 1} @restricted_devlist );
-
### usage
my @bool = ("false", "true");
my $resmsg = $::opt_res ? $::opt_res : "[use gs default]";
my $rotmsg = $::opt_autorotate ? $::opt_autorotate : "[use gs default]";
-my $defgsopts = "-q -dNOPAUSE -sDEVICE=pdfwrite";
+
my $usage = <<"END_OF_USAGE";
${title}Usage: $program [OPTION]... [EPSFILE]
@@ -376,6 +362,7 @@ Options for Ghostscript:
--(no)compress use compression (default: $bool[$::opt_compress])
--device=DEV use -sDEVICE=DEV (default: $::opt_device)
--(no)embed embed fonts (default: $bool[$::opt_embed])
+ --(no)gray grayscale output (default: $bool[$::opt_gray])
--pdfsettings=VAL use -dPDFSETTINGS=/VAL (default is prepress if --embed,
else empty); recognized VAL choices:
screen, ebook, printer, prepress, default.
@@ -401,21 +388,20 @@ is doing.
More about the options for Ghostscript:
Additional options to be used with gs can be specified
with either or both of the two cumulative options --gsopts and --gsopt.
- --gsopts takes a single string of options, which is split at whitespace,
- each resulting word then added to the gs command line individually.
+ --gsopts takes a single string of options, which is split at whitespace
+ and each resulting word then added to the gs command line individually.
--gsopt adds its argument as a single option to the gs command line.
It can be used multiple times to specify options separately,
and is necessary if an option or its value contains whitespace.
In restricted mode, options are limited to those with names and values
- known to be safe; some options taking booleans, integers or fixed
+ known to be safe. Some options taking booleans, integers or fixed
names are allowed, those taking general strings are not.
All options to epstopdf may start with either - or --, and may be
unambiguously abbreviated. It is best to use the full option name in
-scripts, though, to avoid possible collisions with new options in the
-future.
+scripts to avoid possible collisions with new options in the future.
-When reporting bugs, please include an input file and command line
+When reporting bugs, please include an input file and all command line
options so the problem can be reproduced.
Report bugs to: tex-k\@tug.org
@@ -431,6 +417,7 @@ GetOptions (
"device=s",
"embed!",
"exact!",
+ "gray!",
"filter!",
"gs!",
"gscmd=s", # \ref{val_gscmd}
@@ -514,8 +501,7 @@ if ($::opt_filter) {
}
### emacs-page
-### start building GS command line for the pipe
-### take --safer and --gsopts into account
+### building the gs invocation.
### option gscmd
if ($::opt_gscmd) {
@@ -534,12 +520,14 @@ push @GS, $::opt_safer ? '-dSAFER' : '-dNOSAFER';
push @GS, '-dNOPAUSE';
push @GS, '-dBATCH';
-if ($::opt_device and $restricted and
- not $restricted_devlist{$::opt_device}) {
- error "Option forbidden in restricted mode: --device=$::opt_device";
- $::opt_device = '';
+### option device
+if ($::opt_device) {
+ if ($restricted) {
+ error "Option forbidden in restricted mode: --device";
+ } else {
+ debug "Switching from $default_device to $::opt_device";
+ }
}
-$::opt_device = $default_device unless $::opt_device;
push @GS, "-sDEVICE=$::opt_device";
### option outfile
@@ -582,9 +570,11 @@ push @GS, qw[
-dEmbedAllFonts=true
] if $::opt_embed;
-
push @GS, '-dUseFlateCompression=false' unless $::opt_compress;
+push @GS, qw(-sColorConversionStrategy=Gray -dProcessColorModel=/DeviceGray)
+ if $::opt_gray;
+
if ($::opt_res and
not $::opt_res =~ /^(\d+(x\d+)?)$/) {
warnerr "Invalid resolution: $opt_res";