summaryrefslogtreecommitdiff
path: root/Master/tlpkg/tlgs/lib
diff options
context:
space:
mode:
authorReinhard Kotucha <reinhard.kotucha@web.de>2021-09-29 01:02:39 +0000
committerReinhard Kotucha <reinhard.kotucha@web.de>2021-09-29 01:02:39 +0000
commit032fbe3299ba69dfde0e6b488c63d7172f5526cc (patch)
tree609e446095e13bafd341617218852c3db3bb254c /Master/tlpkg/tlgs/lib
parent73f30335fe2918b048eaaedddc30503169fb8be9 (diff)
Upgrade gs-9.54.0 -> gs-9.55.0
git-svn-id: svn://tug.org/texlive/trunk@60648 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/tlpkg/tlgs/lib')
-rw-r--r--Master/tlpkg/tlgs/lib/Fontmap2
-rw-r--r--Master/tlpkg/tlgs/lib/Fontmap.TeXLive216
-rw-r--r--Master/tlpkg/tlgs/lib/PDFA_def.ps40
-rw-r--r--Master/tlpkg/tlgs/lib/afmdiff.awk302
-rw-r--r--Master/tlpkg/tlgs/lib/cidfmap2
-rw-r--r--Master/tlpkg/tlgs/lib/cidfmap.TeXLive624
-rw-r--r--Master/tlpkg/tlgs/lib/gslp.ps79
-rw-r--r--Master/tlpkg/tlgs/lib/viewgif.ps6
-rw-r--r--Master/tlpkg/tlgs/lib/zugferd.ps452
9 files changed, 974 insertions, 749 deletions
diff --git a/Master/tlpkg/tlgs/lib/Fontmap b/Master/tlpkg/tlgs/lib/Fontmap
index 6faaf7cfe71..04702bb5e72 100644
--- a/Master/tlpkg/tlgs/lib/Fontmap
+++ b/Master/tlpkg/tlgs/lib/Fontmap
@@ -1,5 +1,5 @@
%!
-%% $Id: Fontmap 36707 2015-04-02 23:03:05Z reinhardk $
+%% $Id: Fontmap 7680 2008-04-27 12:21:15Z reinhardk $
% See Fontmap.TeXLive for the syntax of real Fontmap files.
%% Replace 1 (Fontmap.TeXLive)
diff --git a/Master/tlpkg/tlgs/lib/Fontmap.TeXLive b/Master/tlpkg/tlgs/lib/Fontmap.TeXLive
index c5fceb25c2e..ed079d50fc1 100644
--- a/Master/tlpkg/tlgs/lib/Fontmap.TeXLive
+++ b/Master/tlpkg/tlgs/lib/Fontmap.TeXLive
@@ -1,108 +1,108 @@
-%% Fontmap.TeXLive
-%% $Id: Fontmap.TeXLive 36707 2015-04-02 23:03:05Z reinhardk $
-
-%% This file is part of TeXLive.
-%% You may freely use, modify and/or distribute this file.
-
-%% Bitstream Charter
-
-/CharterBT-Bold (bchb8a.pfb) ;
-/CharterBT-BoldItalic (bchbi8a.pfb) ;
-/CharterBT-Roman (bchr8a.pfb) ;
-/CharterBT-Italic (bchri8a.pfb) ;
-
-%% Adobe Utopia
-
-/Utopia-Bold (putb8a.pfb) ;
-/Utopia-BoldItalic (putbi8a.pfb) ;
-/Utopia-Regular (putr8a.pfb) ;
-/Utopia-Italic (putri8a.pfb) ;
-
-%% URW LW35 Fonts
-
-/URWGothicL-Demi (uagd8a.pfb) ;
-/URWGothicL-DemiObli (uagdo8a.pfb) ;
-/URWGothicL-Book (uagk8a.pfb) ;
-/URWGothicL-BookObli (uagko8a.pfb) ;
-/URWBookmanL-DemiBold (ubkd8a.pfb) ;
-/URWBookmanL-DemiBoldItal (ubkdi8a.pfb) ;
-/URWBookmanL-Ligh (ubkl8a.pfb) ;
-/URWBookmanL-LighItal (ubkli8a.pfb) ;
-/NimbusMonL-Bold (ucrb8a.pfb) ;
-/NimbusMonL-BoldObli (ucrbo8a.pfb) ;
-/NimbusMonL-Regu (ucrr8a.pfb) ;
-/NimbusMonL-ReguObli (ucrro8a.pfb) ;
-/NimbusSanL-Bold (uhvb8a.pfb) ;
-/NimbusSanL-BoldCond (uhvb8ac.pfb) ;
-/NimbusSanL-BoldItal (uhvbo8a.pfb) ;
-/NimbusSanL-BoldCondItal (uhvbo8ac.pfb) ;
-%%%/NimbusSanL-Regu (uhvr8a-105.pfb) ;
-/NimbusSanL-Regu (uhvr8a.pfb) ;
-/NimbusSanL-ReguCond (uhvr8ac.pfb) ;
-%%%/NimbusSanL-ReguItal (uhvro8a-105.pfb) ;
-/NimbusSanL-ReguItal (uhvro8a.pfb) ;
-/NimbusSanL-ReguCondItal (uhvro8ac.pfb) ;
-/CenturySchL-Bold (uncb8a.pfb) ;
-/CenturySchL-BoldItal (uncbi8a.pfb) ;
-/CenturySchL-Roma (uncr8a.pfb) ;
-/CenturySchL-Ital (uncri8a.pfb) ;
-/URWPalladioL-Bold (uplb8a.pfb) ;
-/URWPalladioL-BoldItal (uplbi8a.pfb) ;
-/URWPalladioL-Roma (uplr8a.pfb) ;
-/URWPalladioL-Ital (uplri8a.pfb) ;
-/StandardSymL (usyr.pfb) ;
-/NimbusRomNo9L-Medi (utmb8a.pfb) ;
-/NimbusRomNo9L-MediItal (utmbi8a.pfb) ;
-/NimbusRomNo9L-Regu (utmr8a.pfb) ;
-/NimbusRomNo9L-ReguItal (utmri8a.pfb) ;
-/URWChanceryL-MediItal (uzcmi8a.pfb) ;
-/Dingbats (uzdr.pfb) ;
-
-
-% Aliases
-
-/Bookman-Demi /URWBookmanL-DemiBold ;
-/Bookman-DemiItalic /URWBookmanL-DemiBoldItal ;
-/Bookman-Light /URWBookmanL-Ligh ;
-/Bookman-LightItalic /URWBookmanL-LighItal ;
-
-/Courier /NimbusMonL-Regu ;
-/Courier-Oblique /NimbusMonL-ReguObli ;
-/Courier-Bold /NimbusMonL-Bold ;
-/Courier-BoldOblique /NimbusMonL-BoldObli ;
-
-/AvantGarde-Book /URWGothicL-Book ;
-/AvantGarde-BookOblique /URWGothicL-BookObli ;
-/AvantGarde-Demi /URWGothicL-Demi ;
-/AvantGarde-DemiOblique /URWGothicL-DemiObli ;
-
-/Helvetica /NimbusSanL-Regu ;
-/Helvetica-Oblique /NimbusSanL-ReguItal ;
-/Helvetica-Bold /NimbusSanL-Bold ;
-/Helvetica-BoldOblique /NimbusSanL-BoldItal ;
-
-/Helvetica-Narrow /NimbusSanL-ReguCond ;
-/Helvetica-Narrow-Oblique /NimbusSanL-ReguCondItal ;
-/Helvetica-Narrow-Bold /NimbusSanL-BoldCond ;
-/Helvetica-Narrow-BoldOblique /NimbusSanL-BoldCondItal ;
-
-/Palatino-Roman /URWPalladioL-Roma ;
-/Palatino-Italic /URWPalladioL-Ital ;
-/Palatino-Bold /URWPalladioL-Bold ;
-/Palatino-BoldItalic /URWPalladioL-BoldItal ;
-
-/NewCenturySchlbk-Roman /CenturySchL-Roma ;
-/NewCenturySchlbk-Italic /CenturySchL-Ital ;
-/NewCenturySchlbk-Bold /CenturySchL-Bold ;
-/NewCenturySchlbk-BoldItalic /CenturySchL-BoldItal ;
-
-/Times-Roman /NimbusRomNo9L-Regu ;
-/Times-Italic /NimbusRomNo9L-ReguItal ;
-/Times-Bold /NimbusRomNo9L-Medi ;
-/Times-BoldItalic /NimbusRomNo9L-MediItal ;
-
-/Symbol /StandardSymL ;
-
-/ZapfChancery-MediumItalic /URWChanceryL-MediItal ;
-
-/ZapfDingbats /Dingbats ;
+%% Fontmap.TeXLive
+%% $Id: Fontmap.TeXLive 7680 2008-04-27 12:21:15Z reinhardk $
+
+%% This file is part of TeXLive.
+%% You may freely use, modify and/or distribute this file.
+
+%% Bitstream Charter
+
+/CharterBT-Bold (bchb8a.pfb) ;
+/CharterBT-BoldItalic (bchbi8a.pfb) ;
+/CharterBT-Roman (bchr8a.pfb) ;
+/CharterBT-Italic (bchri8a.pfb) ;
+
+%% Adobe Utopia
+
+/Utopia-Bold (putb8a.pfb) ;
+/Utopia-BoldItalic (putbi8a.pfb) ;
+/Utopia-Regular (putr8a.pfb) ;
+/Utopia-Italic (putri8a.pfb) ;
+
+%% URW LW35 Fonts
+
+/URWGothicL-Demi (uagd8a.pfb) ;
+/URWGothicL-DemiObli (uagdo8a.pfb) ;
+/URWGothicL-Book (uagk8a.pfb) ;
+/URWGothicL-BookObli (uagko8a.pfb) ;
+/URWBookmanL-DemiBold (ubkd8a.pfb) ;
+/URWBookmanL-DemiBoldItal (ubkdi8a.pfb) ;
+/URWBookmanL-Ligh (ubkl8a.pfb) ;
+/URWBookmanL-LighItal (ubkli8a.pfb) ;
+/NimbusMonL-Bold (ucrb8a.pfb) ;
+/NimbusMonL-BoldObli (ucrbo8a.pfb) ;
+/NimbusMonL-Regu (ucrr8a.pfb) ;
+/NimbusMonL-ReguObli (ucrro8a.pfb) ;
+/NimbusSanL-Bold (uhvb8a.pfb) ;
+/NimbusSanL-BoldCond (uhvb8ac.pfb) ;
+/NimbusSanL-BoldItal (uhvbo8a.pfb) ;
+/NimbusSanL-BoldCondItal (uhvbo8ac.pfb) ;
+%%%/NimbusSanL-Regu (uhvr8a-105.pfb) ;
+/NimbusSanL-Regu (uhvr8a.pfb) ;
+/NimbusSanL-ReguCond (uhvr8ac.pfb) ;
+%%%/NimbusSanL-ReguItal (uhvro8a-105.pfb) ;
+/NimbusSanL-ReguItal (uhvro8a.pfb) ;
+/NimbusSanL-ReguCondItal (uhvro8ac.pfb) ;
+/CenturySchL-Bold (uncb8a.pfb) ;
+/CenturySchL-BoldItal (uncbi8a.pfb) ;
+/CenturySchL-Roma (uncr8a.pfb) ;
+/CenturySchL-Ital (uncri8a.pfb) ;
+/URWPalladioL-Bold (uplb8a.pfb) ;
+/URWPalladioL-BoldItal (uplbi8a.pfb) ;
+/URWPalladioL-Roma (uplr8a.pfb) ;
+/URWPalladioL-Ital (uplri8a.pfb) ;
+/StandardSymL (usyr.pfb) ;
+/NimbusRomNo9L-Medi (utmb8a.pfb) ;
+/NimbusRomNo9L-MediItal (utmbi8a.pfb) ;
+/NimbusRomNo9L-Regu (utmr8a.pfb) ;
+/NimbusRomNo9L-ReguItal (utmri8a.pfb) ;
+/URWChanceryL-MediItal (uzcmi8a.pfb) ;
+/Dingbats (uzdr.pfb) ;
+
+
+% Aliases
+
+/Bookman-Demi /URWBookmanL-DemiBold ;
+/Bookman-DemiItalic /URWBookmanL-DemiBoldItal ;
+/Bookman-Light /URWBookmanL-Ligh ;
+/Bookman-LightItalic /URWBookmanL-LighItal ;
+
+/Courier /NimbusMonL-Regu ;
+/Courier-Oblique /NimbusMonL-ReguObli ;
+/Courier-Bold /NimbusMonL-Bold ;
+/Courier-BoldOblique /NimbusMonL-BoldObli ;
+
+/AvantGarde-Book /URWGothicL-Book ;
+/AvantGarde-BookOblique /URWGothicL-BookObli ;
+/AvantGarde-Demi /URWGothicL-Demi ;
+/AvantGarde-DemiOblique /URWGothicL-DemiObli ;
+
+/Helvetica /NimbusSanL-Regu ;
+/Helvetica-Oblique /NimbusSanL-ReguItal ;
+/Helvetica-Bold /NimbusSanL-Bold ;
+/Helvetica-BoldOblique /NimbusSanL-BoldItal ;
+
+/Helvetica-Narrow /NimbusSanL-ReguCond ;
+/Helvetica-Narrow-Oblique /NimbusSanL-ReguCondItal ;
+/Helvetica-Narrow-Bold /NimbusSanL-BoldCond ;
+/Helvetica-Narrow-BoldOblique /NimbusSanL-BoldCondItal ;
+
+/Palatino-Roman /URWPalladioL-Roma ;
+/Palatino-Italic /URWPalladioL-Ital ;
+/Palatino-Bold /URWPalladioL-Bold ;
+/Palatino-BoldItalic /URWPalladioL-BoldItal ;
+
+/NewCenturySchlbk-Roman /CenturySchL-Roma ;
+/NewCenturySchlbk-Italic /CenturySchL-Ital ;
+/NewCenturySchlbk-Bold /CenturySchL-Bold ;
+/NewCenturySchlbk-BoldItalic /CenturySchL-BoldItal ;
+
+/Times-Roman /NimbusRomNo9L-Regu ;
+/Times-Italic /NimbusRomNo9L-ReguItal ;
+/Times-Bold /NimbusRomNo9L-Medi ;
+/Times-BoldItalic /NimbusRomNo9L-MediItal ;
+
+/Symbol /StandardSymL ;
+
+/ZapfChancery-MediumItalic /URWChanceryL-MediItal ;
+
+/ZapfDingbats /Dingbats ;
diff --git a/Master/tlpkg/tlgs/lib/PDFA_def.ps b/Master/tlpkg/tlgs/lib/PDFA_def.ps
index f77c90ef19b..c5e2aa6801c 100644
--- a/Master/tlpkg/tlgs/lib/PDFA_def.ps
+++ b/Master/tlpkg/tlgs/lib/PDFA_def.ps
@@ -35,13 +35,13 @@ def
/CMYK eq {
/N 4 false
}{
- (ColorConversionStrategy not a device space, falling back to ProcessColorModel, output may not be valid PDF/A.)=
+ (\tColorConversionStrategy not a device space, falling back to ProcessColorModel, output may not be valid PDF/A.\n)=
true
} ifelse
} ifelse
} ifelse
} {
- (ColorConversionStrategy not set, falling back to ProcessColorModel, output may not be valid PDF/A.)=
+ (\tColorConversionStrategy not set, falling back to ProcessColorModel, output may not be valid PDF/A.\n)=
true
} ifelse
@@ -56,7 +56,7 @@ def
dup /DeviceCMYK eq {
pop /N 4
} {
- (ProcessColorModel not a device space.)=
+ (\tProcessColorModel not a device space.)=
/ProcessColorModel cvx /rangecheck signalerror
} ifelse
} ifelse
@@ -65,15 +65,27 @@ def
%% ----------8<--------------8<-------------8<--------------8<----------
>> /PUT pdfmark
-[{icc_PDFA} ICCProfile (r) file /PUT pdfmark
+[
+{icc_PDFA}
+{ICCProfile (r) file} stopped
+{
+ (\n\tFailed to open the supplied ICCProfile for reading. This may be due to\n) print
+ (\t an incorrect filename or a failure to add --permif-file-read=<profile>\n) print
+ (\t to the command line. This PostScript program needs to open the file\n) print
+ (\t and you must explicitly grant it permission to do so.\n\n) print
+ (\tPDF/A processing aborted, output may not be a PDF/A file.\n\n) print
+ cleartomark
+}
+{
+ /PUT pdfmark
+ % Define the output intent dictionary :
-% Define the output intent dictionary :
-
-[/_objdef {OutputIntent_PDFA} /type /dict /OBJ pdfmark
-[{OutputIntent_PDFA} <<
- /Type /OutputIntent % Must be so (the standard requires).
- /S /GTS_PDFA1 % Must be so (the standard requires).
- /DestOutputProfile {icc_PDFA} % Must be so (see above).
- /OutputConditionIdentifier (sRGB) % Customize
->> /PUT pdfmark
-[{Catalog} <</OutputIntents [ {OutputIntent_PDFA} ]>> /PUT pdfmark
+ [/_objdef {OutputIntent_PDFA} /type /dict /OBJ pdfmark
+ [{OutputIntent_PDFA} <<
+ /Type /OutputIntent % Must be so (the standard requires).
+ /S /GTS_PDFA1 % Must be so (the standard requires).
+ /DestOutputProfile {icc_PDFA} % Must be so (see above).
+ /OutputConditionIdentifier (sRGB) % Customize
+ >> /PUT pdfmark
+ [{Catalog} <</OutputIntents [ {OutputIntent_PDFA} ]>> /PUT pdfmark
+} ifelse
diff --git a/Master/tlpkg/tlgs/lib/afmdiff.awk b/Master/tlpkg/tlgs/lib/afmdiff.awk
index 7b6f75867b6..e9c237b4bc6 100644
--- a/Master/tlpkg/tlgs/lib/afmdiff.awk
+++ b/Master/tlpkg/tlgs/lib/afmdiff.awk
@@ -1,151 +1,151 @@
-#!/usr/bin/awk -f
-###=====================================================================
-### Read two Adobe Font Metric files, and compute tables of the
-### differences in character repertoire, declared widths (WX), and
-### bounding boxes.
-###
-### Usage:
-### awk -f afmdiff.awk file1.afm file2.afm
-###
-### Author:
-### Nelson H. F. Beebe
-### Center for Scientific Computing
-### University of Utah
-### Department of Mathematics, 322 INSCC
-### 155 S 1400 E RM 233
-### Salt Lake City, UT 84112-0090
-### USA
-### Email: beebe@math.utah.edu, beebe@acm.org, beebe@computer.org,
-### beebe@ieee.org (Internet)
-### WWW URL: http://www.math.utah.edu/~beebe
-### Telephone: +1 801 581 5254
-### FAX: +1 801 585 1640, +1 801 581 4148
-###
-########################################################################
-########################################################################
-########################################################################
-### ###
-### awkdiff.awk: compare two Adobe Font Metric files ###
-### ###
-### Copyright (C) 2000 Nelson H. F. Beebe ###
-### ###
-### This program is covered by the GNU General Public License (GPL), ###
-### version 2 or later, available as the file COPYING in the program ###
-### source distribution, and on the Internet at ###
-### ###
-### ftp://ftp.gnu.org/gnu/GPL ###
-### ###
-### http://www.gnu.org/copyleft/gpl.html ###
-### ###
-### This program is free software; you can redistribute it and/or ###
-### modify it under the terms of the GNU General Public License as ###
-### published by the Free Software Foundation; either version 2 of ###
-### the License, or (at your option) any later version. ###
-### ###
-### This program is distributed in the hope that it will be useful, ###
-### but WITHOUT ANY WARRANTY; without even the implied warranty of ###
-### MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ###
-### GNU General Public License for more details. ###
-### ###
-### You should have received a copy of the GNU General Public ###
-### License along with this program; if not, write to the Free ###
-### Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, ###
-### MA 02111-1307 USA ###
-### ###
-### This program may also be distributed as part of AFPL ###
-### Ghostscript, under the terms of the Aladdin Free Public License ###
-### (the "License"). ###
-### ###
-### Every copy of AFPL Ghostscript must include a copy of the ###
-### License, normally in a plain ASCII text file named PUBLIC. The ###
-### License grants you the right to copy, modify and redistribute ###
-### AFPL Ghostscript, but only under certain conditions ###
-### described in the License. Among other things, the License ###
-### requires that the copyright notice and this notice be preserved ###
-### on all copies. ###
-### ###
-########################################################################
-########################################################################
-########################################################################
-#
-# [29-Apr-2000]
-#=======================================================================
-
-/^FontName/ { FontName[++NFontName] = $2 }
-
-
-/^C / {
- if (NFontName == 1)
- CharName1[$8]++
- if (NFontName == 2)
- CharName2[$8]++
- }
-
-
-/^C / {
- name = $8
- if (name in WX)
- {
- if (WX[name] != $5)
- WXDIFF[name] = WX[name] - $5
- }
- else
- WX[name] = $5
- }
-
-
-/^C / {
- name = $8
- bx = $13 - $11
- if (name in BX)
- {
- if (BX[name] != bx)
- BXDIFF[name] = BX[name] - bx
- }
- else
- BX[name] = bx
- }
-
-
-/^C / {
- name = $8
- by = $14 - $12
- if (name in BY)
- {
- if (BY[name] != by)
- BYDIFF[name] = BY[name] - by
- }
- else
- BY[name] = by
- }
-
-
-END {
- Sortpipe = "sort -f | pr -3 -w80 -l1 -t"
- print "Comparison of AFM metrics in files:", ARGV[1], ARGV[2]
- print "Font names:", FontName[1], FontName[2]
- show_name_diffs(FontName[2],CharName2, FontName[1],CharName1)
- show_name_diffs(FontName[1],CharName1, FontName[2],CharName2)
- show_num_diffs("WX width differences", WXDIFF)
- show_num_diffs("Bounding box width differences", BXDIFF)
- show_num_diffs("Bounding box height differences",BYDIFF)
- }
-
-function show_name_diffs(font1,array1,font2,array2, name)
-{
- print "\nChars from", font2, "missing from", font1 ":"
- for (name in array2)
- {
- if (!(name in array1))
- printf("%s\n", name) | Sortpipe
- }
- close(Sortpipe)
-}
-
-function show_num_diffs(title,array, name)
-{
- printf("\n%s:\n", title)
- for (name in array)
- printf("%-15s\t%4d\n", name, array[name]) | Sortpipe
- close(Sortpipe)
-}
+#!/usr/bin/awk -f
+###=====================================================================
+### Read two Adobe Font Metric files, and compute tables of the
+### differences in character repertoire, declared widths (WX), and
+### bounding boxes.
+###
+### Usage:
+### awk -f afmdiff.awk file1.afm file2.afm
+###
+### Author:
+### Nelson H. F. Beebe
+### Center for Scientific Computing
+### University of Utah
+### Department of Mathematics, 322 INSCC
+### 155 S 1400 E RM 233
+### Salt Lake City, UT 84112-0090
+### USA
+### Email: beebe@math.utah.edu, beebe@acm.org, beebe@computer.org,
+### beebe@ieee.org (Internet)
+### WWW URL: http://www.math.utah.edu/~beebe
+### Telephone: +1 801 581 5254
+### FAX: +1 801 585 1640, +1 801 581 4148
+###
+########################################################################
+########################################################################
+########################################################################
+### ###
+### awkdiff.awk: compare two Adobe Font Metric files ###
+### ###
+### Copyright (C) 2000 Nelson H. F. Beebe ###
+### ###
+### This program is covered by the GNU General Public License (GPL), ###
+### version 2 or later, available as the file COPYING in the program ###
+### source distribution, and on the Internet at ###
+### ###
+### ftp://ftp.gnu.org/gnu/GPL ###
+### ###
+### http://www.gnu.org/copyleft/gpl.html ###
+### ###
+### This program is free software; you can redistribute it and/or ###
+### modify it under the terms of the GNU General Public License as ###
+### published by the Free Software Foundation; either version 2 of ###
+### the License, or (at your option) any later version. ###
+### ###
+### This program is distributed in the hope that it will be useful, ###
+### but WITHOUT ANY WARRANTY; without even the implied warranty of ###
+### MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ###
+### GNU General Public License for more details. ###
+### ###
+### You should have received a copy of the GNU General Public ###
+### License along with this program; if not, write to the Free ###
+### Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, ###
+### MA 02111-1307 USA ###
+### ###
+### This program may also be distributed as part of AFPL ###
+### Ghostscript, under the terms of the Aladdin Free Public License ###
+### (the "License"). ###
+### ###
+### Every copy of AFPL Ghostscript must include a copy of the ###
+### License, normally in a plain ASCII text file named PUBLIC. The ###
+### License grants you the right to copy, modify and redistribute ###
+### AFPL Ghostscript, but only under certain conditions ###
+### described in the License. Among other things, the License ###
+### requires that the copyright notice and this notice be preserved ###
+### on all copies. ###
+### ###
+########################################################################
+########################################################################
+########################################################################
+#
+# [29-Apr-2000]
+#=======================================================================
+
+/^FontName/ { FontName[++NFontName] = $2 }
+
+
+/^C / {
+ if (NFontName == 1)
+ CharName1[$8]++
+ if (NFontName == 2)
+ CharName2[$8]++
+ }
+
+
+/^C / {
+ name = $8
+ if (name in WX)
+ {
+ if (WX[name] != $5)
+ WXDIFF[name] = WX[name] - $5
+ }
+ else
+ WX[name] = $5
+ }
+
+
+/^C / {
+ name = $8
+ bx = $13 - $11
+ if (name in BX)
+ {
+ if (BX[name] != bx)
+ BXDIFF[name] = BX[name] - bx
+ }
+ else
+ BX[name] = bx
+ }
+
+
+/^C / {
+ name = $8
+ by = $14 - $12
+ if (name in BY)
+ {
+ if (BY[name] != by)
+ BYDIFF[name] = BY[name] - by
+ }
+ else
+ BY[name] = by
+ }
+
+
+END {
+ Sortpipe = "sort -f | pr -3 -w80 -l1 -t"
+ print "Comparison of AFM metrics in files:", ARGV[1], ARGV[2]
+ print "Font names:", FontName[1], FontName[2]
+ show_name_diffs(FontName[2],CharName2, FontName[1],CharName1)
+ show_name_diffs(FontName[1],CharName1, FontName[2],CharName2)
+ show_num_diffs("WX width differences", WXDIFF)
+ show_num_diffs("Bounding box width differences", BXDIFF)
+ show_num_diffs("Bounding box height differences",BYDIFF)
+ }
+
+function show_name_diffs(font1,array1,font2,array2, name)
+{
+ print "\nChars from", font2, "missing from", font1 ":"
+ for (name in array2)
+ {
+ if (!(name in array1))
+ printf("%s\n", name) | Sortpipe
+ }
+ close(Sortpipe)
+}
+
+function show_num_diffs(title,array, name)
+{
+ printf("\n%s:\n", title)
+ for (name in array)
+ printf("%-15s\t%4d\n", name, array[name]) | Sortpipe
+ close(Sortpipe)
+}
diff --git a/Master/tlpkg/tlgs/lib/cidfmap b/Master/tlpkg/tlgs/lib/cidfmap
index e70b6afa3ee..8905898db4d 100644
--- a/Master/tlpkg/tlgs/lib/cidfmap
+++ b/Master/tlpkg/tlgs/lib/cidfmap
@@ -1,5 +1,5 @@
%!
-% $Id: cidfmap 44039 2017-04-25 20:52:40Z reinhardk $
+% $Id: $
%
% This file is part of TeX Live.
% Don't edit this file. It will be overwritten by TeX Live updates.
diff --git a/Master/tlpkg/tlgs/lib/cidfmap.TeXLive b/Master/tlpkg/tlgs/lib/cidfmap.TeXLive
index c0bceb4bfcc..d0cda3eeb28 100644
--- a/Master/tlpkg/tlgs/lib/cidfmap.TeXLive
+++ b/Master/tlpkg/tlgs/lib/cidfmap.TeXLive
@@ -1,312 +1,312 @@
-% cidfmap.TeXLive
-% $Id: cidfmap.TeXLive 33323 2014-03-29 23:43:19Z reinhardk $
-
-% This file is part of TeXLive.
-% You may freely use, modify and/or distribute this file.
-
-% Don't edit this file. It will be overwritten by TeX Live updates.
-
-% This file has been composed from cidfmap files created under Windows XP
-% and Windows 7 using tlgs/lib/mkcidfm.ps. It supports fonts provided by
-% Microsoft. Fonts installed by 3rd-party software are not supported.
-% The Japanese IPA fonts which are part of TeX Live are supported too.
-
-% Substitutions
-% =============
-
-% The comments to the right of the semicolon denote availability.
-% Please note that fonts introduced in the listed versions of Windows
-% are also available in later versions.
-
-
-% Chinese, simplified
-% -------------------
-
-/ArialUnicodeMS-GB <<
- /FileType /TrueType
- /SubfontID 0
- /CSI [(GB1) 2]
- /Path (ARIALUNI.TTF) >> ; % W7
-
-/FangSong <<
- /FileType /TrueType
- /SubfontID 0
- /CSI [(GB1) 2]
- /Path (simfang.ttf) >> ; % Vista
-
-/KaiTi <<
- /FileType /TrueType
- /SubfontID 0
- /CSI [(GB1) 2]
- /Path (simkai.ttf) >> ; % Vista
-
-/MicrosoftYaHei <<
- /FileType /TrueType
- /SubfontID 0
- /CSI [(GB1) 2]
- /Path (msyh.ttf) >> ; % Vista
-
-/MicrosoftYaHeiBold <<
- /FileType /TrueType
- /SubfontID 0
- /CSI [(GB1) 2]
- /Path (msyhbd.ttf) >> ; % Vista
-
-/NSimSun <<
- /FileType /TrueType
- /SubfontID 1
- /CSI [(GB1) 2]
- /Path (simsun.ttc) >> ; % XP
-
-/SimHei <<
- /FileType /TrueType
- /SubfontID 0
- /CSI [(GB1) 2]
- /Path (simhei.ttf) >> ; % XP
-
-/SimSun <<
- /FileType /TrueType
- /SubfontID 0
- /CSI [(GB1) 2]
- /Path (simsun.ttc) >> ; % XP
-
-
-% Chinese, traditional
-% --------------------
-
-/ArialUnicodeMS-CNS <<
- /FileType /TrueType
- /SubfontID 0
- /CSI [(CNS1) 2]
- /Path (ARIALUNI.TTF) >> ; % W7
-
-/DFKaiShu-SB-Estd-BF <<
- /FileType /TrueType
- /SubfontID 0
- /CSI [(CNS1) 2]
- /Path (kaiu.ttf) >> ; % Vista
-
-/MicrosoftJhengHeiBold <<
- /FileType /TrueType
- /SubfontID 0
- /CSI [(CNS1) 2]
- /Path (msjhbd.ttf) >> ; % Vista
-
-/MicrosoftJhengHeiRegular <<
- /FileType /TrueType
- /SubfontID 0
- /CSI [(CNS1) 2]
- /Path (msjh.ttf) >> ; % Vista
-
-/MingLiU <<
- /FileType /TrueType
- /SubfontID 0
- /CSI [(CNS1) 2]
- /Path (mingliu.ttc) >> ; % XP
-
-/PMingLiU <<
- /FileType /TrueType
- /SubfontID 1
- /CSI [(CNS1) 2]
- /Path (mingliu.ttc) >> ; % XP
-
-
-% Japanese
-% --------
-
-/ArialUnicodeMS-JP <<
- /FileType /TrueType
- /SubfontID 0
- /CSI [(Japan1) 3]
- /Path (ARIALUNI.TTF) >> ; % W7
-
-/MS-Gothic <<
- /FileType /TrueType
- /SubfontID 0
- /CSI [(Japan1) 3]
- /Path (msgothic.ttc) >> ; % XP
-
-/MS-Mincho <<
- /FileType /TrueType
- /SubfontID 0
- /CSI [(Japan1) 3]
- /Path (msmincho.ttc) >> ; % XP
-
-/MS-PGothic <<
- /FileType /TrueType
- /SubfontID 1
- /CSI [(Japan1) 3]
- /Path (msgothic.ttc) >> ; % XP
-
-/MS-PMincho <<
- /FileType /TrueType
- /SubfontID 1
- /CSI [(Japan1) 3]
- /Path (msmincho.ttc) >> ; % XP
-
-/MS-UI-Gothic <<
- /FileType /TrueType
- /SubfontID 2
- /CSI [(Japan1) 3]
- /Path (msgothic.ttc) >> ; % XP
-
-/Meiryo <<
- /FileType /TrueType
- /SubfontID 0
- /CSI [(Japan1) 3]
- /Path (meiryo.ttc) >> ; % Vista
-
-/Meiryo-Bold <<
- /FileType /TrueType
- /SubfontID 0
- /CSI [(Japan1) 3]
- /Path (meiryob.ttc) >> ; % Vista
-
-/Meiryo-BoldItalic <<
- /FileType /TrueType
- /SubfontID 1
- /CSI [(Japan1) 3]
- /Path (meiryob.ttc) >> ; % Vista
-
-/Meiryo-Italic <<
- /FileType /TrueType
- /SubfontID 1
- /CSI [(Japan1) 3]
- /Path (meiryo.ttc) >> ; % Vista
-
-/IPAexMincho <<
- /FileType /TrueType
- /SubfontID 0
- /CSI [(Japan1) 6]
- /Path (truetype/public/ipaex/ipaexm.ttf) >> ; % TeX Live
-
-/IPAexGothic <<
- /FileType /TrueType
- /SubfontID 0
- /CSI [(Japan1) 6]
- /Path (truetype/public/ipaex/ipaexg.ttf) >> ; % TeX Live
-
-/IPAMincho <<
- /FileType /TrueType
- /SubfontID 0
- /CSI [(Japan1) 6]
- /Path (truetype/public/ipaex/ipam.ttf) >> ; % TeX Live
-
-/IPAGothic <<
- /FileType /TrueType
- /SubfontID 0
- /CSI [(Japan1) 6]
- /Path (truetype/public/ipaex/ipag.ttf) >> ; % TeX Live
-
-
-% Korean
-% ------
-
-/ArialUnicodeMS-KR <<
- /FileType /TrueType
- /SubfontID 0
- /CSI [(Korea1) 3]
- /Path (ARIALUNI.TTF) >> ; % W7
-
-/Batang <<
- /FileType /TrueType
- /SubfontID 0
- /CSI [(Korea1) 3]
- /Path (batang.ttc) >> ; % XP
-
-/BatangChe <<
- /FileType /TrueType
- /SubfontID 1
- /CSI [(Korea1) 3]
- /Path (batang.ttc) >> ; % XP
-
-/Dotum <<
- /FileType /TrueType
- /SubfontID 2
- /CSI [(Korea1) 3]
- /Path (gulim.ttc) >> ; % XP
-
-/DotumChe <<
- /FileType /TrueType
- /SubfontID 3
- /CSI [(Korea1) 3]
- /Path (gulim.ttc) >> ; % XP
-
-/Gulim <<
- /FileType /TrueType
- /SubfontID 0
- /CSI [(Korea1) 3]
- /Path (gulim.ttc) >> ; % XP
-
-/GulimChe <<
- /FileType /TrueType
- /SubfontID 1
- /CSI [(Korea1) 3]
- /Path (gulim.ttc) >> ; % XP
-
-/Gungsuh <<
- /FileType /TrueType
- /SubfontID 2
- /CSI [(Korea1) 3]
- /Path (batang.ttc) >> ; % XP
-
-/GungsuhChe <<
- /FileType /TrueType
- /SubfontID 3
- /CSI [(Korea1) 3]
- /Path (batang.ttc) >> ; % XP
-
-/MalgunGothicBold <<
- /FileType /TrueType
- /SubfontID 0
- /CSI [(Korea1) 3]
- /Path (malgunbd.ttf) >> ; % Vista
-
-/MalgunGothicRegular <<
- /FileType /TrueType
- /SubfontID 0
- /CSI [(Korea1) 3]
- /Path (malgun.ttf) >> ; % Vista
-
-
-% Aliases for Windows XP and later versions
-% =========================================
-
-% Chinese, simplified
-% -------------------
-
-/AdobeHeitiStd-Regular /SimHei ;
-/AdobeSongStd-Light /SimSun ;
-/STFangsong-Light /SimSun ;
-/STHeiti-Regular /SimHei ;
-/STKaiti-Regular /SimHei ;
-/STSong-Light /SimSun ;
-
-% Chinese, traditional
-% --------------------
-
-/AdobeMingStd-Light /MingLiU ;
-/MHei-Medium /MingLiU ;
-/MKai-Medium /MingLiU ;
-/MSung-Light /MingLiU ;
-/MSung-Medium /MingLiU ;
-
-% Japanese
-% --------
-
-/GothicBBB-Medium /MS-Gothic ;
-/HeiseiKakuGo-W5 /MS-Gothic ;
-/HeiseiMin-W3 /MS-Mincho ;
-/KozMinPr6N-Regular /MS-Mincho ;
-/Ryumin-Light /MS-Mincho ;
-/Ryumin-Medium /MS-Mincho ;
-
-% Korean
-% ------
-
-/AdobeMyungjoStd-Medium /Batang ;
-/HYGoThic-Medium /Dotum ;
-/HYRGoThic-Medium /Gulim ;
-/HYSMyeongJo-Medium /Batang ;
-
-%%EOF
+% cidfmap.TeXLive
+% $Id: $
+
+% This file is part of TeXLive.
+% You may freely use, modify and/or distribute this file.
+
+% Don't edit this file. It will be overwritten by TeX Live updates.
+
+% This file has been composed from cidfmap files created under Windows XP
+% and Windows 7 using tlgs/lib/mkcidfm.ps. It supports fonts provided by
+% Microsoft. Fonts installed by 3rd-party software are not supported.
+% The Japanese IPA fonts which are part of TeX Live are supported too.
+
+% Substitutions
+% =============
+
+% The comments to the right of the semicolon denote availability.
+% Please note that fonts introduced in the listed versions of Windows
+% are also available in later versions.
+
+
+% Chinese, simplified
+% -------------------
+
+/ArialUnicodeMS-GB <<
+ /FileType /TrueType
+ /SubfontID 0
+ /CSI [(GB1) 2]
+ /Path (ARIALUNI.TTF) >> ; % W7
+
+/FangSong <<
+ /FileType /TrueType
+ /SubfontID 0
+ /CSI [(GB1) 2]
+ /Path (simfang.ttf) >> ; % Vista
+
+/KaiTi <<
+ /FileType /TrueType
+ /SubfontID 0
+ /CSI [(GB1) 2]
+ /Path (simkai.ttf) >> ; % Vista
+
+/MicrosoftYaHei <<
+ /FileType /TrueType
+ /SubfontID 0
+ /CSI [(GB1) 2]
+ /Path (msyh.ttf) >> ; % Vista
+
+/MicrosoftYaHeiBold <<
+ /FileType /TrueType
+ /SubfontID 0
+ /CSI [(GB1) 2]
+ /Path (msyhbd.ttf) >> ; % Vista
+
+/NSimSun <<
+ /FileType /TrueType
+ /SubfontID 1
+ /CSI [(GB1) 2]
+ /Path (simsun.ttc) >> ; % XP
+
+/SimHei <<
+ /FileType /TrueType
+ /SubfontID 0
+ /CSI [(GB1) 2]
+ /Path (simhei.ttf) >> ; % XP
+
+/SimSun <<
+ /FileType /TrueType
+ /SubfontID 0
+ /CSI [(GB1) 2]
+ /Path (simsun.ttc) >> ; % XP
+
+
+% Chinese, traditional
+% --------------------
+
+/ArialUnicodeMS-CNS <<
+ /FileType /TrueType
+ /SubfontID 0
+ /CSI [(CNS1) 2]
+ /Path (ARIALUNI.TTF) >> ; % W7
+
+/DFKaiShu-SB-Estd-BF <<
+ /FileType /TrueType
+ /SubfontID 0
+ /CSI [(CNS1) 2]
+ /Path (kaiu.ttf) >> ; % Vista
+
+/MicrosoftJhengHeiBold <<
+ /FileType /TrueType
+ /SubfontID 0
+ /CSI [(CNS1) 2]
+ /Path (msjhbd.ttf) >> ; % Vista
+
+/MicrosoftJhengHeiRegular <<
+ /FileType /TrueType
+ /SubfontID 0
+ /CSI [(CNS1) 2]
+ /Path (msjh.ttf) >> ; % Vista
+
+/MingLiU <<
+ /FileType /TrueType
+ /SubfontID 0
+ /CSI [(CNS1) 2]
+ /Path (mingliu.ttc) >> ; % XP
+
+/PMingLiU <<
+ /FileType /TrueType
+ /SubfontID 1
+ /CSI [(CNS1) 2]
+ /Path (mingliu.ttc) >> ; % XP
+
+
+% Japanese
+% --------
+
+/ArialUnicodeMS-JP <<
+ /FileType /TrueType
+ /SubfontID 0
+ /CSI [(Japan1) 3]
+ /Path (ARIALUNI.TTF) >> ; % W7
+
+/MS-Gothic <<
+ /FileType /TrueType
+ /SubfontID 0
+ /CSI [(Japan1) 3]
+ /Path (msgothic.ttc) >> ; % XP
+
+/MS-Mincho <<
+ /FileType /TrueType
+ /SubfontID 0
+ /CSI [(Japan1) 3]
+ /Path (msmincho.ttc) >> ; % XP
+
+/MS-PGothic <<
+ /FileType /TrueType
+ /SubfontID 1
+ /CSI [(Japan1) 3]
+ /Path (msgothic.ttc) >> ; % XP
+
+/MS-PMincho <<
+ /FileType /TrueType
+ /SubfontID 1
+ /CSI [(Japan1) 3]
+ /Path (msmincho.ttc) >> ; % XP
+
+/MS-UI-Gothic <<
+ /FileType /TrueType
+ /SubfontID 2
+ /CSI [(Japan1) 3]
+ /Path (msgothic.ttc) >> ; % XP
+
+/Meiryo <<
+ /FileType /TrueType
+ /SubfontID 0
+ /CSI [(Japan1) 3]
+ /Path (meiryo.ttc) >> ; % Vista
+
+/Meiryo-Bold <<
+ /FileType /TrueType
+ /SubfontID 0
+ /CSI [(Japan1) 3]
+ /Path (meiryob.ttc) >> ; % Vista
+
+/Meiryo-BoldItalic <<
+ /FileType /TrueType
+ /SubfontID 1
+ /CSI [(Japan1) 3]
+ /Path (meiryob.ttc) >> ; % Vista
+
+/Meiryo-Italic <<
+ /FileType /TrueType
+ /SubfontID 1
+ /CSI [(Japan1) 3]
+ /Path (meiryo.ttc) >> ; % Vista
+
+/IPAexMincho <<
+ /FileType /TrueType
+ /SubfontID 0
+ /CSI [(Japan1) 6]
+ /Path (truetype/public/ipaex/ipaexm.ttf) >> ; % TeX Live
+
+/IPAexGothic <<
+ /FileType /TrueType
+ /SubfontID 0
+ /CSI [(Japan1) 6]
+ /Path (truetype/public/ipaex/ipaexg.ttf) >> ; % TeX Live
+
+/IPAMincho <<
+ /FileType /TrueType
+ /SubfontID 0
+ /CSI [(Japan1) 6]
+ /Path (truetype/public/ipaex/ipam.ttf) >> ; % TeX Live
+
+/IPAGothic <<
+ /FileType /TrueType
+ /SubfontID 0
+ /CSI [(Japan1) 6]
+ /Path (truetype/public/ipaex/ipag.ttf) >> ; % TeX Live
+
+
+% Korean
+% ------
+
+/ArialUnicodeMS-KR <<
+ /FileType /TrueType
+ /SubfontID 0
+ /CSI [(Korea1) 3]
+ /Path (ARIALUNI.TTF) >> ; % W7
+
+/Batang <<
+ /FileType /TrueType
+ /SubfontID 0
+ /CSI [(Korea1) 3]
+ /Path (batang.ttc) >> ; % XP
+
+/BatangChe <<
+ /FileType /TrueType
+ /SubfontID 1
+ /CSI [(Korea1) 3]
+ /Path (batang.ttc) >> ; % XP
+
+/Dotum <<
+ /FileType /TrueType
+ /SubfontID 2
+ /CSI [(Korea1) 3]
+ /Path (gulim.ttc) >> ; % XP
+
+/DotumChe <<
+ /FileType /TrueType
+ /SubfontID 3
+ /CSI [(Korea1) 3]
+ /Path (gulim.ttc) >> ; % XP
+
+/Gulim <<
+ /FileType /TrueType
+ /SubfontID 0
+ /CSI [(Korea1) 3]
+ /Path (gulim.ttc) >> ; % XP
+
+/GulimChe <<
+ /FileType /TrueType
+ /SubfontID 1
+ /CSI [(Korea1) 3]
+ /Path (gulim.ttc) >> ; % XP
+
+/Gungsuh <<
+ /FileType /TrueType
+ /SubfontID 2
+ /CSI [(Korea1) 3]
+ /Path (batang.ttc) >> ; % XP
+
+/GungsuhChe <<
+ /FileType /TrueType
+ /SubfontID 3
+ /CSI [(Korea1) 3]
+ /Path (batang.ttc) >> ; % XP
+
+/MalgunGothicBold <<
+ /FileType /TrueType
+ /SubfontID 0
+ /CSI [(Korea1) 3]
+ /Path (malgunbd.ttf) >> ; % Vista
+
+/MalgunGothicRegular <<
+ /FileType /TrueType
+ /SubfontID 0
+ /CSI [(Korea1) 3]
+ /Path (malgun.ttf) >> ; % Vista
+
+
+% Aliases for Windows XP and later versions
+% =========================================
+
+% Chinese, simplified
+% -------------------
+
+/AdobeHeitiStd-Regular /SimHei ;
+/AdobeSongStd-Light /SimSun ;
+/STFangsong-Light /SimSun ;
+/STHeiti-Regular /SimHei ;
+/STKaiti-Regular /SimHei ;
+/STSong-Light /SimSun ;
+
+% Chinese, traditional
+% --------------------
+
+/AdobeMingStd-Light /MingLiU ;
+/MHei-Medium /MingLiU ;
+/MKai-Medium /MingLiU ;
+/MSung-Light /MingLiU ;
+/MSung-Medium /MingLiU ;
+
+% Japanese
+% --------
+
+/GothicBBB-Medium /MS-Gothic ;
+/HeiseiKakuGo-W5 /MS-Gothic ;
+/HeiseiMin-W3 /MS-Mincho ;
+/KozMinPr6N-Regular /MS-Mincho ;
+/Ryumin-Light /MS-Mincho ;
+/Ryumin-Medium /MS-Mincho ;
+
+% Korean
+% ------
+
+/AdobeMyungjoStd-Medium /Batang ;
+/HYGoThic-Medium /Dotum ;
+/HYRGoThic-Medium /Gulim ;
+/HYSMyeongJo-Medium /Batang ;
+
+%%EOF
diff --git a/Master/tlpkg/tlgs/lib/gslp.ps b/Master/tlpkg/tlgs/lib/gslp.ps
index 173d52c2170..9a3a2f3e630 100644
--- a/Master/tlpkg/tlgs/lib/gslp.ps
+++ b/Master/tlpkg/tlgs/lib/gslp.ps
@@ -38,10 +38,13 @@
% --detect
% treat the file as PostScript if it starts with %!
% --first-page <n>
-% --duplex(|-long-edge|-short-edge)
-% use duplex if available; if not specified, select long edge
-% for portrait printing, short edge for landscape
+% --duplex(|-long-edge|-short-edge)
+% use duplex if available; if not specified, select long edge
+% for portrait printing, short edge for landscape
% start printing at page <n>
+% --encoding <encodingname> default ISOLatin1Encoding
+% Note this only takes effect during -f or -F option thus the
+% body text and header text can use different encodings.
% --kern <file.afm>
% kern using information from the given .AFM file
% --last-page <n>
@@ -60,17 +63,26 @@
/lpdict 150 dict def
lpdict begin
-% build iso-latin-1 version of a font
-/font-to-iso-latin-1 { % <font> font-to-iso-latin-1 <font>
+/encoding /ISOLatin1Encoding def % the default encoding
+
+% build a version of the font with the requested encoding (default ISOLatin1)
+/font-to-encoding { % <font> font-to-encoding <font>
%% reencode for iso latin1; from the 2nd edition red book, sec 5.6.1
dup length dict begin {1 index /FID ne {def} {pop pop} ifelse} forall
- /Encoding ISOLatin1Encoding def currentdict end
- dup /FontName get 80 string cvs (-ISOLatin1) concatstrings cvn
+ /Encoding encoding /Encoding findresource readonly def
+ currentdict end
+ % strip off the "Encoding" part of the encoding (if present)
+ dup /FontName get 80 string cvs
+ encoding 256 string cvs (Encoding) search {
+ exch pop exch pop
+ } if
+ exch (-) concatstrings exch
+ concatstrings cvn
exch definefont
} def
/find-latin-font { % <name> find-latin-font <font>
- findfont font-to-iso-latin-1
+ findfont font-to-encoding
} def
% Define the initial values of the printing parameters.
@@ -275,14 +287,17 @@ lpdict begin
/StringTAB (\t) def
/CharTAB StringTAB 0 get def
-/showline % line -> leftover_line (handles \f)
- { { showline1 dup length 0 eq { exit } if
- dup 0 get CharFF ne { exit } if
+/showline { % line -> leftover_line (handles \f)
+ { showline1 dup length 0 eq { exit } if
+ dup 0 get CharFF ne {
+ Truncate { pop () } if
+ exit
+ } if
EjectFF { endpage beginpage } { endcolumn } ifelse
skip1
- }
+ }
loop
- } def
+} def
/showline1 % line -> leftover_line (handles page break)
{ lindex llength eq { endpage beginpage } if
@@ -409,9 +424,9 @@ lpdict begin
/S {currentfile =string readline pop show} lpdef
/RE { % <isoname> <fontname> RE <font>
findfont
- %% reencode for iso latin1; from the 2nd edition red book, sec 5.6.1
+ %% reencode for current 'encoding' from the 2nd edition red book, sec 5.6.1
dup length dict begin {1 index /FID ne {def} {pop pop} ifelse} forall
- /Encoding ISOLatin1Encoding def currentdict end
+ /Encoding encoding def currentdict end
definefont
} lpdef
} def
@@ -506,24 +521,31 @@ lpdict begin
% Iterate through the file.
lpline
- { dup length /pos exch def
- lbuf exch 0 exch putinterval
- { lpfile lbuf pos lbuf length pos sub getinterval readline } stopped
- { % Filled the line before a CR or EOF.
- exch pop showline
- }
- { % Reached CR and/or EOF first.
+ % First handle new-lines in the initial string (--detect mode)
+ (\n) search {
+ showline % output up to the first new-line
+ pop pop % done with that string and the new-line
+ (\n) search {
+ showline % output the second new-line
+ pop pop % done
+ } if
+ } if
+ { dup length /pos exch def
+ lbuf exch 0 exch putinterval
+ { lpfile lbuf pos lbuf length pos sub getinterval readline } stopped
+ { % Filled the line before a CR or EOF.
+ exch pop showline
+ }
+ { % Reached CR and/or EOF first.
exch length pos add lbuf exch 0 exch getinterval
1 index { showline } if % omit final empty line
- { dup length 0 eq Truncate or { pop () exit } if
+ { dup length 0 eq { pop () exit } if
showline
- }
- loop
+ } loop
exch not { exit } if
- }
- ifelse
+ } ifelse
pindex PageLast gt { exit } if
- } loop
+ } loop
pop
% Wrap up.
@@ -588,6 +610,7 @@ lpdict begin
/--duplex { /Duplex {Landscape} def } def
/--duplex-long-edge { /Duplex false def } def
/--duplex-short-edge { /Duplex true def } def
+/--encoding { cvn /encoding exch def } def
/--first-page { cvi /PageFirst exch def } def
/--footing-center { /FootingCenter exch def /Footers true def } def
/--footing-left { /FootingLeft exch def /Footers true def } def
diff --git a/Master/tlpkg/tlgs/lib/viewgif.ps b/Master/tlpkg/tlgs/lib/viewgif.ps
index a261bf7e654..0426e2f46c0 100644
--- a/Master/tlpkg/tlgs/lib/viewgif.ps
+++ b/Master/tlpkg/tlgs/lib/viewgif.ps
@@ -42,7 +42,9 @@
GlobalColor
{ PaletteSize 3 mul string readstring pop
/GlobalPalette exch def
- } if
+ } {
+ pop
+ } ifelse
currentdict end
} bind def
@@ -159,7 +161,7 @@
} bind def
% This lets you do stuff on the command line like:
-% gs -sDEVICE=pdfwrite -o stuff%03d.pdf viewgif.ps -c "(image.gif) << /PageSize 2 index viewGIFgetsize 2 array astore >> setpagedevice viewGIF"
+% gs -sDEVICE=pdfwrite -o stuff%03d.pdf viewgif.ps -c "(image.gif) << /PageSize 2 index viewGIFgetsize 2 array astore /HWResolution [ 72 72 ] >> setpagedevice viewGIF"
% so the output size is influenced by the original image.
/viewGIFgetsize % <file|string> ==> [width height]
{
diff --git a/Master/tlpkg/tlgs/lib/zugferd.ps b/Master/tlpkg/tlgs/lib/zugferd.ps
index 0320fb69e8e..97d33d4d2b4 100644
--- a/Master/tlpkg/tlgs/lib/zugferd.ps
+++ b/Master/tlpkg/tlgs/lib/zugferd.ps
@@ -1,3 +1,5 @@
+%!PS
+
% Copyright (C) 2001-2021 Artifex Software, Inc.
% All Rights Reserved.
%
@@ -12,38 +14,68 @@
% Artifex Software, Inc., 1305 Grant Avenue - Suite 200, Novato,
% CA 94945, U.S.A., +1(415)492-9861, for further information.
%
-% zugferd.ps
-% This program will create an (unsigned) ZUGFeRD compliant PDF file. In
-% order to do so the user must provide certain information, or edit this program.
+% ZUGFeRD.ps
+% This program will create an (unsigned) ZUGFeRD compliant PDF file.
+% In order to do so the user must provide certain information, or edit
+% this program.
+%
+% Required information is the path to the XML file containing the invoice
+% data, and the path to an ICC profile appropriate for the chosen
+% ColorConversionStrategy.
+%
+% -sZUGFeRDXMLFile defines a path to the XML invoice file.
+%
+% -sZUGFeRDProfile defines the path to the ICC profile.
+%
+% -sZUGFeRDVersion defines the version of the ZUGFeRD standard to be used.
+% Missing or invalid values would be silently replaced by the default ("2p1").
+%
+% -sZUGFeRDConformanceLevel defines the level of conformance.
+% Missing or invalid values would be silently replaced by the default ("BASIC").
%
-% Required information is the path to the XML file containing the invoice data,
-% and the path to an ICC profile appropriate for the chosen ColorConversionStrategy.
-% -sZUGFeRDXMLFile defines a path to the XML invoice file and -sZUGFeRDProfile
-% defines the path to the ICC profile.
+% Note that the ZUGFeRD standard states:
%
-% The user must additionally set -dPDFA=3 and -sColorConversionStrategy on the
-% Ghostscript command line, and set the permissions for Ghostscript to read
-% both these files. It is simplest to put the files in a directory and then
-% permit reading of the entire directory.
+% The content of the field fx:ConformanceLevel has to be picked from
+% the content of the element "GuidelineSpecifiedDocumentContextParameter"
+% (specification identifier BT-24) of the XML instance file.
+%
+% The user must additionally set -dPDFA=3 and -sColorConversionStrategy
+% on the Ghostscript command line, and set the permissions for Ghostscript
+% to read both these files. It is simplest to put the files in a directory
+% and then permit reading of the entire directory.
%
% Example command line :
%
-% gs --permit-file-read=/usr/home/me/zugferd/ -sDEVICE=pdfwrite -dPDFA=3 -sColorConversionStrategy=RGB \
-% -sZUGFeRDXMLFile=/usr/home/me/zugferd/invoice.xml -sZUGFeRDProfile=/usr/home/me/rgb.icc \
-% -o /usr/home/me/zugferd/zugferd.pdf /usr/home/me/zugferd/zugferd.ps /usr/home/me/zugferd/original.pdf
+% gs --permit-file-read=/usr/home/me/zugferd/ \
+% -sDEVICE=pdfwrite \
+% -dPDFA=3 \
+% -sColorConversionStrategy=RGB \
+% -sZUGFeRDXMLFile=/usr/home/me/zugferd/invoice.xml \
+% -sZUGFeRDProfile=/usr/home/me/zugferd/rgb.icc \
+% -sZUGFeRDVersion=2p1 \
+% -sZUGFeRDConformanceLevel=BASIC \
+% -o /usr/home/me/zugferd/zugferd.pdf \
+% /usr/home/me/zugferd/zugferd.ps \
+% /usr/home/me/zugferd/original.pdf
%
-% Much of this program results from a Ghostscript bug report, the thread can be found at
-% https://bugs.ghostscript.com/show_bug.cgi?id=696472 Portions of the code below were
-% supplied by Reinhard Nissl and I'm indebted to him for his efforts in helping me create
-% a solution for this problem as well as for the code he supplied, particularly for the
+% Much of this program results from a Ghostscript bug report, the thread
+% can be found at
+% https://bugs.ghostscript.com/show_bug.cgi?id=696472
+% Portions of the code below were supplied by Reinhard Nissl and
+% I'm indebted to him for his efforts in helping me create a solution for
+% this problem as well as for the code he supplied, particularly for the
% SimpleUTF16BE routine.
%
-% It should not be necessary to modify this program, the comments in the code are there purely for information,
-% but there are two areas which might reasonably be altered. The section with the --8<-- lines could be replaced
-% with a simpler /N 3 or /N 4 if you always intend to produce the same kind of files; RGB or CMYK.
-% In step 7, the large XML string will need to be replaced if you want to produce a ZUGFeRD 2.1
-% file, and in future may require similar modification for later versions.
+% The program was further refined and expanded by Adrian Devries in :
+% https://bugs.ghostscript.com/show_bug.cgi?id=703862
+%
+% It should not be necessary to modify this program, the comments in the
+% code are there purely for information, but there is one area which
+% might reasonably be altered. The section with the --8<-- lines could be
+% replaced with a simpler /N 3 or /N 4 if you always intend to produce
+% the same kind of files; RGB or CMYK.
%
+% Remaining tasks have been marked with "TODO".
% istring SimpleUTF16BE ostring
/SimpleUTF16BE
@@ -52,13 +84,11 @@
1 add
2 mul
string
-
% istring ostring
dup 0 16#FE put
dup 1 16#FF put
2
3 -1 roll
-
% ostring index istring
{
% ostring index ichar
@@ -74,12 +104,246 @@
% ostring index
}
forall
-
% ostring index
pop
}
bind def
+% Cf. https://en.wikibooks.org/wiki/PostScript_FAQ#How_to_concatenate_strings%3F
+/concatstringarray { % [(a) (b) ... (z)] --> (ab...z)
+ 0 1 index {
+ length add
+ } forall
+ string
+ 0 3 2 roll {
+ 3 copy putinterval
+ length add
+ } forall
+ pop
+} bind def
+
+/ZUGFeRDVersion where {
+ pop % Discard the dictionary
+ ZUGFeRDVersion (rc) ne {
+ ZUGFeRDVersion (1p0) ne {
+ ZUGFeRDVersion (2p0) ne {
+ ZUGFeRDVersion (2p1) ne {
+ /ZUGFeRDVersion (2p1) def
+ } if
+ } if
+ } if
+ } if
+}{
+ /ZUGFeRDVersion (2p1) def
+} ifelse
+
+/ZUGFeRDConformanceLevel where {
+ pop % Discard the dictionary
+ ZUGFeRDVersion (rc) eq
+ ZUGFeRDVersion (1p0) eq or {
+ ZUGFeRDConformanceLevel (BASIC) ne {
+ ZUGFeRDConformanceLevel (COMFORT) ne {
+ ZUGFeRDConformanceLevel (EXTENDED) ne {
+ /ZUGFeRDConformanceLevel (BASIC) def
+ } if
+ } if
+ } if
+ } if
+ ZUGFeRDVersion (2p0) eq
+ ZUGFeRDVersion (2p1) eq or {
+ ZUGFeRDConformanceLevel (MINIMUM) ne {
+ ZUGFeRDConformanceLevel (BASIC WL) ne {
+ ZUGFeRDConformanceLevel (BASIC) ne {
+ ZUGFeRDConformanceLevel (EN 16931) ne {
+ ZUGFeRDConformanceLevel (EXTENDED) ne {
+ ZUGFeRDConformanceLevel (XRECHNUNG) ne {
+ /ZUGFeRDConformanceLevel (BASIC) def
+ } if
+ } if
+ } if
+ } if
+ } if
+ } if
+ } if
+}{
+ /ZUGFeRDConformanceLevel (BASIC) def
+} ifelse
+
+% ZUGFeRDSchema
+/ZUGFeRDSchema () def
+ZUGFeRDVersion (rc) eq
+ZUGFeRDVersion (1p0) eq or
+ZUGFeRDVersion (2p0) eq or {
+ /ZUGFeRDSchema (ZUGFeRD PDFA Extension Schema) def
+} if
+ZUGFeRDVersion (2p1) eq {
+ /ZUGFeRDSchema (Factur-X PDFA Extension Schema) def
+} if
+
+% ZUGFeRDNamespaceURI
+/ZUGFeRDNamespaceURI () def
+ZUGFeRDVersion (rc) eq {
+ /ZUGFeRDNamespaceURI (urn:ferd:pdfa:invoice:rc#) def
+} if
+ZUGFeRDVersion (1p0) eq {
+ /ZUGFeRDNamespaceURI (urn:ferd:pdfa:CrossIndustryDocument:invoice:1p0#) def
+} if
+ZUGFeRDVersion (2p0) eq {
+ /ZUGFeRDNamespaceURI (urn:zugferd:pdfa:CrossIndustryDocument:invoice:2p0#) def
+} if
+ZUGFeRDVersion (2p1) eq {
+ /ZUGFeRDNamespaceURI (urn:factur-x:pdfa:CrossIndustryDocument:invoice:1p0#) def
+} if
+
+% ZUGFeRDPrefix
+/ZUGFeRDPrefix () def
+ZUGFeRDVersion (rc) eq
+ZUGFeRDVersion (1p0) eq or
+ZUGFeRDVersion (2p0) eq or {
+ /ZUGFeRDPrefix (zf) def
+} if
+ZUGFeRDVersion (2p1) eq {
+ /ZUGFeRDPrefix (fx) def
+} if
+
+% ZUGFeRDVersionDescription
+/ZUGFeRDVersionDescription () def
+ZUGFeRDVersion (rc) eq
+ZUGFeRDVersion (1p0) eq or
+ZUGFeRDVersion (2p0) eq or {
+ /ZUGFeRDVersionDescription (The actual version of the ZUGFeRD XML schema) def
+} if
+ZUGFeRDVersion (2p1) eq {
+ /ZUGFeRDVersionDescription (The actual version of the Factur-X XML schema) def
+} if
+
+% ZUGFeRDConformanceLevelDescription
+/ZUGFeRDConformanceLevelDescription () def
+ZUGFeRDVersion (rc) eq
+ZUGFeRDVersion (1p0) eq or
+ZUGFeRDVersion (2p0) eq or {
+ /ZUGFeRDConformanceLevelDescription (The conformance level of the embedded ZUGFeRD data) def
+} if
+ZUGFeRDVersion (2p1) eq {
+ /ZUGFeRDConformanceLevelDescription (The conformance level of the embedded Factur-X data) def
+} if
+
+% ZUGFeRDDocumentFileName
+/ZUGFeRDDocumentFileName () def
+ZUGFeRDVersion (rc) eq {
+ /ZUGFeRDDocumentFileName (ZUGFeRD-invoice.xml) def
+} if
+ZUGFeRDVersion (1p0) eq {
+ /ZUGFeRDDocumentFileName (ZUGFeRD-invoice.xml) def
+} if
+ZUGFeRDVersion (2p0) eq {
+ ZUGFeRDConformanceLevel (XRECHNUNG) ne {
+ /ZUGFeRDDocumentFileName (zugferd-invoice.xml) def
+ }{
+ /ZUGFeRDDocumentFileName (xrechnung.xml) def
+ } ifelse
+} if
+ZUGFeRDVersion (2p1) eq {
+ ZUGFeRDConformanceLevel (XRECHNUNG) ne {
+ /ZUGFeRDDocumentFileName (factur-x.xml) def
+ }{
+ /ZUGFeRDDocumentFileName (xrechnung.xml) def
+ } ifelse
+} if
+
+% ZUGFeRDVersionData
+/ZUGFeRDVersionData () def
+ZUGFeRDVersion (rc) eq {
+ /ZUGFeRDVersionData (RC) def
+} if
+ZUGFeRDVersion (1p0) eq {
+ /ZUGFeRDVersionData (1.0) def
+} if
+ZUGFeRDVersion (2p0) eq {
+ ZUGFeRDConformanceLevel (XRECHNUNG) ne {
+ /ZUGFeRDVersionData (2p0) def
+ }{
+ /ZUGFeRDVersionData (1p2) def
+ } ifelse
+} if
+ZUGFeRDVersion (2p1) eq {
+ ZUGFeRDConformanceLevel (XRECHNUNG) ne {
+ /ZUGFeRDVersionData (1.0) def
+ }{
+ /ZUGFeRDVersionData (1p2) def
+ } ifelse
+} if
+
+/ZUGFeRDMetadata [
+(
+<rdf:Description)
+( xmlns:pdfaExtension="http://www.aiim.org/pdfa/ns/extension/")
+( xmlns:pdfaProperty="http://www.aiim.org/pdfa/ns/property#")
+( xmlns:pdfaSchema="http://www.aiim.org/pdfa/ns/schema#")
+( rdf:about="">
+ <pdfaExtension:schemas>
+ <rdf:Bag>
+ <rdf:li rdf:parseType="Resource">
+ <pdfaSchema:schema>)ZUGFeRDSchema(</pdfaSchema:schema>
+ <pdfaSchema:namespaceURI>)ZUGFeRDNamespaceURI(</pdfaSchema:namespaceURI>
+ <pdfaSchema:prefix>)ZUGFeRDPrefix(</pdfaSchema:prefix>
+ <pdfaSchema:property>
+ <rdf:Seq>
+ <rdf:li rdf:parseType="Resource">
+ <pdfaProperty:name>DocumentFileName</pdfaProperty:name>
+ <pdfaProperty:valueType>Text</pdfaProperty:valueType>
+ <pdfaProperty:category>external</pdfaProperty:category>
+ <pdfaProperty:description>Name of the embedded XML invoice file</pdfaProperty:description>
+ </rdf:li>
+ <rdf:li rdf:parseType="Resource">
+ <pdfaProperty:name>DocumentType</pdfaProperty:name>
+ <pdfaProperty:valueType>Text</pdfaProperty:valueType>
+ <pdfaProperty:category>external</pdfaProperty:category>
+ <pdfaProperty:description>INVOICE</pdfaProperty:description>
+ </rdf:li>
+ <rdf:li rdf:parseType="Resource">
+ <pdfaProperty:name>Version</pdfaProperty:name>
+ <pdfaProperty:valueType>Text</pdfaProperty:valueType>
+ <pdfaProperty:category>external</pdfaProperty:category>
+ <pdfaProperty:description>)ZUGFeRDVersionDescription(</pdfaProperty:description>
+ </rdf:li>
+ <rdf:li rdf:parseType="Resource">
+ <pdfaProperty:name>ConformanceLevel</pdfaProperty:name>
+ <pdfaProperty:valueType>Text</pdfaProperty:valueType>
+ <pdfaProperty:category>external</pdfaProperty:category>
+ <pdfaProperty:description>)ZUGFeRDConformanceLevelDescription(</pdfaProperty:description>
+ </rdf:li>
+ </rdf:Seq>
+ </pdfaSchema:property>
+ </rdf:li>
+ </rdf:Bag>
+ </pdfaExtension:schemas>
+</rdf:Description>
+<rdf:Description xmlns:)ZUGFeRDPrefix(=")ZUGFeRDNamespaceURI(" rdf:about="">
+ <)ZUGFeRDPrefix(:ConformanceLevel>)ZUGFeRDConformanceLevel(</)ZUGFeRDPrefix(:ConformanceLevel>
+ <)ZUGFeRDPrefix(:DocumentFileName>)ZUGFeRDDocumentFileName(</)ZUGFeRDPrefix(:DocumentFileName>
+ <)ZUGFeRDPrefix(:DocumentType>INVOICE</)ZUGFeRDPrefix(:DocumentType>
+ <)ZUGFeRDPrefix(:Version>)ZUGFeRDVersionData(</)ZUGFeRDPrefix(:Version>
+</rdf:Description>
+)
+ ] concatstringarray def
+
+/Usage {
+ (example usage: \n) print
+ ( gs --permit-file-read=/usr/home/me/zugferd/ \\\n) print
+ ( -sDEVICE=pdfwrite \\\n) print
+ ( -dPDFA=3 \\\n) print
+ ( -sColorConversionStrategy=RGB \\\n) print
+ ( -sZUGFeRDXMLFile=/usr/home/me/zugferd/invoice.xml \\\n) print
+ ( -sZUGFeRDProfile=/usr/home/me/zugferd\rgb.icc \\\n) print
+ ( -sZUGFeRDVersion=2p1 \\\n) print
+ ( -sZUGFeRDConformanceLevel=BASIC \\\n) print
+ ( -o /usr/home/me/zugferd/zugferd.pdf \\\n) print
+ ( /usr/home/me/zugferd/zugferd.ps \\\n) print
+ ( /usr/home/me/zugferd/original.pdf \n) print
+ flush
+} def
+
% First check that the user has defined the XML invoice file on the command line
%
/ZUGFeRDXMLFile where {
@@ -90,7 +354,9 @@ bind def
/ZUGFeRDProfile where {
pop % Discard the dictionary
- % Step 1, add the required PDF/A boilerplate. This is mostly copied from lib/pdfa_de.ps
+ % Step 1, add the required PDF/A boilerplate.
+ % This is mostly copied from lib/pdfa_def.ps
+
% Create a PDF stream object to hold the ICC profile.
[ /_objdef {icc_PDFA} /type /stream /OBJ pdfmark
@@ -157,45 +423,43 @@ bind def
/Type /OutputIntent
/S /GTS_PDFA1 % Required for PDF/A.
/DestOutputProfile {icc_PDFA} % The actual profile.
- /OutputConditionIdentifier (Custom) % A better solution is a string from the ICC Registry, but Custom is always valid.
+ /OutputConditionIdentifier (Custom) % TODO: A better solution is a
+ % a string from the ICC
+ % Registry, but Custom
+ % is always valid.
>> /PUT pdfmark
% And now add the OutputIntent to the Catalog dictionary
[ {Catalog} << /OutputIntents [ {OutputIntent_PDFA} ]>> /PUT pdfmark
-
% Step 2, define the XML file and read it into the PDF
% First we define the PDF stream to contain the XML invoice
[ /_objdef {InvoiceStream} /type /stream /OBJ pdfmark
-
% Fill in the dictionary elements we need. We believe the
% ModDate is not useful so it's just set to a valid value.
[ {InvoiceStream} <<
- /Type /EmbeddedFile
- /Subtype (text/xml) cvn
+ /Type /EmbeddedFile
+ /Subtype (text/xml) cvn
+ % TODO: Determine file length, and add /Length entry
/Params <<
- /ModDate (D:20130121081433+01’00’)
+ /ModDate (D:20130121081433+01'00') % TODO: Determine file date.
>>
>> /PUT pdfmark
-
% Now read the data from the file and store it in the stream
[ {InvoiceStream} ZUGFeRDXMLFile (r) file /PUT pdfmark
-
% and close the stream
[ {InvoiceStream} /CLOSE pdfmark
-
% Step 3 create the File Specification dictionary for the embedded file
% Create the dictionary
[ /_objdef {FSDict} /type /dict /OBJ pdfmark
-
% Fill in the required dictionary elements
[ {FSDict} <<
/Type /FileSpec
- /F ZUGFeRDXMLFile
- /UF ZUGFeRDXMLFile SimpleUTF16BE
+ /F ZUGFeRDDocumentFileName
+ /UF ZUGFeRDDocumentFileName SimpleUTF16BE
/Desc (ZUGFeRD electronic invoice)
- /AFRelationship /Alternative
+ /AFRelationship /Alternative
/EF <<
/F {InvoiceStream}
/UF {InvoiceStream}
@@ -203,114 +467,38 @@ bind def
>>
/PUT pdfmark
-
% Step 4 Create the Associated Files dictionary to hold the FS dict
% Create the dictionary
[ /_objdef {AFArray} /type /array /OBJ pdfmark
-
% Put (append) the FS dictionary into the Associated Files array
[ {AFArray} {FSDict} /APPEND pdfmark
-
% Step 5 Add an entry in the Catalog dictionary containing the AF array
[ {Catalog} << /AF {AFArray} >> /PUT pdfmark
-
% Step 6 use the EMBED pdfmark to add the XML file and FS dictionary to the PDF name tree
- [ /Name ZUGFeRDXMLFile /FS {FSDict} /EMBED pdfmark
-
+ [ /Name ZUGFeRDDocumentFileName /FS {FSDict} /EMBED pdfmark
% Step 7 Add the extra ZUGFeRD XML data to the Metadata
- [ /XML
-(
- <!-- XMP extension schema container for the zugferd schema -->
- <rdf:Description rdf:about=""
- xmlns:pdfaExtension="http://www.aiim.org/pdfa/ns/extension/"
- xmlns:pdfaSchema="http://www.aiim.org/pdfa/ns/schema#"
- xmlns:pdfaProperty="http://www.aiim.org/pdfa/ns/property#">
-
- <!-- Container for all embedded extension schema descriptions -->
- <pdfaExtension:schemas>
- <rdf:Bag>
- <rdf:li rdf:parseType="Resource">
- <!-- Optional description of schema -->
- <pdfaSchema:schema>ZUGFeRD PDFA Extension Schema</pdfaSchema:schema>
- <!-- Schema namespace URI -->
- <pdfaSchema:namespaceURI>urn:ferd:pdfa:invoice:rc#</pdfaSchema:namespaceURI>
- <!-- Preferred schema namespace prefix -->
- <pdfaSchema:prefix>zf</pdfaSchema:prefix>
-
- <!-- Description of schema properties -->
- <pdfaSchema:property>
- <rdf:Seq>!
- <rdf:li rdf:parseType="Resource">
- <!-- DocumentFileName: Name of the embedded file;
- must be equal with the value of the /F tag in the /EF
- structure -->
- <pdfaProperty:name>DocumentFileName</pdfaProperty:name>
- <pdfaProperty:valueType>Text</pdfaProperty:valueType>
- <pdfaProperty:category>external</pdfaProperty:category>
- <pdfaProperty:description>name of the embedded xml invoice file</pdfaProperty:description>
- </rdf:li>
- <rdf:li rdf:parseType="Resource">
- <!-- DocumentType: INVOICE -->
- <pdfaProperty:name>DocumentType</pdfaProperty:name>
- <pdfaProperty:valueType>Text</pdfaProperty:valueType>
- <pdfaProperty:category>external</pdfaProperty:category>
- <pdfaProperty:description>INVOICE</pdfaProperty:description>
- </rdf:li>
- <rdf:li rdf:parseType="Resource">
- <!-- Version: The actual version of the
- ZUGFeRD standard -->
- <pdfaProperty:name>Version</pdfaProperty:name>
- <pdfaProperty:valueType>Text</pdfaProperty:valueType>
- <pdfaProperty:category>external</pdfaProperty:category>
- <pdfaProperty:description>The actual version of the ZUGFeRD data</pdfaProperty:description>
- </rdf:li>
- <rdf:li rdf:parseType="Resource">
- <!-- ConformanceLevel: The actual conformance
- level of the ZUGFeRD standard,
- e.g. BASIC, COMFORT, EXTENDED -->
- <pdfaProperty:name>ConformanceLevel</pdfaProperty:name>
- <pdfaProperty:valueType>Text</pdfaProperty:valueType>
- <pdfaProperty:category>external</pdfaProperty:category>
- <pdfaProperty:description>The conformance level of the ZUGFeRD data</pdfaProperty:description>
- </rdf:li>
- </rdf:Seq>
- </pdfaSchema:property>
- </rdf:li>
- </rdf:Bag>
- </pdfaExtension:schemas>
- </rdf:Description>
-
- <rdf:Description rdf:about="" xmlns:zf="urn:ferd:pdfa:invoice:rc#">
- <zf:DocumentType>INVOICE</zf:DocumentType>
- <zf:DocumentFileName>ZUGFeRD-invoice.xml</zf:DocumentFileName>
- <zf:Version>RC</zf:Version>
- <zf:ConformanceLevel>BASIC</zf:ConformanceLevel>
- </rdf:Description>
-) /Ext_Metadata pdfmark
+ [ /XML ZUGFeRDMetadata /Ext_Metadata pdfmark
}
{
- % No ICC Profile definition on the command line; chide the user and give them an example
- %
- (\nERROR - ZUGFeRDProfile has not been supplied, you must supply an ICC profile\n) print
- ( Producing a potentially invalid PDF/A file!!\n) print
- (example usage - gs --permit-file-read=/usr/home/me/zugferd/ -sDEVICE=pdfwrite -dPDFA=3\\\n) print
- ( -sColorConversionStrategy=RGB -sZUGFeRDXMLFile=/usr/home/me/zugferd/invoice.xml\\\n) print
- ( -sZUGFeRDProfile=/usr/home/me/rgb.icc -o /usr/home/me/zugferd/zugferd.pdf\\\n) print
- ( /usr/home/me/zugferd/zugferd.ps /usr/home/me/zugferd/original.pdf\n\n) print flush
+ % No ICC Profile definition on the command line;
+ % chide the user and give them an example
+ (\nERROR - ZUGFeRDProfile has not been supplied, you must supply an ICC profile) print
+ (\n Producing a potentially INVALID PDF/A file. \n) print
+ Usage
} ifelse
}
{
- % No XML invoice definition on the command line; chide the user and give them an example
- %
- (\nERROR - ZUGFeRDXMLFile has not been supplied, you must supply an XML invoice file\n) print
- ( Producing a PDF/A file not a ZUGFeRD file.\n) print
- (example usage - gs --permit-file-read=/usr/home/me/zugferd/ -sDEVICE=pdfwrite -dPDFA=3\\\n) print
- ( -sColorConversionStrategy=RGB -sZUGFeRDXMLFile=/usr/home/me/zugferd/invoice.xml\\\n) print
- ( -sZUGFeRDProfile=/usr/home/me/rgb.icc -o /usr/home/me/zugferd/zugferd.pdf\\\n) print
- ( /usr/home/me/zugferd/zugferd.ps /usr/home/me/zugferd/original.pdf\n\n) print flush
+ % No XML invoice definition on the command line;
+ % chide the user and give them an example
+ (\nERROR - ZUGFeRDXMLFile has not been supplied, you must supply a XML invoice file) print
+ (\n Producing a PDF/A file, NOT a ZUGFeRD file. \n) print
+ Usage
} ifelse
-% That's all the ZUGFeRD and PDF/A-3 setup completed, all that remains now is to run the input file
+% That's all the ZUGFeRD and PDF/A-3 setup completed,
+% all that remains now is to run the input file
+
+%%EOF \ No newline at end of file