summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xBuild/source/texk/texlive/linked_scripts/a2ping/a2ping.pl238
-rw-r--r--Master/texmf-dist/doc/man/man1/a2ping.1327
-rw-r--r--Master/texmf-dist/doc/man/man1/a2ping.man1.pdfbin14792 -> 35999 bytes
-rw-r--r--Master/texmf-dist/doc/support/a2ping/HISTORY.txt142
-rwxr-xr-xMaster/texmf-dist/scripts/a2ping/a2ping.pl238
-rwxr-xr-xMaster/tlpkg/libexec/ctan2tds8
6 files changed, 533 insertions, 420 deletions
diff --git a/Build/source/texk/texlive/linked_scripts/a2ping/a2ping.pl b/Build/source/texk/texlive/linked_scripts/a2ping/a2ping.pl
index 39331beb795..0da2e4344e2 100755
--- a/Build/source/texk/texlive/linked_scripts/a2ping/a2ping.pl
+++ b/Build/source/texk/texlive/linked_scripts/a2ping/a2ping.pl
@@ -1,36 +1,34 @@
#! /bin/sh
eval '(exit $?0)' && eval 'PERL_BADLANG=x;export PERL_BADLANG;: \
-;exec perl -x -S -- "$0" ${1+"$@"};#'if 0;
-eval 'setenv PERL_BADLANG x;exec perl -x -S -- "$0" $argv:q;#'.q+
+;exec perl -x -- "$0" ${1+"$@"};#'if 0;
+eval 'setenv PERL_BADLANG x;exec perl -x -- "$0" $argv:q;#'.q+
#!perl -w
package Htex::a2ping; $0=~/(.*)/s;unshift@INC,'.';do($1);die$@if$@;__END__+if !1;
-# This Perl script was generated by JustLib2 at Wed Apr 23 09:14:13 2003.
# Don't touch/remove any lines above; http://www.inf.bme.hu/~pts/justlib
#
# This program is free software, licensed under the GNU GPL, >=2.0.
# This software comes with absolutely NO WARRANTY. Use at your own risk!
#
-# !! Imp: merge back to a2ping.pa
# !! Ghostcript compute pipe too slow
-# $ a2ping.pl -v debrecen-hyph.ps de brecen-hyph.pdf
-# a2ping.pl 2.77p, 2004-04-28 -- Written by <pts@fazekas.hu> from April 2003.
+# $ a2ping.pl -v debrecen-hyph.ps debrecen-hyph.pdf
+# a2ping.pl ... -- Written by <pts@fazekas.hu> from April 2003.
# This is free software, GNU GPL >=2.0. There is NO WARRANTY.
# (epstopdf 2.7 Copyright 1998-2001 by Sebastian Rahtz et al.)
# * Strongest BoundingBox comment: %%HiResBoundingBox:
# * Doing --PaperSize unchanged
# * Output filename: debrecen-hyph.pdf
# * Output FileFormat: PDF
-# * Ghostscript ps2pdf command: gs -dSAFER
+# * Ghostscript ps2pdf command: gs -dSAFER
# * Compression: zip
# * Input filename: debrecen-hyph.ps
# * Computing BBox info from non-EPS PS file
-# * Ghostscript compute pipe: gs -dSAFER -dWRITESYSTEMDICT -dNOPAUSE -sDEVICE=bbox -sFN=debrecen-hyph.ps /tmp/a2ping_pl-16977-298938572-c.tgs 2>&1
+# * Ghostscript compute pipe: gs -dSAFER -dWRITESYSTEMDICT -dNOPAUSE -sDEVICE=bbox -sFN=debrecen-hyph.ps /tmp/a2ping_pl-16977-298938572-c.tgs 2>&1
# * Applying BoundingBox from Compute-GS T-: 71 81 539 769
-# * Applying HiResBoundingBox from Compute-GS T-H: 71.837998 81.971997 538.235984 768.113977
+# * Applying HiResBoundingBox from Compute-GS T-H: 71.837998 81.971997 538.235984 768.113977
# * Scanning header for BoundingBox
# * Applying BoundingBox from ADSC T-: 0 0 596 842
# * Final BoundingBox: 0 0 596 842
-# * Ghostscript ps2pdf pipe: gs -dSAFER -q -dBATCH -sDEVICE=pdfwrite -sOutputFile =debrecen-hyph.pdf -
+# * Ghostscript ps2pdf pipe: gs -dSAFER -q -dBATCH -sDEVICE=pdfwrite -sOutputFile=debrecen-hyph.pdf -
# * Done OK, created PDF file debrecen-hyph.pdf (338451 bytes)
#
package just; BEGIN{$INC{'just.pm'}='just.pm'}
@@ -352,7 +350,7 @@ use just +1; # a JustLib application
use strict;
use integer;
use Htex::papers;
-BEGIN { $Htex::a2ping::VERSION="2.77p" }
+BEGIN { $Htex::a2ping::VERSION="2.83p" }
# Imp: option to ignore `%%Orientation: Portrait', which gs respects and rotates by 90 degrees if necessary
# Imp: gs(704?!) sometimes finds too small bbox, see Univers.eps
@@ -401,7 +399,7 @@ BEGIN { $Htex::a2ping::VERSION="2.77p" }
### program identification
my $program = "a2ping.pl";
-my $filedate="2006-11-15"; # my $filedate="2001/03/05";
+my $filedate="2018-03-07"; # See also $Htex::a2ping::VERSION.
my $copyright = "Written by <pts\@fazekas.hu> from April 2003.
This is free software, GNU GPL >=2.0. There is NO WARRANTY.
(epstopdf 2.7 Copyright 1998-2001 by Sebastian Rahtz et al.)\n";
@@ -770,7 +768,7 @@ show_doc() if 1==@ARGV and $ARGV[0] eq '--doc' or $ARGV[0] eq 'doc';
errorUsage "invalid or unknown for --papersize" if !@L;
$::opt_papersize="$L[1],$L[2]" # width, height
}
- } else { die } # unreachable
+ } else { die } # unreachable
} # NEXT opt
errorUsage "Too many arguments (multiple input/output files?)" if $I!=@ARGV;
# splice @ARGV, 0, $I;
@@ -1138,7 +1136,7 @@ my $header;
elsif ($S eq "\305\320\323\306") { $iff="DOS-EPSF" }
elsif ($S eq "\033%-1") { $iff="UEL" }
elsif (substr($S,0,1)eq'%') { $iff="P" } # PS, EPS or PDF
-
+
# PNG JPEG TIFF PNM BMP GIF LBM XPM PCX TGA
if ($iff eq "DOS-EPSF") { # DOS EPSF header
read_error if 30-4>read IN, $S, 30-4, 4;
@@ -1276,7 +1274,7 @@ my $header;
# Dat: PDF to GIF conversion
run_sam2p(1,$S);
}
-
+
error "cannot create from PDF: FileFormat $FileFormat";
OK:
}
@@ -1289,7 +1287,7 @@ my $header;
}
# Dat: Now we are converting from PS|EPS to EPS|markedEPS|PDF|PCL5|PGM
-# So we're converting from PS|EPS with Ghostscript
+# So we're converting from PS|EPS with Ghostscript
### variables and pattern for BoundingBox search
my $bbxpatt = '[0-9eE\.\-]';
@@ -1384,7 +1382,7 @@ sub CorrectBoundingBox($$$$$$$) {
/AutoFilterMonoImages true
/AutoFilterGrayImages true
/AutoFilterColorImages true
-/MonoImageFilter /CCITTFaxEncode
+/MonoImageFilter /CCITTFaxEncode
/GrayImageFilter /DCTEncode
/ColorImageFilter /DCTEncode
" : "
@@ -1543,12 +1541,13 @@ count /OPCOUNT exch def
(bbox-success\n) ..print
quit
} if
- .callbeginpage
}
+ % Run the previous contents of /BeginPage: {--.callbeginpage--}
+ [exch aload pop currentpagedevice /BeginPage get aload pop] cvx
>> setpagedevice
% vvv do these after our call to /setpagedevice
-.currentglobal true .setglobal
+currentglobal true setglobal
systemdict begin
/..paper.redef<< >>def
/..print/print load def
@@ -1657,7 +1656,7 @@ dup/= exch def /print exch def
pop
}forall} forall
end % systemdict
-.setglobal
+setglobal
systemdict readonly pop
(bbox-begin\n) ..print
@@ -1680,7 +1679,7 @@ showpage quit
or $res!~s/\A(?:\w+ Ghostscript \d|Copyright .* artofcode ).*\n// # AFPL Ghostscript 6.50 (2000-12-02)
or $res!~s/.*?^bbox-begin\n//m;
if ($res!~s/\nbbox-success\n\Z(?!\n)/\n/) {
- warning # not `error', mpost(1) `prologues:=0; ... btex fonts' output won't compile
+ warning # not `error', mpost(1) `prologues:=0; ... btex fonts' output won't compile
"BBox discovery was not successful";
# !! continue only if MetaPost output?
goto SKIP_BBOX_DISC;
@@ -1771,7 +1770,7 @@ showpage quit
if (defined $papersize_x and ($::opt_bboxfrom eq 'papersize' or ($::opt_bboxfrom eq 'guess' and is_set_pagesize_ok()))) {
$allow_adsc_bb=0;
$do_bb_line->("set 0 0 $papersize_x $papersize_y"," from /PageSize"); # does ($llx,$lly,$urx,$ury)=(0,0,$papersize_x,$papersize_y);
- }
+ }
$allow_adsc_bb=0 if ($::opt_bboxfrom eq 'compute-gs') ? ($bbc!=0)
: ($::opt_bboxfrom eq 'guess') ? ($bbc!=0 and is_page1_stop()) # Imp: is is_page1_stop() OK here?
: 0;
@@ -1983,7 +1982,7 @@ if ($FileFormat eq 'PDF' or $FileFormat eq 'PDF1') {
$scale3_pnm_fn=$ofn;
$ofn=fix_force_out('S3.pnm') if $do_scale3_pnm;
# ^^^ Dat: this must be the last call to fix_force_out()
- }
+ }
$pipe.="$GSOPTS -sOutputFile=".fnq($ofn)." -";
debug "Ghostscript ps2raster pipe:", $pipe;
open(OUT, "| $pipe") or error "Cannot open Ghostscript pipe";
@@ -2000,7 +1999,7 @@ die unless binmode OUT;
if (is_need_showpage() and is_page1_stop()) {
$to_OUT.="/showpage{showpage quit}bind def\n"; # don't call showpage twice
$after_code.="showpage\n";
-}
+}
error "write OUT" if !print OUT $to_OUT;
$to_OUT="";
@@ -2112,7 +2111,7 @@ if (!$ll_zero and ($FileFormat eq 'PDF' or $FileFormat eq 'PDF1')) { # correct /
currentdict pdfclose end end end
';
die unless close F;
-
+
my $gs2="$GS -dNODISPLAY -dBATCH -sFN=".fnq(fix_pipe_out(undef))." -q ".fnq($tfn);
debug "Ghostscript dup pipe: $gs2";
my $offset=`$gs2`;
@@ -2360,14 +2359,97 @@ write extra output formats, B<sam2p> and GS are used.
PNM output formats are PGM, PGM and PPM. To write PNM output formats, GS
is used.
+=head1 OPTIONS
-=head1 TIPS AND TRICKS
+=head2 General Options
=over 2
-=item *
+=item B<-h>, B<--help>
+
+Show a summary of the usage
+
+=item B<--doc>
+
+Show the man page
+
+=item B<-v>, B<--(no)verbose>
+
+Show progress and debug messages (default: no)
+
+=head2 Options for the Bounding box
+
+=item B<--(no)hires>
+
+Use HiResBoundingBox in the input file, if present (default: yes)
+
+=item B<--(no)exact>
+
+Use ExactBoundingBox in the input file, if present (default: no)
+
+=item B<--(no)keepoldmediabox>
+
+keep only old, [0 0]-based MediaBox in PDF (default: no)
+
+=item B<--bboxfrom=>I<adsc|compute-gs|guess|pagesize>
+
+Method for determining the BoundingBox (default: guess)
+
+=item B<--(no)below>
+
+Allow page content below and left of the origin (default: no)
+
+
+=head2 Options for graphics and fonts
+
+=item B<--(no)compress>
+
+use compression (default: best)
-Call with the B<-v> option to see progress and debug messages.
+=item B<--(no)antialias>
+
+render shades at outlines. Possible values: (=I<scale3yes> =I<no> =I<yes>) (default: scale3no)
+
+=item B<--(no)lossy>
+
+allow lossy image filters (EPS->PDF) (default: yes)
+
+=item B<--papersize=>I<unchanged|force-unknown|600bpx5cm>
+
+(default: default) (bp)
+
+=item B<--threshold=>
+
+min color for 1 in 8->1 bit conv (default: 128)
+
+
+=head2 Options for debugging and changing internals
+
+=item B<--(no)tmpunlink>
+
+Unlink temporary files (default: yes). Use B<--notmpunklink> if you
+want to inspect intermediate files.
+
+=item B<--gs-cmd=>I<path>
+
+path to Ghostscript program (default: gs or gswin32c)
+
+=item B<--gs-ccmd=>I<path>
+
+path to Ghostscript for BoundingBox calculation (default: gs or gswin32c)
+
+=item B<--gsextra=>I<GS_ARGS>
+
+Pass extra arguments to gs
+
+=item B<--extra=>
+
+Pass extra arguments to external program (i.e pdftops)
+
+
+=head1 TIPS AND TRICKS
+
+=over 2
=item *
@@ -2433,6 +2515,11 @@ B<--Resolution>. The default is B<--Resolution=72>. If your sampled output file
is going to be really big, you should specify B<--AntiAlias=yes> instead of
the default B<--AntiAlias=scale3no> to speed up conversion.
+=item *
+
+To make sure fonts are included in a PDF file generated from eps, use
+B<--gsextra='-dEmbedAllFonts=true -dPDFSETTINGS=/printer'>.
+
=back
@@ -2470,7 +2557,7 @@ Conversion from PS to EPS: keeps 1st page only, removes setpagedevice etc.
=head1 AUTHORS
-The author of B<a2ping> is Szabó Péter <F<pts@fazekas.hu>>.
+The author of B<a2ping> is Péter Szabó <F<pts@fazekas.hu>>.
B<a2ping> is inspired by and historically based on the B<epstopdf> Perl
script modified by Thomas Esser, Sept. 1998, but his modifications have
@@ -2479,94 +2566,5 @@ share common code anymore. B<epstopdf> is written by Sebastian Rahtz,
for Elsevier Science. B<epstopdf> contained extra tricks from Hans Hagen's
texutil.
-=head1 HISTORY
-
-=head2 1999/05/06 v2.5 (Heiko Oberdiek)
-
- * New options: --hires, --exact, --filter, --help.
- * Many cosmetics: title, usage, ...
- * New code for debug, warning, error
- * Detecting of cygwin perl
- * Scanning for %%{Hires,Exact,}BoundingBox.
- * Scanning only the header in order not to get a wrong
- BoundingBox of an included file.
- * (atend) supported.
- * uses strict; (earlier error detecting).
- * changed first comment from '%!PS' to '%!';
- * corrected (atend) pattern: '\s*\(atend\)'
- * using of $bbxpat in all BoundingBox cases,
- correct the first white space to '...Box:\s*$bb...'
- * corrected first line (one line instead of two before 'if 0;';
-
-=head2 2000/11/05 v2.6 (Heiko Oberdiek)
-
- * %%HiresBoundingBox corrected to %%HiResBoundingBox
-
-=head2 2001/03/05 v2.7 (Heiko Oberdiek)
-
- * Newline before grestore for the case that there is no
- whitespace at the end of the eps file.
-
-=head2 2003/02/02 (Szabó Péter)
-
- * option --below
- * removes DOS EPSF binary junk correctly
- * adds all 3 BoundingBox DSC comments
- * reads all 3 BoundingBox DSC comments, and picks the best
- * forces BoundingBox to be an integer
- * adds %%EndComments and proper %!PS-Adobe-?-? EPSF-?.? header
- * adds %%Pages:
- * adds invocation syntax: a2ping <infile.eps> <outfile.eps|pdf>
- * can convert PDF to EPS (by calling pdftops(1)) and PDF to PDF
- * emulates work for PDF input
-
-=head2 2003/04/16 (Szabó Péter)
-
- * added PS and sam2p support, renamed to a2ping
- * sam2p and pdftops if $InputFilename eq '-';
- * remove PJL UEL header from the beginning
- * works for PS non-EPS files for input
- * input support for PNG JPEG TIFF PNM BMP GIF LBM XPM PCX TGA via sam2p
- * removes ^L (form feed) from end of EPS file
- * -x=-c:rle to add sam2p options
-
-=head2 2003/04/26 (Szabó Péter)
-
- * omit the unnecessary setpagedevice calls when creating normal eps
- * --noverbose --nocompress supported differently
- * no more option defaults :-(
- * justlib2
- * multi-page output with PS:, PDF:, PCL5:
- * after `a2ping -pa4', file out.pcl says: `HP PCL printer data - A4 page
- size', instead of `US letter'
- * justlib2-ified doesn't depend on Getopt::Long anymore
- * fully supports filtering (stdin and/or stdout), PDF and PCL5 output to
- pipe (!$$ll_zero)
- * adds DSC ``%%DocumentMedia: plain 612 792 0 () ()''
- * BoundingBox precedence for EPS input: --PageSize, %%*BoundingBox,
- setpagedevice. Precedence for other inputs: --PageSize, setpagedevice,
- %%*BoundingBox
-
-=head2 2003/09/25 (Szabó Péter)
-
- * --bboxfrom=adsc: %%BoundingBox overrides -sDEVICE=bbox
- * improved bbox discovery
- * many bugfixes
- * MetaPost EPS input fixes for prologues:=0;
- * a2ping.pl -v --papersize=50,60 --bboxfrom=compute-gs t.ps t2.ps
- * consistent bbox, --PageSize, /PageSize handling
- * consistent --Resolution and --Duplex handling
-
-=head2 2003/12/02 (Szabó Péter)
-
- * --bboxfrom=compute-gs option to fix PS -> EPS bbox (gs -sDEVICE=bbox), tuzv.eps
-
-=head2 2004/02/10 v2.77 (Szabó Péter)
-
- * the compute-pipe routine is now run unless --bboxfrom=guess with EPS
- * added --gsextra=
- * added --antialias=
- * added FileFormat PBM, PGM, PPM
- * separated FileFormat features to FL_* constants
- * added --doc
- * there is no default FileFormat (PDF) anymore
+B<a2ping> contains contributions from several people, see the file
+F<HISTORY.txt> for details. Thank you all for contributing!
diff --git a/Master/texmf-dist/doc/man/man1/a2ping.1 b/Master/texmf-dist/doc/man/man1/a2ping.1
index ec06d892da8..5ff108e436f 100644
--- a/Master/texmf-dist/doc/man/man1/a2ping.1
+++ b/Master/texmf-dist/doc/man/man1/a2ping.1
@@ -1,15 +1,7 @@
-.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.13
+.\" Automatically generated by Pod::Man 4.09 (Pod::Simple 3.35)
.\"
.\" Standard preamble:
.\" ========================================================================
-.de Sh \" Subsection heading
-.br
-.if t .Sp
-.ne 5
-.PP
-\fB\\$1\fR
-.PP
-..
.de Sp \" Vertical space (when we can't use .PP)
.if t .sp .5v
.if n .sp
@@ -25,11 +17,11 @@
..
.\" Set up some character translations and predefined strings. \*(-- will
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
-.\" double quote, and \*(R" will give a right double quote. | will give a
-.\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used to
-.\" do unbreakable dashes and therefore won't be available. \*(C` and \*(C'
-.\" expand to `' in nroff, nothing in troff, for use with C<>.
-.tr \(*W-|\(bv\*(Tr
+.\" double quote, and \*(R" will give a right double quote. \*(C+ will
+.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
+.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
+.\" nothing in troff, for use with C<>.
+.tr \(*W-
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
.ie n \{\
. ds -- \(*W-
@@ -46,25 +38,33 @@
. ds PI \(*p
. ds L" ``
. ds R" ''
+. ds C`
+. ds C'
'br\}
.\"
-.\" If the F register is turned on, we'll generate index entries on stderr for
-.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
+.\" Escape single quotes in literal strings from groff's Unicode transform.
+.ie \n(.g .ds Aq \(aq
+.el .ds Aq '
+.\"
+.\" If the F register is >0, we'll generate index entries on stderr for
+.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
.\" entries marked with X<> in POD. Of course, you'll have to process the
.\" output yourself in some meaningful fashion.
-.if \nF \{\
+.\"
+.\" Avoid warning from groff about undefined register 'F'.
+.de IX
+..
+.if !\nF .nr F 0
+.if \nF>0 \{\
. de IX
. tm Index:\\$1\t\\n%\t"\\$2"
..
-. nr % 0
-. rr F
+. if !\nF==2 \{\
+. nr % 0
+. nr F 2
+. \}
.\}
.\"
-.\" For nroff, turn off justification. Always turn off hyphenation; it makes
-.\" way too many mistakes in technical documents.
-.hy 0
-.if n .na
-.\"
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
.\" Fear. Run. Save yourself. No user-serviceable parts.
. \" fudge factors for nroff and troff
@@ -129,7 +129,11 @@
.\" ========================================================================
.\"
.IX Title "A2PING 1"
-.TH A2PING 1 "2004-05-26" "perl v5.8.1" "User Contributed Perl Documentation"
+.TH A2PING 1 "2018-03-08" "a2ping" "Peter Szabo"
+.\" For nroff, turn off justification. Always turn off hyphenation; it makes
+.\" way too many mistakes in technical documents.
+.if n .ad l
+.nh
.ds pts-dev \*[.T]
.do if '\*[.T]'ascii' .ds pts-dev tty
.do if '\*[.T]'ascii8' .ds pts-dev tty
@@ -143,71 +147,131 @@
.nr IN 2n
.\}
.ad n
-
.SH "NAME"
-a2ping.pl \-\- convert between PS, EPS and PDF and other page description
+a2ping.pl -- convert between PS, EPS and PDF and other page description
formats
.SH "SYNOPSIS"
.IX Header "SYNOPSIS"
-\&\& \fBa2ping.pl\fR [\fB\-\-\fR]\fBhelp\fR
- \fBa2ping.pl\fR [\fB\-\-\fR]\fBdoc\fR
- \fBa2ping.pl\fR [\fIoptions\fR] <\fIinputfile\fR> [[\fIoutformat\fR:] \fIoutputfile\fR]
+Z<> B<a2ping.pl> [B<-->]B<help>
+ B<a2ping.pl> [B<-->]B<doc>
+ B<a2ping.pl> [I<options>] <I<inputfile>> [[I<outformat>:] I<outputfile>]
.SH "DESCRIPTION"
.IX Header "DESCRIPTION"
-\&\fBa2ping\fR is a \s-1UNIX\s0 command line utility written in Perl that
-converts many raster image and vector graphics formats to \s-1EPS\s0 or \s-1PDF\s0 and
-other page description formats. Accepted input file formats are: \s-1PS\s0
-(PostScript), \s-1EPS\s0, \s-1PDF\s0, \s-1PNG\s0, \s-1JPEG\s0, \s-1TIFF\s0, \s-1PNM\s0, \s-1BMP\s0, \s-1GIF\s0, \s-1LBM\s0, \s-1XPM\s0, \s-1PCX\s0,
-\&\s-1TGA\s0. Accepted output formats are: \s-1EPS\s0, \s-1PCL5\s0, \s-1PDF\s0, \s-1PDF1\s0, \s-1PBM\s0, \s-1PGM\s0, \s-1PPM\s0,
-\&\s-1PS\s0, markedEPS, markedPS, \s-1PNG\s0, \s-1XWD\s0, \s-1BMP\s0, \s-1TIFF\s0, \s-1JPEG\s0, \s-1GIF\s0, \s-1XPM\s0.
-\&\fBa2ping\fR delegates the low-level work to
-Ghostscript (\s-1GS\s0), \fBpdftops\fR and \fBsam2p\fR. \fBa2ping\fR fixes many glitches
-during the \s-1EPS\s0 to \s-1EPS\s0 conversion, so its output is often more compatible
+B<a2ping> is a UNIX command line utility written in Perl that
+converts many raster image and vector graphics formats to EPS or PDF and
+other page description formats. Accepted input file formats are: PS
+(PostScript), EPS, PDF, PNG, JPEG, TIFF, PNM, BMP, GIF, LBM, XPM, PCX,
+TGA. Accepted output formats are: EPS, PCL5, PDF, PDF1, PBM, PGM, PPM,
+PS, markedEPS, markedPS, PNG, XWD, BMP, TIFF, JPEG, GIF, XPM.
+B<a2ping> delegates the low-level work to
+Ghostscript (GS), B<pdftops> and B<sam2p>. B<a2ping> fixes many glitches
+during the EPS to EPS conversion, so its output is often more compatible
and better embeddable than its input.
-.PP
-Without the \f(CW\*(C`\-\-below\*(C'\fR option, it is guarenteed to start at the 0,0
-coordinate. \f(CW\*(C`\-\-below\*(C'\fR, \f(CW\*(C`\-\-hires\*(C'\fR and \f(CW\*(C`\-v\*(C'\fR are recommended options.
-.PP
+Without the C<--below> option, it is guarenteed to start at the 0,0
+coordinate. C<--below>, C<--hires> and C<-v> are recommended options.
The page size is set exactly corresponding to the BoundingBox.
This means that when Ghostscript renders it, the result needs no
-cropping, and the \s-1PDF\s0 MediaBox is correct.
-.PP
+cropping, and the PDF MediaBox is correct.
If the bounding box is not right, of course, you have problems. If you
feed crap in, you get crap. But you can supply the
-\&\fB\-\-bboxfrom=compute\-gs\fR option to make \s-1GS\s0 recompute the bounding box.
-.PP
-The name of the input file doesn't matter \*(-- \fBa2ping\fR detects the file
+B<--bboxfrom=compute-gs> option to make GS recompute the bounding box.
+The name of the input file doesn't matter -- B<a2ping> detects the file
format based on the first few bytes of the file. The name of the output
-file matters if \fIoutformat\fR is missing from the command line: then the
-extension of the output file determines the FileFormat (\fIoutformat\fR).
+file matters if I<outformat> is missing from the command line: then the
+extension of the output file determines the FileFormat (I<outformat>).
.SH "EXTERNAL PROGRAMS"
.IX Header "EXTERNAL PROGRAMS"
-The internal file format of \fBa2ping.pl\fR is \s-1PS/EPS\s0. Everything read is
-first converted to \s-1PS\s0 or \s-1EPS\s0, then processed by \fBa2ping.pl\fR, then
+The internal file format of B<a2ping.pl> is PS/EPS. Everything read is
+first converted to PS or EPS, then processed by B<a2ping.pl>, then
converted to the output format.
-.PP
-To analyse the bounding box and other properties of non-EPS \s-1PS\s0 files
-(and \s-1EPS\s0 files with option \fB\-\-bboxfrom\fR other than \fB=guess\fR), \s-1GS\s0 is
-used. Converting \s-1PS\s0 to \s-1EPS\s0 involves this analysis.
-.PP
-To write \s-1PDF\s0 files, \s-1GS\s0 is used.
-.PP
-To read \s-1PDF\s0 files, \fBpdftops\fR from the \fBxpdf\fR package is used.
-.PP
-Sampled input formats are \s-1PNG\s0, \s-1JPEG\s0, \s-1TIFF\s0, \s-1PNM\s0, \s-1BMP\s0, \s-1GIF\s0, \s-1LBM\s0, \s-1XPM\s0, \s-1PCX\s0
-and \s-1TGA\s0. To read sampled input formats, \fBsam2p\fR is used. \fBsam2p\fR is
-a raster image converter written in \*(C+ by the author of \fBa2ping.pl\fR.
-.PP
-Extra output formats are \s-1PNG\s0, \s-1XWD\s0, \s-1BMP\s0, \s-1TIFF\s0, \s-1JPEG\s0, \s-1GIF\s0 and \s-1XPM\s0. To
-write extra output formats, \fBsam2p\fR and \s-1GS\s0 are used.
-.PP
-\&\s-1PNM\s0 output formats are \s-1PGM\s0, \s-1PGM\s0 and \s-1PPM\s0. To write \s-1PNM\s0 output formats, \s-1GS\s0
+To analyse the bounding box and other properties of non-EPS PS files
+(and EPS files with option B<--bboxfrom> other than B<=guess>), GS is
+used. Converting PS to EPS involves this analysis.
+To write PDF files, GS is used.
+To read PDF files, B<pdftops> from the B<xpdf> package is used.
+Sampled input formats are PNG, JPEG, TIFF, PNM, BMP, GIF, LBM, XPM, PCX
+and TGA. To read sampled input formats, B<sam2p> is used. B<sam2p> is
+a raster image converter written in C++ by the author of B<a2ping.pl>.
+Extra output formats are PNG, XWD, BMP, TIFF, JPEG, GIF and XPM. To
+write extra output formats, B<sam2p> and GS are used.
+PNM output formats are PGM, PGM and PPM. To write PNM output formats, GS
is used.
+.SH "OPTIONS"
+.IX Header "OPTIONS"
+.SS "General Options"
+.IX Subsection "General Options"
+.IP "\fB\-h\fR, \fB\-\-help\fR" 2
+.IX Item "-h, --help"
+Show a summary of the usage
+.PD 0
+.IP "\fB\-\-doc\fR" 2
+.IX Item "--doc"
+Show the man page
+.IP "\fB\-v\fR, \fB\-\-(no)verbose\fR" 2
+.IX Item "-v, --(no)verbose"
+Show progress and debug messages (default: no)
+.PD
+.SS "Options for the Bounding box"
+.IX Subsection "Options for the Bounding box"
+.IP "\fB\-\-(no)hires\fR" 4
+.IX Item "--(no)hires"
+Use HiResBoundingBox in the input file, if present (default: yes)
+.PD 0
+.IP "\fB\-\-(no)exact\fR" 4
+.IX Item "--(no)exact"
+Use ExactBoundingBox in the input file, if present (default: no)
+.IP "\fB\-\-(no)keepoldmediabox\fR" 4
+.IX Item "--(no)keepoldmediabox"
+keep only old, [0 0]-based MediaBox in PDF (default: no)
+.IP "\fB\-\-bboxfrom=\fR\fIadsc|compute\-gs|guess|pagesize\fR" 4
+.IX Item "--bboxfrom=adsc|compute-gs|guess|pagesize"
+Method for determining the BoundingBox (default: guess)
+.IP "\fB\-\-(no)below\fR" 4
+.IX Item "--(no)below"
+Allow page content below and left of the origin (default: no)
+.PD
+.SS "Options for graphics and fonts"
+.IX Subsection "Options for graphics and fonts"
+.IP "\fB\-\-(no)compress\fR" 4
+.IX Item "--(no)compress"
+use compression (default: best)
+.PD 0
+.IP "\fB\-\-(no)antialias\fR" 4
+.IX Item "--(no)antialias"
+render shades at outlines. Possible values: (=I<scale3yes> =I<no> =I<yes>) (default: scale3no)
+.IP "\fB\-\-(no)lossy\fR" 4
+.IX Item "--(no)lossy"
+allow lossy image filters (EPS->PDF) (default: yes)
+.IP "\fB\-\-papersize=\fR\fIunchanged|force\-unknown|600bpx5cm\fR" 4
+.IX Item "--papersize=unchanged|force-unknown|600bpx5cm"
+(default: default) (bp)
+.IP "\fB\-\-threshold=\fR" 4
+.IX Item "--threshold="
+min color for 1 in 8->1 bit conv (default: 128)
+.PD
+.SS "Options for debugging and changing internals"
+.IX Subsection "Options for debugging and changing internals"
+.IP "\fB\-\-(no)tmpunlink\fR" 4
+.IX Item "--(no)tmpunlink"
+Unlink temporary files (default: yes). Use B<--notmpunklink> if you
+want to inspect intermediate files.
+.PD 0
+.IP "\fB\-\-gs\-cmd=\fR\fIpath\fR" 4
+.IX Item "--gs-cmd=path"
+path to Ghostscript program (default: gs or gswin32c)
+.IP "\fB\-\-gs\-ccmd=\fR\fIpath\fR" 4
+.IX Item "--gs-ccmd=path"
+path to Ghostscript for BoundingBox calculation (default: gs or gswin32c)
+.IP "\fB\-\-gsextra=\fR\fI\s-1GS_ARGS\s0\fR" 4
+.IX Item "--gsextra=GS_ARGS"
+Pass extra arguments to gs
+.IP "\fB\-\-extra=\fR" 4
+.IX Item "--extra="
+Pass extra arguments to external program (i.e pdftops)
+.PD
.SH "TIPS AND TRICKS"
.IX Header "TIPS AND TRICKS"
.IP "\(bu" 2
-Call with the \fB\-v\fR option to see progress and debug messages.
-.IP "\(bu" 2
If your \s-1EPS\s0 contains a wrong bounding box, you can fix it by running
\&\f(CW\*(C`a2ping.pl \-v \-\-bboxfrom=compute\-gs thefile.eps \-\-\*(C'\fR
.IP "\(bu" 2
@@ -222,7 +286,7 @@ recommended only if there is a backup of the file to be restored in case
.IP "\(bu" 2
If you specify \fB\-\-\fR as \fIoutputfile\fR, it will be the same as \fIinputfile\fR.
.IP "\(bu" 2
-\&\fBa2ping\fR respects \fB\-\-Duplex\fR for FileFormat \s-1PCL5\s0, even though \s-1GS\s0 doesn't.
+\&\fBa2ping\fR respects \fB\-\-Duplex\fR for FileFormat \s-1PCL5,\s0 even though \s-1GS\s0 doesn't.
.IP "\(bu" 2
If you have an incompatible \s-1PS\s0 that \s-1GS\s0 can read but your printer cannot print,
just run \f(CW\*(C`a2ping.pl foo.ps PDF: \- | a2ping.pl \- PS: foo.ps\*(C'\fR
@@ -245,12 +309,15 @@ When creating a \s-1PBM\s0 file, antialiasing usually doesn't improve the
quality, so it is switched off by default. But if you set
\&\fB\-\-antialias=scale3no\fR or \fB\-\-antialias=scale3yes\fR, \s-1GS\s0 will render a \s-1PGM\s0 file,
and the value of \fB\-\-threshold\fR determines the minimum intensity for white in
-the final \s-1PBM\s0.
+the final \s-1PBM.\s0
.IP "\(bu" 2
If you need a bigger sampled output file, specify a larger
\&\fB\-\-Resolution\fR. The default is \fB\-\-Resolution=72\fR. If your sampled output file
is going to be really big, you should specify \fB\-\-AntiAlias=yes\fR instead of
the default \fB\-\-AntiAlias=scale3no\fR to speed up conversion.
+.IP "\(bu" 2
+To make sure fonts are included in a \s-1PDF\s0 file generated from eps, use
+\&\fB\-\-gsextra='\-dEmbedAllFonts=true \-dPDFSETTINGS=/printer'\fR.
.SH "MISC"
.IX Header "MISC"
.IP "\(bu" 2
@@ -269,112 +336,12 @@ Conversion from \s-1PDF\s0 to \s-1EPS:\s0 calls pdftops \-eps (of the xpdf packa
Conversion from \s-1PS\s0 to \s-1EPS:\s0 keeps 1st page only, removes setpagedevice etc.
.SH "AUTHORS"
.IX Header "AUTHORS"
-The author of \fBa2ping\fR is Szabó Péter <\fIpts@fazekas.hu\fR>.
-.PP
-\&\fBa2ping\fR is inspired by and historically based on the \fBepstopdf\fR Perl
+The author of B<a2ping> is Péter Szabó <F<pts@fazekas.hu>>.
+B<a2ping> is inspired by and historically based on the B<epstopdf> Perl
script modified by Thomas Esser, Sept. 1998, but his modifications have
-been removed from \fBa2ping\fR, and also \fBa2ping\fR and \fBepstopdf\fR do not
-share common code anymore. \fBepstopdf\fR is written by Sebastian Rahtz,
-for Elsevier Science. \fBepstopdf\fR contained extra tricks from Hans Hagen's
+been removed from B<a2ping>, and also B<a2ping> and B<epstopdf> do not
+share common code anymore. B<epstopdf> is written by Sebastian Rahtz,
+for Elsevier Science. B<epstopdf> contained extra tricks from Hans Hagen's
texutil.
-.SH "HISTORY"
-.IX Header "HISTORY"
-.Sh "1999/05/06 v2.5 (Heiko Oberdiek)"
-.IX Subsection "1999/05/06 v2.5 (Heiko Oberdiek)"
-.Vb 14
-\& * New options: --hires, --exact, --filter, --help.
-\& * Many cosmetics: title, usage, ...
-\& * New code for debug, warning, error
-\& * Detecting of cygwin perl
-\& * Scanning for %%{Hires,Exact,}BoundingBox.
-\& * Scanning only the header in order not to get a wrong
-\& BoundingBox of an included file.
-\& * (atend) supported.
-\& * uses strict; (earlier error detecting).
-\& * changed first comment from '%!PS' to '%!';
-\& * corrected (atend) pattern: '\es*\e(atend\e)'
-\& * using of $bbxpat in all BoundingBox cases,
-\& correct the first white space to '...Box:\es*$bb...'
-\& * corrected first line (one line instead of two before 'if 0;';
-.Ve
-.Sh "2000/11/05 v2.6 (Heiko Oberdiek)"
-.IX Subsection "2000/11/05 v2.6 (Heiko Oberdiek)"
-.Vb 1
-\& * %%HiresBoundingBox corrected to %%HiResBoundingBox
-.Ve
-.Sh "2001/03/05 v2.7 (Heiko Oberdiek)"
-.IX Subsection "2001/03/05 v2.7 (Heiko Oberdiek)"
-.Vb 2
-\& * Newline before grestore for the case that there is no
-\& whitespace at the end of the eps file.
-.Ve
-.Sh "2003/02/02 (Szabó Péter)"
-.IX Subsection "2003/02/02 (Szabó Péter)"
-.Vb 10
-\& * option --below
-\& * removes DOS EPSF binary junk correctly
-\& * adds all 3 BoundingBox DSC comments
-\& * reads all 3 BoundingBox DSC comments, and picks the best
-\& * forces BoundingBox to be an integer
-\& * adds %%EndComments and proper %!PS-Adobe-?-? EPSF-?.? header
-\& * adds %%Pages:
-\& * adds invocation syntax: a2ping <infile.eps> <outfile.eps|pdf>
-\& * can convert PDF to EPS (by calling pdftops(1)) and PDF to PDF
-\& * emulates work for PDF input
-.Ve
-.Sh "2003/04/16 (Szabó Péter)"
-.IX Subsection "2003/04/16 (Szabó Péter)"
-.Vb 7
-\& * added PS and sam2p support, renamed to a2ping
-\& * sam2p and pdftops if $InputFilename eq '-';
-\& * remove PJL UEL header from the beginning
-\& * works for PS non-EPS files for input
-\& * input support for PNG JPEG TIFF PNM BMP GIF LBM XPM PCX TGA via sam2p
-\& * removes ^L (form feed) from end of EPS file
-\& * -x=-c:rle to add sam2p options
-.Ve
-.Sh "2003/04/26 (Szabó Péter)"
-.IX Subsection "2003/04/26 (Szabó Péter)"
-.Vb 14
-\& * omit the unnecessary setpagedevice calls when creating normal eps
-\& * --noverbose --nocompress supported differently
-\& * no more option defaults :-(
-\& * justlib2
-\& * multi-page output with PS:, PDF:, PCL5:
-\& * after `a2ping -pa4', file out.pcl says: `HP PCL printer data - A4 page
-\& size', instead of `US letter'
-\& * justlib2-ified doesn't depend on Getopt::Long anymore
-\& * fully supports filtering (stdin and/or stdout), PDF and PCL5 output to
-\& pipe (!$$ll_zero)
-\& * adds DSC ``%%DocumentMedia: plain 612 792 0 () ()''
-\& * BoundingBox precedence for EPS input: --PageSize, %%*BoundingBox,
-\& setpagedevice. Precedence for other inputs: --PageSize, setpagedevice,
-\& %%*BoundingBox
-.Ve
-.Sh "2003/09/25 (Szabó Péter)"
-.IX Subsection "2003/09/25 (Szabó Péter)"
-.Vb 7
-\& * --bboxfrom=adsc: %%BoundingBox overrides -sDEVICE=bbox
-\& * improved bbox discovery
-\& * many bugfixes
-\& * MetaPost EPS input fixes for prologues:=0;
-\& * a2ping.pl -v --papersize=50,60 --bboxfrom=compute-gs t.ps t2.ps
-\& * consistent bbox, --PageSize, /PageSize handling
-\& * consistent --Resolution and --Duplex handling
-.Ve
-.Sh "2003/12/02 (Szabó Péter)"
-.IX Subsection "2003/12/02 (Szabó Péter)"
-.Vb 1
-\& * --bboxfrom=compute-gs option to fix PS -> EPS bbox (gs -sDEVICE=bbox), tuzv.eps
-.Ve
-.Sh "2004/02/10 v2.77 (Szabó Péter)"
-.IX Subsection "2004/02/10 v2.77 (Szabó Péter)"
-.Vb 7
-\& * the compute-pipe routine is now run unless --bboxfrom=guess with EPS
-\& * added --gsextra=
-\& * added --antialias=
-\& * added FileFormat PBM, PGM, PPM
-\& * separated FileFormat features to FL_* constants
-\& * added --doc
-\& * there is no default FileFormat (PDF) anymore
-.Ve
+B<a2ping> contains contributions from several people, see the file
+F<HISTORY.txt> for details. Thank you all for contributing!
diff --git a/Master/texmf-dist/doc/man/man1/a2ping.man1.pdf b/Master/texmf-dist/doc/man/man1/a2ping.man1.pdf
index 4921e218674..faf2ee8b3a6 100644
--- a/Master/texmf-dist/doc/man/man1/a2ping.man1.pdf
+++ b/Master/texmf-dist/doc/man/man1/a2ping.man1.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/support/a2ping/HISTORY.txt b/Master/texmf-dist/doc/support/a2ping/HISTORY.txt
new file mode 100644
index 00000000000..3147b91e4f0
--- /dev/null
+++ b/Master/texmf-dist/doc/support/a2ping/HISTORY.txt
@@ -0,0 +1,142 @@
+
+=head1 HISTORY
+
+=head2 1999-05-06 v2.5 (Heiko Oberdiek)
+
+ * New options: --hires, --exact, --filter, --help.
+ * Many cosmetics: title, usage, ...
+ * New code for debug, warning, error
+ * Detecting of cygwin perl
+ * Scanning for %%{Hires,Exact,}BoundingBox.
+ * Scanning only the header in order not to get a wrong
+ BoundingBox of an included file.
+ * (atend) supported.
+ * uses strict; (earlier error detecting).
+ * changed first comment from '%!PS' to '%!';
+ * corrected (atend) pattern: '\s*\(atend\)'
+ * using of $bbxpat in all BoundingBox cases,
+ correct the first white space to '...Box:\s*$bb...'
+ * corrected first line (one line instead of two before 'if 0;';
+
+=head2 2000-11-05 v2.6 (Heiko Oberdiek)
+
+ * %%HiresBoundingBox corrected to %%HiResBoundingBox
+
+=head2 2001-03-05 v2.7 (Heiko Oberdiek)
+
+ * Newline before grestore for the case that there is no
+ whitespace at the end of the eps file.
+
+=head2 2003-02-02 v2.70p (Péter Szabó)
+
+ * option --below
+ * removes DOS EPSF binary junk correctly
+ * adds all 3 BoundingBox DSC comments
+ * reads all 3 BoundingBox DSC comments, and picks the best
+ * forces BoundingBox to be an integer
+ * adds %%EndComments and proper %!PS-Adobe-?-? EPSF-?.? header
+ * adds %%Pages:
+ * adds invocation syntax: a2ping <infile.eps> <outfile.eps|pdf>
+ * can convert PDF to EPS (by calling pdftops(1)) and PDF to PDF
+ * emulates work for PDF input
+
+=head2 2003-04-16 (Péter Szabó)
+
+ * added PS and sam2p support, renamed to a2ping
+ * sam2p and pdftops if $InputFilename eq '-';
+ * remove PJL UEL header from the beginning
+ * works for PS non-EPS files for input
+ * input support for PNG JPEG TIFF PNM BMP GIF LBM XPM PCX TGA via sam2p
+ * removes ^L (form feed) from end of EPS file
+ * -x=-c:rle to add sam2p options
+
+=head2 2003-04-26 (Péter Szabó)
+
+ * omit the unnecessary setpagedevice calls when creating normal eps
+ * --noverbose --nocompress supported differently
+ * no more option defaults :-(
+ * justlib2
+ * multi-page output with PS:, PDF:, PCL5:
+ * after `a2ping -pa4', file out.pcl says: `HP PCL printer data - A4 page
+ size', instead of `US letter'
+ * justlib2-ified doesn't depend on Getopt::Long anymore
+ * fully supports filtering (stdin and/or stdout), PDF and PCL5 output to
+ pipe (!$$ll_zero)
+ * adds DSC ``%%DocumentMedia: plain 612 792 0 () ()''
+ * BoundingBox precedence for EPS input: --PageSize, %%*BoundingBox,
+ setpagedevice. Precedence for other inputs: --PageSize, setpagedevice,
+ %%*BoundingBox
+
+=head2 2003-09-25 (Péter Szabó)
+
+ * --bboxfrom=adsc: %%BoundingBox overrides -sDEVICE=bbox
+ * improved bbox discovery
+ * many bugfixes
+ * MetaPost EPS input fixes for prologues:=0;
+ * a2ping.pl -v --papersize=50,60 --bboxfrom=compute-gs t.ps t2.ps
+ * consistent bbox, --PageSize, /PageSize handling
+ * consistent --Resolution and --Duplex handling
+
+=head2 2003-12-02 (Péter Szabó)
+
+ * --bboxfrom=compute-gs option to fix PS -> EPS bbox (gs -sDEVICE=bbox), tuzv.eps
+
+=head2 2004-02-10 v2.76p (Péter Szabó)
+
+ * This is the first version to be (retroactively) added to the Git repo.
+ * the compute-pipe routine is now run unless --bboxfrom=guess with EPS
+ * added --gsextra=
+ * added --antialias=
+ * added FileFormat PBM, PGM, PPM
+ * separated FileFormat features to FL_* constants
+ * added --doc
+ * there is no default FileFormat (PDF) anymore
+
+=head2 200?-??-?? v2.77p (Péter Szabó)
+
+ * Almost identical to v2.81p.
+ * Almost identical to the /usr/bin/a2ping in TeX Live 2013, Ubuntu package
+ https://packages.ubuntu.com/trusty/texlive-extra-utils
+ 2013.20140215-2 . /usr/bin/a2ping has the version number 2.77 in it.
+
+=head2 200?-??-?? v2.78p (Péter Szabó)
+
+ * Almost identical to v2.82p.
+ * Has been available in http://www.inf.bme.hu/~pts/a2ping-latest.zip and
+ then in http://pts.50.hu/a2ping-latest.zip between 2007-03-07 and
+ 2018-03-06.
+ * Has been published to http://freshmeat.sourceforge.net/projects/a2ping .
+
+=head2 2004-04-28 v2.80p (Péter Szabó)
+
+ * Added reporting of the license (GPL).
+ * Some more improvements, no history text.
+
+=head2 2006-11-15 v2.81p (Péter Szabó)
+
+ * Almost identical to v2.77p.
+ * Added keepoldmediabox.
+ * Lots of improvements, no history text.
+ * Almost identical to the /usr/bin/a2ping in TeX Live 2013, Ubuntu package
+ https://packages.ubuntu.com/trusty/texlive-extra-utils
+ 2013.20140215-2 . /usr/bin/a2ping has the version number 2.77 in it.
+
+=head2 2007-03-07 v2.82p (Péter Szabó and Frank Küster)
+
+ * Almost identical to v2.78p.
+ * Improvements for tetex2 and tetex3 compatibility.
+ * Some more improvements, no history text.
+ * POD documentation enhancements (font embedding tricks) by Frank Küster
+ * Has been available in http://www.inf.bme.hu/~pts/a2ping-latest.zip and
+ then in http://pts.50.hu/~pts/a2ping-latest.zip between 2007-03-07 and
+ 2018-03-06, with the version number 2.78p in the a2ping.pl file.
+ * Has been published to http://freshmeat.sourceforge.net/projects/a2ping
+ with version number 2.78p.
+
+=head2 2018-03-07 v2.83p (Péter Szabó)
+
+ * .callbeginpage and .setglobal fix for Ghostscript 9.22
+ (https://bugs.ghostscript.com/show_bug.cgi?id=699063).
+ Problem reported by Akira Yokosawa.
+
+__END__
diff --git a/Master/texmf-dist/scripts/a2ping/a2ping.pl b/Master/texmf-dist/scripts/a2ping/a2ping.pl
index 39331beb795..0da2e4344e2 100755
--- a/Master/texmf-dist/scripts/a2ping/a2ping.pl
+++ b/Master/texmf-dist/scripts/a2ping/a2ping.pl
@@ -1,36 +1,34 @@
#! /bin/sh
eval '(exit $?0)' && eval 'PERL_BADLANG=x;export PERL_BADLANG;: \
-;exec perl -x -S -- "$0" ${1+"$@"};#'if 0;
-eval 'setenv PERL_BADLANG x;exec perl -x -S -- "$0" $argv:q;#'.q+
+;exec perl -x -- "$0" ${1+"$@"};#'if 0;
+eval 'setenv PERL_BADLANG x;exec perl -x -- "$0" $argv:q;#'.q+
#!perl -w
package Htex::a2ping; $0=~/(.*)/s;unshift@INC,'.';do($1);die$@if$@;__END__+if !1;
-# This Perl script was generated by JustLib2 at Wed Apr 23 09:14:13 2003.
# Don't touch/remove any lines above; http://www.inf.bme.hu/~pts/justlib
#
# This program is free software, licensed under the GNU GPL, >=2.0.
# This software comes with absolutely NO WARRANTY. Use at your own risk!
#
-# !! Imp: merge back to a2ping.pa
# !! Ghostcript compute pipe too slow
-# $ a2ping.pl -v debrecen-hyph.ps de brecen-hyph.pdf
-# a2ping.pl 2.77p, 2004-04-28 -- Written by <pts@fazekas.hu> from April 2003.
+# $ a2ping.pl -v debrecen-hyph.ps debrecen-hyph.pdf
+# a2ping.pl ... -- Written by <pts@fazekas.hu> from April 2003.
# This is free software, GNU GPL >=2.0. There is NO WARRANTY.
# (epstopdf 2.7 Copyright 1998-2001 by Sebastian Rahtz et al.)
# * Strongest BoundingBox comment: %%HiResBoundingBox:
# * Doing --PaperSize unchanged
# * Output filename: debrecen-hyph.pdf
# * Output FileFormat: PDF
-# * Ghostscript ps2pdf command: gs -dSAFER
+# * Ghostscript ps2pdf command: gs -dSAFER
# * Compression: zip
# * Input filename: debrecen-hyph.ps
# * Computing BBox info from non-EPS PS file
-# * Ghostscript compute pipe: gs -dSAFER -dWRITESYSTEMDICT -dNOPAUSE -sDEVICE=bbox -sFN=debrecen-hyph.ps /tmp/a2ping_pl-16977-298938572-c.tgs 2>&1
+# * Ghostscript compute pipe: gs -dSAFER -dWRITESYSTEMDICT -dNOPAUSE -sDEVICE=bbox -sFN=debrecen-hyph.ps /tmp/a2ping_pl-16977-298938572-c.tgs 2>&1
# * Applying BoundingBox from Compute-GS T-: 71 81 539 769
-# * Applying HiResBoundingBox from Compute-GS T-H: 71.837998 81.971997 538.235984 768.113977
+# * Applying HiResBoundingBox from Compute-GS T-H: 71.837998 81.971997 538.235984 768.113977
# * Scanning header for BoundingBox
# * Applying BoundingBox from ADSC T-: 0 0 596 842
# * Final BoundingBox: 0 0 596 842
-# * Ghostscript ps2pdf pipe: gs -dSAFER -q -dBATCH -sDEVICE=pdfwrite -sOutputFile =debrecen-hyph.pdf -
+# * Ghostscript ps2pdf pipe: gs -dSAFER -q -dBATCH -sDEVICE=pdfwrite -sOutputFile=debrecen-hyph.pdf -
# * Done OK, created PDF file debrecen-hyph.pdf (338451 bytes)
#
package just; BEGIN{$INC{'just.pm'}='just.pm'}
@@ -352,7 +350,7 @@ use just +1; # a JustLib application
use strict;
use integer;
use Htex::papers;
-BEGIN { $Htex::a2ping::VERSION="2.77p" }
+BEGIN { $Htex::a2ping::VERSION="2.83p" }
# Imp: option to ignore `%%Orientation: Portrait', which gs respects and rotates by 90 degrees if necessary
# Imp: gs(704?!) sometimes finds too small bbox, see Univers.eps
@@ -401,7 +399,7 @@ BEGIN { $Htex::a2ping::VERSION="2.77p" }
### program identification
my $program = "a2ping.pl";
-my $filedate="2006-11-15"; # my $filedate="2001/03/05";
+my $filedate="2018-03-07"; # See also $Htex::a2ping::VERSION.
my $copyright = "Written by <pts\@fazekas.hu> from April 2003.
This is free software, GNU GPL >=2.0. There is NO WARRANTY.
(epstopdf 2.7 Copyright 1998-2001 by Sebastian Rahtz et al.)\n";
@@ -770,7 +768,7 @@ show_doc() if 1==@ARGV and $ARGV[0] eq '--doc' or $ARGV[0] eq 'doc';
errorUsage "invalid or unknown for --papersize" if !@L;
$::opt_papersize="$L[1],$L[2]" # width, height
}
- } else { die } # unreachable
+ } else { die } # unreachable
} # NEXT opt
errorUsage "Too many arguments (multiple input/output files?)" if $I!=@ARGV;
# splice @ARGV, 0, $I;
@@ -1138,7 +1136,7 @@ my $header;
elsif ($S eq "\305\320\323\306") { $iff="DOS-EPSF" }
elsif ($S eq "\033%-1") { $iff="UEL" }
elsif (substr($S,0,1)eq'%') { $iff="P" } # PS, EPS or PDF
-
+
# PNG JPEG TIFF PNM BMP GIF LBM XPM PCX TGA
if ($iff eq "DOS-EPSF") { # DOS EPSF header
read_error if 30-4>read IN, $S, 30-4, 4;
@@ -1276,7 +1274,7 @@ my $header;
# Dat: PDF to GIF conversion
run_sam2p(1,$S);
}
-
+
error "cannot create from PDF: FileFormat $FileFormat";
OK:
}
@@ -1289,7 +1287,7 @@ my $header;
}
# Dat: Now we are converting from PS|EPS to EPS|markedEPS|PDF|PCL5|PGM
-# So we're converting from PS|EPS with Ghostscript
+# So we're converting from PS|EPS with Ghostscript
### variables and pattern for BoundingBox search
my $bbxpatt = '[0-9eE\.\-]';
@@ -1384,7 +1382,7 @@ sub CorrectBoundingBox($$$$$$$) {
/AutoFilterMonoImages true
/AutoFilterGrayImages true
/AutoFilterColorImages true
-/MonoImageFilter /CCITTFaxEncode
+/MonoImageFilter /CCITTFaxEncode
/GrayImageFilter /DCTEncode
/ColorImageFilter /DCTEncode
" : "
@@ -1543,12 +1541,13 @@ count /OPCOUNT exch def
(bbox-success\n) ..print
quit
} if
- .callbeginpage
}
+ % Run the previous contents of /BeginPage: {--.callbeginpage--}
+ [exch aload pop currentpagedevice /BeginPage get aload pop] cvx
>> setpagedevice
% vvv do these after our call to /setpagedevice
-.currentglobal true .setglobal
+currentglobal true setglobal
systemdict begin
/..paper.redef<< >>def
/..print/print load def
@@ -1657,7 +1656,7 @@ dup/= exch def /print exch def
pop
}forall} forall
end % systemdict
-.setglobal
+setglobal
systemdict readonly pop
(bbox-begin\n) ..print
@@ -1680,7 +1679,7 @@ showpage quit
or $res!~s/\A(?:\w+ Ghostscript \d|Copyright .* artofcode ).*\n// # AFPL Ghostscript 6.50 (2000-12-02)
or $res!~s/.*?^bbox-begin\n//m;
if ($res!~s/\nbbox-success\n\Z(?!\n)/\n/) {
- warning # not `error', mpost(1) `prologues:=0; ... btex fonts' output won't compile
+ warning # not `error', mpost(1) `prologues:=0; ... btex fonts' output won't compile
"BBox discovery was not successful";
# !! continue only if MetaPost output?
goto SKIP_BBOX_DISC;
@@ -1771,7 +1770,7 @@ showpage quit
if (defined $papersize_x and ($::opt_bboxfrom eq 'papersize' or ($::opt_bboxfrom eq 'guess' and is_set_pagesize_ok()))) {
$allow_adsc_bb=0;
$do_bb_line->("set 0 0 $papersize_x $papersize_y"," from /PageSize"); # does ($llx,$lly,$urx,$ury)=(0,0,$papersize_x,$papersize_y);
- }
+ }
$allow_adsc_bb=0 if ($::opt_bboxfrom eq 'compute-gs') ? ($bbc!=0)
: ($::opt_bboxfrom eq 'guess') ? ($bbc!=0 and is_page1_stop()) # Imp: is is_page1_stop() OK here?
: 0;
@@ -1983,7 +1982,7 @@ if ($FileFormat eq 'PDF' or $FileFormat eq 'PDF1') {
$scale3_pnm_fn=$ofn;
$ofn=fix_force_out('S3.pnm') if $do_scale3_pnm;
# ^^^ Dat: this must be the last call to fix_force_out()
- }
+ }
$pipe.="$GSOPTS -sOutputFile=".fnq($ofn)." -";
debug "Ghostscript ps2raster pipe:", $pipe;
open(OUT, "| $pipe") or error "Cannot open Ghostscript pipe";
@@ -2000,7 +1999,7 @@ die unless binmode OUT;
if (is_need_showpage() and is_page1_stop()) {
$to_OUT.="/showpage{showpage quit}bind def\n"; # don't call showpage twice
$after_code.="showpage\n";
-}
+}
error "write OUT" if !print OUT $to_OUT;
$to_OUT="";
@@ -2112,7 +2111,7 @@ if (!$ll_zero and ($FileFormat eq 'PDF' or $FileFormat eq 'PDF1')) { # correct /
currentdict pdfclose end end end
';
die unless close F;
-
+
my $gs2="$GS -dNODISPLAY -dBATCH -sFN=".fnq(fix_pipe_out(undef))." -q ".fnq($tfn);
debug "Ghostscript dup pipe: $gs2";
my $offset=`$gs2`;
@@ -2360,14 +2359,97 @@ write extra output formats, B<sam2p> and GS are used.
PNM output formats are PGM, PGM and PPM. To write PNM output formats, GS
is used.
+=head1 OPTIONS
-=head1 TIPS AND TRICKS
+=head2 General Options
=over 2
-=item *
+=item B<-h>, B<--help>
+
+Show a summary of the usage
+
+=item B<--doc>
+
+Show the man page
+
+=item B<-v>, B<--(no)verbose>
+
+Show progress and debug messages (default: no)
+
+=head2 Options for the Bounding box
+
+=item B<--(no)hires>
+
+Use HiResBoundingBox in the input file, if present (default: yes)
+
+=item B<--(no)exact>
+
+Use ExactBoundingBox in the input file, if present (default: no)
+
+=item B<--(no)keepoldmediabox>
+
+keep only old, [0 0]-based MediaBox in PDF (default: no)
+
+=item B<--bboxfrom=>I<adsc|compute-gs|guess|pagesize>
+
+Method for determining the BoundingBox (default: guess)
+
+=item B<--(no)below>
+
+Allow page content below and left of the origin (default: no)
+
+
+=head2 Options for graphics and fonts
+
+=item B<--(no)compress>
+
+use compression (default: best)
-Call with the B<-v> option to see progress and debug messages.
+=item B<--(no)antialias>
+
+render shades at outlines. Possible values: (=I<scale3yes> =I<no> =I<yes>) (default: scale3no)
+
+=item B<--(no)lossy>
+
+allow lossy image filters (EPS->PDF) (default: yes)
+
+=item B<--papersize=>I<unchanged|force-unknown|600bpx5cm>
+
+(default: default) (bp)
+
+=item B<--threshold=>
+
+min color for 1 in 8->1 bit conv (default: 128)
+
+
+=head2 Options for debugging and changing internals
+
+=item B<--(no)tmpunlink>
+
+Unlink temporary files (default: yes). Use B<--notmpunklink> if you
+want to inspect intermediate files.
+
+=item B<--gs-cmd=>I<path>
+
+path to Ghostscript program (default: gs or gswin32c)
+
+=item B<--gs-ccmd=>I<path>
+
+path to Ghostscript for BoundingBox calculation (default: gs or gswin32c)
+
+=item B<--gsextra=>I<GS_ARGS>
+
+Pass extra arguments to gs
+
+=item B<--extra=>
+
+Pass extra arguments to external program (i.e pdftops)
+
+
+=head1 TIPS AND TRICKS
+
+=over 2
=item *
@@ -2433,6 +2515,11 @@ B<--Resolution>. The default is B<--Resolution=72>. If your sampled output file
is going to be really big, you should specify B<--AntiAlias=yes> instead of
the default B<--AntiAlias=scale3no> to speed up conversion.
+=item *
+
+To make sure fonts are included in a PDF file generated from eps, use
+B<--gsextra='-dEmbedAllFonts=true -dPDFSETTINGS=/printer'>.
+
=back
@@ -2470,7 +2557,7 @@ Conversion from PS to EPS: keeps 1st page only, removes setpagedevice etc.
=head1 AUTHORS
-The author of B<a2ping> is Szabó Péter <F<pts@fazekas.hu>>.
+The author of B<a2ping> is Péter Szabó <F<pts@fazekas.hu>>.
B<a2ping> is inspired by and historically based on the B<epstopdf> Perl
script modified by Thomas Esser, Sept. 1998, but his modifications have
@@ -2479,94 +2566,5 @@ share common code anymore. B<epstopdf> is written by Sebastian Rahtz,
for Elsevier Science. B<epstopdf> contained extra tricks from Hans Hagen's
texutil.
-=head1 HISTORY
-
-=head2 1999/05/06 v2.5 (Heiko Oberdiek)
-
- * New options: --hires, --exact, --filter, --help.
- * Many cosmetics: title, usage, ...
- * New code for debug, warning, error
- * Detecting of cygwin perl
- * Scanning for %%{Hires,Exact,}BoundingBox.
- * Scanning only the header in order not to get a wrong
- BoundingBox of an included file.
- * (atend) supported.
- * uses strict; (earlier error detecting).
- * changed first comment from '%!PS' to '%!';
- * corrected (atend) pattern: '\s*\(atend\)'
- * using of $bbxpat in all BoundingBox cases,
- correct the first white space to '...Box:\s*$bb...'
- * corrected first line (one line instead of two before 'if 0;';
-
-=head2 2000/11/05 v2.6 (Heiko Oberdiek)
-
- * %%HiresBoundingBox corrected to %%HiResBoundingBox
-
-=head2 2001/03/05 v2.7 (Heiko Oberdiek)
-
- * Newline before grestore for the case that there is no
- whitespace at the end of the eps file.
-
-=head2 2003/02/02 (Szabó Péter)
-
- * option --below
- * removes DOS EPSF binary junk correctly
- * adds all 3 BoundingBox DSC comments
- * reads all 3 BoundingBox DSC comments, and picks the best
- * forces BoundingBox to be an integer
- * adds %%EndComments and proper %!PS-Adobe-?-? EPSF-?.? header
- * adds %%Pages:
- * adds invocation syntax: a2ping <infile.eps> <outfile.eps|pdf>
- * can convert PDF to EPS (by calling pdftops(1)) and PDF to PDF
- * emulates work for PDF input
-
-=head2 2003/04/16 (Szabó Péter)
-
- * added PS and sam2p support, renamed to a2ping
- * sam2p and pdftops if $InputFilename eq '-';
- * remove PJL UEL header from the beginning
- * works for PS non-EPS files for input
- * input support for PNG JPEG TIFF PNM BMP GIF LBM XPM PCX TGA via sam2p
- * removes ^L (form feed) from end of EPS file
- * -x=-c:rle to add sam2p options
-
-=head2 2003/04/26 (Szabó Péter)
-
- * omit the unnecessary setpagedevice calls when creating normal eps
- * --noverbose --nocompress supported differently
- * no more option defaults :-(
- * justlib2
- * multi-page output with PS:, PDF:, PCL5:
- * after `a2ping -pa4', file out.pcl says: `HP PCL printer data - A4 page
- size', instead of `US letter'
- * justlib2-ified doesn't depend on Getopt::Long anymore
- * fully supports filtering (stdin and/or stdout), PDF and PCL5 output to
- pipe (!$$ll_zero)
- * adds DSC ``%%DocumentMedia: plain 612 792 0 () ()''
- * BoundingBox precedence for EPS input: --PageSize, %%*BoundingBox,
- setpagedevice. Precedence for other inputs: --PageSize, setpagedevice,
- %%*BoundingBox
-
-=head2 2003/09/25 (Szabó Péter)
-
- * --bboxfrom=adsc: %%BoundingBox overrides -sDEVICE=bbox
- * improved bbox discovery
- * many bugfixes
- * MetaPost EPS input fixes for prologues:=0;
- * a2ping.pl -v --papersize=50,60 --bboxfrom=compute-gs t.ps t2.ps
- * consistent bbox, --PageSize, /PageSize handling
- * consistent --Resolution and --Duplex handling
-
-=head2 2003/12/02 (Szabó Péter)
-
- * --bboxfrom=compute-gs option to fix PS -> EPS bbox (gs -sDEVICE=bbox), tuzv.eps
-
-=head2 2004/02/10 v2.77 (Szabó Péter)
-
- * the compute-pipe routine is now run unless --bboxfrom=guess with EPS
- * added --gsextra=
- * added --antialias=
- * added FileFormat PBM, PGM, PPM
- * separated FileFormat features to FL_* constants
- * added --doc
- * there is no default FileFormat (PDF) anymore
+B<a2ping> contains contributions from several people, see the file
+F<HISTORY.txt> for details. Thank you all for contributing!
diff --git a/Master/tlpkg/libexec/ctan2tds b/Master/tlpkg/libexec/ctan2tds
index 02ef1a09722..47da4da45c6 100755
--- a/Master/tlpkg/libexec/ctan2tds
+++ b/Master/tlpkg/libexec/ctan2tds
@@ -1255,6 +1255,7 @@ chomp ($Build = `cd $Master/../Build/source && pwd`);
%prehook = (
+ 'a2ping' => '&PREHOOK_a2ping',
'apa6' => '&PREHOOK_apa6',
'cals' => '&PREHOOK_cals',
'chess' => '&PREHOOK_chess',
@@ -1930,6 +1931,7 @@ $standardtex
'Asana-Math', 'fonts',
'FAQ-en', 'generic',
'Type1fonts', 'fonts',
+ 'a2ping', 'support',
'abbr', 'generic',
'abstyles', 'bibtex',
'apalike', 'bibtex',
@@ -2950,6 +2952,7 @@ $standardttf = '\.ttf|\.TTC';
# packages which have man pages to install.
%specialmans = (
+ 'a2ping' => '\.1$',
'bundledoc' => '\.1$',
'crossrefware' => '\.1$',
'ctan-o-mat' => '\.1$',
@@ -5186,6 +5189,11 @@ sub MAKEphonetic {
+sub PREHOOK_a2ping {
+ print "PREHOOK_$package - make .1 with pod2man\n";
+ &prehook_pod2man ("Peter Szabo", "$package.pl");
+}
+
sub PREHOOK_apa6 {
print "PREHOOK_$package - subdirectories needed for dtx\n";
&SYSTEM ("mkdir config pseudoTeX");