| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
" “Error: /invalidfileaccess in --file--” when converting PBM file to PDF"
There is no actual bug here, the user had not supplied either -dNOSAFER
or --permit-file-read on the command line to allow the interpreter to
read the input file.
However the viewpbm.ps program doesn't have that information in its
'usage' which would be useful information. So added that here, and
updated a number of other view*.ps programs which have usage information
to include this as well.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A customer requested that we make pdf_info.ps work with the new
PDF interpreter, and generate the same information.
This commit modifies the way we extract information on a
page-by-page basis to potentially include the names of spot inks
and information about fonts used on the page.
This is now returned to the PostScript environment using a PDF
dictionary instead of a C structure. The pdf_info.ps program has
been updated so that it use the new information in broadly the
same way as the information from the old PDF interpreter.
There are differences; pdf_info.ps extracts font information
itself, rather than having the interpreter do it. This is not
possible with the new interpreter which is why we have the
PDF interpreter do it for us. In addition the pdf_info.ps
program only descended to the page level whereas the new PDF
interpreter evaluates all objects on the page, potentially
meaning that more fonts (and technically spot inks) might be
detected.
We now have an additional PostScript operator '.PDFPageInfoExt'
which returns 'extended' information about a page. This is the
same as .PDFPageInfo but includes the font and spot ink
information.
Running with -dPDFINFO using either Ghostscript or GhostPDF will
print more information than before, including the spot inks and
considerably more information about fonts than the pdf_info.ps
program emits, including embedding status, descendant fonts
(and their membedding status) and the presence of ToUnicode
CMaps.
Updated documentation for all of the above.
|
|
|
|
|
|
| |
File Specification dictionaries should have a Type of Filespec, not
FileSpec as was previously used. There is no consistency in the PDF
specification in this regard unfortunately.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Commit 8d8e90560bf6bbf0415b28445e7d49c005454f77 added a new option
'encoding' which is intended to specify the font encoding to be used
instead of always using ISOLatin1.
However, the commit broke the output PostScript produced by use of the
-p option, and didn't re-encode the default fonts when -p was used,
which meant the re-encoding didn't work with the default fonts, only if
a specific font was used (-f command line option).
This fixes both problems, it's not as neat as the original code, but
the previous commit means that ship has already sailed.
|
|
|
|
|
|
| |
If a system had only 64-bit Ghostscript installed, and the user had not
set the %GSC% environment variables, then the various helper batch files
wouldn't be able to find command line Ghostscript.
|
| |
|
| |
|
|
|
|
|
| |
The example shown in a comment to set the PageSize from the GIF image
size also needs the resolution set to 72 (HWResolution).
|
|
|
|
| |
Thanks to Alex for this patch.
|
|
|
|
|
|
|
|
|
| |
Bug #703862 "Feature request: adapt lib/zugferd.ps to newer versions of the ZUGFeRD standard"
In the bug Adrian Devries has considerably expaneded on the
original zugferd.ps program, fixing a bug or two and adding the
ability to choose between production of several different versions
of the ZUGFeRD (aka Factur-X) standard.
|
|
|
|
| |
The "Truncate" flag handling did not work with a line with no EOL.
|
|
|
|
|
|
|
|
|
|
|
| |
The PDFA_def.ps example program needs to read the ICC profile from
disk, in order to embed it in the output PDF file. Since the change to
security this means the ICC profile must be specified on the command
line with an explicit --permit-file-read.
This commit puts the file operation in a stopped context and if it fails
puts up some text explaining the possible reasons, including the use of
--permit-file-read.
|
|
|
|
|
|
|
|
| |
The --encoding option takes effect when the -f or -F options are processed,
therefore by having two different --encoding options before to -f or -F,
different encodings can be used for the header and body fonts.
ISOLatin1Encoding remains the default.
|
|
|
|
| |
Reported by customer 193
|
| |
|
| |
|
|
|
|
| |
Just dump the XML metadata rather than trying to suppress blank lines.
|
|
|
|
| |
Thanks to Peter Cherepanov for this patch.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
and move it to "lib" since we don't actually use it in Postscript any more.
It's only used if we ever need to regenerate the C representation of "known
encodings".
Also, update to include missing strings.
Finally, fix the tool that relies on this "encoding" - .namestring is no
longer exposed as a Postscript operator, so define a local equivalent. And
update the example invocation in the comments
|
|
|
|
|
|
|
|
|
| |
In the change mentioned in the bug, rather than rely on the LIBPATH
search method, the ps2epsi script assumed that pd2epsi.ps would be
in the same directory as the 'gs' executable, which is not correct.
Change to use bare 'ps2epsi.ps' so that it will be found on the
LIBPATH as instialled by: make install
|
|
|
|
| |
As (mostly) spotted by Lisa Fenn, fix comments in typos and messages.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
While documenting the process for creating a ZUGFeRD invoice from a PDF
file and an XML invoice it became clear to me that it was beyond any
reasonable expectation of a user to be able to use it unaided. So this
program assists in the creation of a ZUGFeRD document.
The program requires two command line parameters; -sZUGFeRDProfile=
which contains a fully qualified path to an appropriate (correct colour
space) ICC profile, and -sZUGFeRDXMLFile= which contains a fully
qualified path to the XML invoice file.
Example command line is in the comments, and a usage message if the user
fails to provide either of the required elements. Obviously the user
must also set -dPDFA=3 and -sColorConversionStrategy in order to create
a valid PDF/A-3b file.
|
|
|
|
| |
Thanks to Peter Cherepanov for this change.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The ps2epsi and ps2epsi.ps were quite a mess, and relied on non-standard
operators only available with -dNOSAFER since we made SAFER the default.
Even running ps2epsi with -dNOSAFER (by export GS_OPTIONS=-dNOSAFER)
had problems -- it could not even convert examples/colorcir.ps to EPSI
(throwing an error about colorcirsave). Both of the aforementioned
files are replaced with this commit, and the ps2epsi.bat and ps2epsi.cmd
are updated to use the new ps2epsi.ps file
Also, input files with multiple pages were never correct since the preview
was derived only from the first page. The ps2epsi.ps checks if the file is
already an EPSF, then don't use eps2write on the input, but warn if the
%%Pages comment indicates that there is more than a single page.
Note that -dNOOUTERSAVE is needed in the invocation so that if we use
eps2write, the 'restore' will close the device and write the tempfile
with the EPSF.
Then ps2epsi.ps reads the input file, capturing the BBox, stops after
%%EndComments, removes any existing preview, constructs a new preview
using the 'bit' device with appropriate parameters, writes the preview
in the EPSI Preview format (using writehexstring) and then copies the
remainder of the EPSF file to the output.
The ps2epsi.ps has some checking for valid invocation, since someone
may try to use it without the scripts.
Since all of the actual conversion is done by the ps2epsi.ps, this change
makes windows and linux produce equivalent files.
|
| |
|
| |
|
|
|
|
|
|
| |
And add it to the list of files to install on Unix systems.
Also, tweak the comments in pdf_info.ps to reflect its new home.
|
|
|
|
|
|
| |
Bug #701771 "dvipdf script broken"
Apparently the script requires a trailing '-'
|
|
|
|
| |
The fontmap for the type 1 136 set is now in the repo with the font files
|
|
|
|
|
|
|
|
|
| |
The .setpdfwrite operator nowadays does nothing more than increase the
VM threshold, which is relatively pointless so we're going to remove it.
In this commit; add a warning message to the .setpdfwrite operator so
that anyone using it will be warned. Remove usage from the various
shell scripts we provide.
|
|
|
|
|
|
|
|
| |
Bug #700942
For some reason Git did a merge with this file when I made the change,
and it messed it up. Since we don't test these files, it didn't get
noticed.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
From Bug #700930 "Typo in example command for PDF/X-3 in VectorDevices.htm"
The reporter claimed that the (mis-spelled) command didn't work, which
was not surprising, since it contained a typo. After fixing the
documentation the reporter claimed that the command didn't work. This
is true and was missed because of the misleading title.
The PDFX_def.ps file was mistakenly pulling the ProcessColorModel from
systemdict, which would only be set if this was set on the command line.
The real problem is the fact that our setpagedevice/currentpagedevice
code doesn't truly reflect the device setup, so changes to the
ProcessColorModel caused by setting ColorConversionStrategy are not
reflected in the values returned by currentpagedevice.
This commit updates PDFX_def.ps to chaeck the ColorConversionStrategy
instead, which is more reliable, and then use the ProcessColorModel
from the currentpagedevice as a fallback if ColorConversionStrategy
is not set. (actually this should not be possible)
Update PDFA_def.ps similarly; although it was using the currentpagedvice
this is not a reliable method.
Finally; reformat the files, add some extra comments describing what the
code is doing, make it clearer that these files *should* be customised
and add additional some basic instruction on customising them.
|
|
|
|
| |
Bug #700930 "Ghostscript - Typo in example command for PDF/X-3 in VectorDevices.htm"
|
|
|
|
|
| |
We eliminated GS_PDF_ProcSet and pdfdict, but runpdfbegin, dopdfpages,
and runpdfend are still available.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Recent changes required to harden SAFER mode mean that it is no longer
possible to run this script in SAFER mode, because it relies upon
unsafe Ghostscript non-standard extension operators.
Removing SAFER and DELAYSAFER, and the code to reset SAFER, allow the
program to run as well as it ever did (ie badly). This program should
now be considered unsafe, you should not use it on untrusted PostScript
programs.
I think its likely we will deprecate and remove this program in future.
|
|
|
|
|
|
|
|
|
| |
The existing scripts assume that the gs binaries are on the path.
The tweaked scripts check to see if there is a binary in the same
directory as the .bat file, and if there is, use that in preference
to any version on the path.
Otherwise functionality is identical.
|
|
|
|
|
| |
also add a *.cat rule to .gitattributes to ensure .cat files are always treated
as binary
|
|
|
|
|
|
|
|
|
| |
Also update copyright dates.
Remove gs_cmdl.ps as we no longer use it, and remove its entry from
psfiles.htm.
Remove xfonts.htm as this feature (xfont support) is long, long gone.
|
|
|
|
| |
And lib/viewpwg.ps to use it.
|
|
|
|
|
|
|
| |
The RAW_DUMP with RAW_DUMP_AS_PAM emits RGB_ALPHA and GRAYSCALE but these
were not supported. Display RGB_ALPHA as CMYK for now.
Also if SCALE was specified, the ifelse for FITPAGE was inverted.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
ps2ascii.ps uses DELAYBIND, which we would like to get rid of, in
addition it doesn't do a terribly good job of actually extracting text.
The txtwrite device is more sophisticated, although it does not have the
added 'COMPLEX' feature of ps2ascii.ps which emits strokes and fills
as rectangles.
If the COMPLEX feature set should prove useful enough it would be easy
to add this functionality to a new device, but in reality I doubt
anyone is using this. The scripts specifically set -dSIMPLE.
This allows us to deprecate DELAYBIND and in future remove it.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Remove unused packfile.ps and gs_pfile.ps file from lib
--------------------------------------------------------
The PostScript claims to 'Pack groups of files together, with
compression, for use in storage-scarce environments.'
It also states that it 'must be kept consistent with gs_pfile.ps' which
says it is 'Runtime support for minimum-space fonts and packed files'
I've never heard of either of these being used, they aren't used in the
ROM file system and it seems unlikely these days that there is a great
deal of call for minimising file sizes.
If these should need to be reinstated, note that they use .setglobal
.currentglobal and .computecodes. At the time of this commit these
operators were being deprecated and hidden though the C support is
retained. If the C code is later removed then these library files
will not work.
Remove font2c.ps
-----------------
If we want to build a font into C and link it, we have the ROM file
system in place to do so. This no longer seems useful.
remove font2c
Remove impath.ps
-----------------
The apparent purpose of this code is to take a bitmap (scan ?) of a
glyph and turn it into a PostScript type 1 font form, presumably in
order to make a font.
This doesn't seem hugely useful, and seems to me at least borderline
illegal depending on jurisdiction.
We also want to remove, or at least disable, the .imagepath operator
which this program (and only this program) relies upon. If we ever
need to re-instate this program, we will also need to reinstate
.imagepath
Remove pdfinflt.ps and pdfwrite.ps
-----------------------------------
pdfwrite is only (as far as I can see) used by pdfinflt.ps which says:
% It is not yet ready for prime time, but it is available for anyone wants
% to fix it.
%
% The main problem is:
%
% 1. Sometimes the PDF files that are written are broken. When they are
% broken, GS gets an xref problem.
%
% This problem is actually due to lib/pdfwrite.ps since even
% when no conversion is done, the file is may be bad.
Since it doesn't work, and we can use MuPDF (which does work) for the
same task, I've chosen to delete both these files.
Remove unprot.ps wrfont.ps
---------------------------
unprot.ps 'disables access checks' according to the comments in order
to print out eexec-encrypted type 1 fonts. Since this could, presumably
be used to read a noaccess dictionary and dump type 1 font outlines it
is of dubious legality. (see the comments in wrfont.ps)
wrfont.ps is used to decode a type 1 font, we have better tools for
decoding fonts so this file seems mostly useless.
By the same reasoning we don't need type1ops.ps or type1enc.ps
Remove addxchar.ps
-------------------
This was used to add extended Latin characters to a font. Our fonts
now contain all the standard glyphs that Adobe fonts do, we don't want
to go back down the route of adding (and maintaining) poor quality
additional glyphs to the fonts.
Remove decrypt.ps
------------------
Yet another way to decrypt a type 1 font. In addition to dubious
legality we have better ways to do this.
Remove pcharstr.ps
-------------------
Again, we have better tools for doing this job and the legality of
this tool is debatable.
Remove markhint.ps
-------------------
We believe we now have better tools for dealing with fonts than this.
Delete level1.ps
-----------------
A fairly pointless file.
Remove smoke.ps from toolbin
-----------------------------
Our current testing method is much more thorough.
Remove bughunt.sh
------------------
A 'user contributed file that has not been kept current', since 1995
apparently. I can't believe this is still useful.
Remove pstogsf.bat
-------------------
I'm fairly certain this is long defunct.
Remove showchar.ps
-------------------
another font-related utility, we've deleted the programs it reliee on,
so....
Remove wftopfa
---------------
Wadalab fonts, given these were uploaded by Werner Lemberg I'm as sure
as possible that we don't need these utilities to work with these
fonts.
Remove markpath.sh
-------------------
seems like a moderately pointless file; since it uses flushpage,
which I want to hide, remove it.
Remove quit.ps
---------------
Seriously ? A file which just contains 'quit' ?
Modify various of our utilities to not use Ghostscript extension ops
---------------------------------------------------------------------
We want to hide various of our extension operators, these files used
.devicename, .rectappend, .currentglobal, .setglobal and .namestring
Replaced .currentglobal/.setglobal with currenglobal/setglobal
Replaced .rectappend with a simple PostScript path
Replaced .devicename with currentdevice /Name get
Replaced .namestring with 1024 string cvs
Remove EndOfTask.ps
--------------------
Just a Ctrl-D
Remove gs_rdlin.ps
-------------------
Linux 'readline' support, just sets prompt to nothing
Remove showpage.ps
-------------------
just contains 'showpage'!
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Bug #697890 "Bug 689832 still unresolved in master"
The fix for this was applied (contrary to the report in 697890) but it
was later removed as part of the fix for bug #688500.
I presume this was accidental, since 688500 predates 689832, but the
fix was applied later. I don' know how this happened and after 8 years
I don't propose to worry about it.
Just reapply the fix for 689832
|