| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
| |
Promote previously windows specific functions to be
generically available (and give them names that
reflect that).
|
|
|
|
|
|
|
| |
Spots ascii/utf8/utf16 and feeds to PCL interpreter.
May need further tweaking with both text file spotting and
font selection, but it's a decent start.
|
|
|
|
|
| |
No actual SmartOffice code here, just the framework for adding
the (private) "SO" interpreter.
|
|
|
|
|
|
|
|
| |
Extract has two new source files, src/boxer.c and src/rect.c, plus extra rect
args in extract_page_begin() and extract_add_char().
For now we pass dummy (0, 0, 0, 0) rect args as they are only used for page
layout analysis, which we don't ask extract to do.
|
|
|
|
|
| |
Technically, probably not actually required, as no one ever uses
total_in, but this doesn't hurt.
|
| |
|
|
|
|
|
| |
This avoids having 2 tables of errors (enum and error strings) defined
in 2 separate files that need to be kept in sync. Same for warnings.
|
| |
|
|
|
|
|
| |
Fix mistaken inclusion of multi_test.vcxproj, and incorrect target
name of gpdf binarys.
|
|
|
|
|
|
|
|
|
|
|
| |
The clist attempts to send both screen phase (derived from color)
and tile phase (for strip_copy_rop) etc using the same command.
Unfortunately, there are instances (for example, when using PCL
transparency) where we need to send both screen and tile phase
through, but with different values.
For correctness (and just as importantly, simplicity and sanity),
move to sending tile and screen phases through separately.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Some devices within Ghostscript (currently the x11 devices,
uniprint and opvp/oprp) use non const static variables, so cannot
be run in multiple instances at a time.
We now maintain a core "count" of how many non-threadsafe devices are
being used at any time. This value can be atomically adjusted by calls
to gs_lib_ctx_nts_adjust.
Non threadsafe devices now call gx_init_non_threadsafe_device either
as or as part of their initialise_device proc. This function attempts
to increment the non-threadsafe count and fails to init if there is
already a non-threadsafe device running.
On success, the device finalize method is modified so that it will
decrement the count at the end.
The known non-threadsafe devices are updated to call this.
In order to have somewhere safe to store this count, we introduce
a gs_globals structure, shared between instances. Setting this up
without race conditions requires some new gp_ functions that can
make use of platform specific threading primitives. We have these
implemented for both windows and pthread based platforms. On other
platforms, we drop back to the old unsafe mechanism for counting
instances.
While we do this work, we take the opportunity to push the
gs_memory_t pointer used for non-threadsafe debug printing into thread
local storage.
This enables us to remove the remaining GS_THREADSAFE guarded
compilation from the source code. What is left is broadly down to
allowing debugging collection for statistics, and these are now
controlled by specific COLLECT_STATS_XXX defines. It is assumed
that anyone wanting to collect such stats is smart enough to not
try to do so while using Ghostscript in a multi-instance environment.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously, the only C code that required access to the Adobe Glyph List was
in the vector devices, so we kept the AGL definition with those. Otherwise
it was always in Postscript.
The PDF interpreter in C also requires the AGL, so move the AGL into base, and
give it its own ".dev".
Still to do: Remove the Postscript definition, and create the Postscript
definition(s) in PS VM from the C definition.
|
|
|
|
|
|
|
|
|
|
|
| |
This is a commit of the pdfi branch to master, eliminating
the traditional merge step.
The full history of the pdfi branch can be seen in the repo,
and that branch is effectively frozen from this point onwards.
This commit actually differs from pdfi in a small number of
whitespace changes (trailing spaces etc).
|
| |
|
| |
|
|
|
|
|
| |
Makes no difference other than us being able to search for things
within the project.
|
|
|
|
| |
Match Unix as best we can.
|
| |
|
|
|
|
|
|
|
|
|
| |
devices/vector/gdevdocxw.c:
Pass extract_format_DOCX to extract_begin().
devices/extract.mak:
windows/ghostscript.vcxproj:
Added new extract source files.
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
Firstly, the recursive call to nmake was using the wrong target name (an
internal use target), so fix that to use the "real" target.
Secondly, give the "real" target a better name, more in keeping with other
equivalents.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
This adds a new docxwrite device which generates docx files.
Unlike the txtwrite device, we don't output xml for later use by
extract-exe or store information about spans in arrays. Instead we call
extract functions such as extract_add_char() directly.
Code changes:
Have moved txtwrite and docxwrite common code into new devices/vector/doc_common.{c,h}.
Shared types and functions are currently:
txt_glyph_width_t
txt_glyph_widths_t
txt_glyph_widths()
txt_get_unicode()
txt_char_widths_to_uts()
txt_calculate_text_size()
Building:
By default we do not build with Extract and there will be no docxwrite
device in the final executables.
To build with Extract, specify the location of the extract checkout to
build and link with.
Unix:
./autogen.sh --with-extract-dir=<extract-dir>
Windows:
Set environmental variable EXTRACT_DIR=<extract-dir> when building,
e.g.:
EXTRACT_DIR=<extract-dir> devenv.com windows/GhostPDL.sln /Build Debug /Project ghostscript
On both Unix and Windows we exit with an error message if the specified
location does not exist.
|
|
|
|
| |
(stemmed from Bug 703415)
|
|
|
|
|
| |
While we have 64bit configurations, these will only work for 32
bit builds at the moment, due to MSVC not supporting 64bit builds.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Map all text to black. This is achieved by altering the
color space to DeviceGray with a fill of black during
gs_text_begin. When gs_text_release occurs, the color space
is restored. This will only occur with the option -dBlackText
and if the text is actually to be drawn.
When going to a raster device, the stroke and stroke fill of
the text is handled with a stroke or stroke fill command.
My original plan of storing the old color spaces and client
color in the text enumerator will not work in this
situation as it the enumerator will have already been
destroyed when the stroke or stroke/fill command occurs.
For this reason I store the old color space information
for the current and alternate color spaces
in the graphic state. The structure holding the information
is garbage collected as it is holding objects that may be
garbage collected. We also need to know if the target
was a high level device like pdfwrite, as that device
will handle the fill AND stroke, and we will need to restore
the color space when we tear down the text enumerator.
gs_text_release needed to have the pgs added as a parameter
to allow the possible release of the blacktext structure
when the text is released from the other languages. This
did not seem to be too big of an issue as gs_text_begin
passes the pgs also. If the pgs is not available, NULL can
be passed, and that is done in several locations.
A new special op was added to let us avoid doing the black
text setting if we are constructing a soft mask. If we did not
do this the mask could result in the loss of the text.
Finally, Type 3 fonts will NOT be affected by this process.
Type 3 fonts are often used for actual graphic logos etc.
Ken Sharp suggested we not have them affected by this setting.
There were also issues with trying to do type 3 fonts in
in that the PDF interpreter does some color space settings
of its state when dealing with type 3 fonts and this put the
interpreter's state out of sync with the graphic library state.
This was tested with a forced setting of black text enabled.
No seg faults or errors occurred. There were obviously a lot
of differences reported (over 33,000). All the images that were available
to me with bmpcmp were gone through. Problems were found
and addressed (the soft mask issue for example was found,
as were issues with color spaces not getting properly restored).
|
|
|
|
|
|
|
|
| |
Also remove pl_begin_image2/pl_image_data2/pl_end_image2 etc
functions - might as well just call direct. This leaves pldraw.c and
pldraw.h empty, so remove them.
Also, take the opportunity to fix some potential cleanup problems.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Actually, steal the existing functions from the PJL code,
move them into the graphics library, and refactor slightly.
2 functions; the first one, gs_param_list_add_tokens reads
a string of key/value pairs and adds them to the list.
The second one, gs_param_list_add_parsed_value takes a key
and a string for the value, and just adds that pair to the
list.
|
|
|
|
|
| |
It should never have been added in git. I added it locally and
then it slipped through and got committed by accidently.
|
| |
|
|
|
|
|
|
| |
pdfocr8/24/32, ocr and hocr devices.
Use OCRLanguage to set languages to use ("eng" by default).
|
|
|
|
|
| |
The alpha value in the graphic state is not used and will
only lead to confusion for people working on transparency.
|
|
|
|
|
|
|
|
|
| |
This was the compositing device used for Display Postscript/NeXT specific
alpha blending. Since we haven't supported DPS properly for many years, and
officially dropped it completely a couple of years ago, and this compositing
device has not been included in the build for several years....
....just delete the files and remove references to them.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Our belief is that this should work in all versions of VS from
2010 onwards.
By moving to VS2019, we lose support totally for Windows XP prior
to SP3. If this is a problem, either build using the Makefile, or
pull the old VS2005 solution out of git and use that. If customers
find this to be a problem, we can maintain the old VS2005 solution
alongside the new one with minimal effort.
Default builds lose support for Windows XP SP3/Windows Server 2003,
but the new "ReleaseXP", "DebugXP" and "MementoXP" configurations
will target these platforms (assuming the v141 tools have been
installed too).
These "XP" binaries will be build into {,debug,mem}objxp directories
and will produce binaries with an 'XP' suffix: i.e.
{,debug,mem}bin/{gs,gpcl6,gxps,gpdl}win{32,32}{,c}xp.exe.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
Rather than having each different "language" have a 'top' file
in gpdl/foo/footop.c, move them to be gpdl/foo.c. Extra directories
seem overkill at this point, and it simplifies the Makefile
slightly.
Also, rename IMG to JPG.
|
| |
|
|
|
|
| |
JPEGs only at this point.
|
|
|
|
|
|
|
|
|
|
|
|
| |
This includes build rubrik for devices to generate URF files
(urfgray, urfrgb, urfcmyk), a decompression filter for the
rle variant used in URF files and a urf "language" interpreter
implementation for gpdl.
Note, this is only the build framework for these things. The
actual implementation code lives in the private 'urf'
git module, and will be activated automatically as part of
the build if it is in position at configure time.
|
|
|
|
|
| |
This is done by moving the tables into a separate compilation module and
declaring the tables extern in the header file that is used elsewhere.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(squash of commits from filesec branch)
Most of this commit is donkeywork conversions of calls from
FILE * -> gp_file *, fwrite -> gp_fwrite etc. Pretty much every
device is touched, along with the clist and parsing code.
The more interesting changes are within gp.h (where the actual
new API is defined), gpmisc.c (where the basic implementations
live), and the platform specific levels (gp_mswin.c, gp_unifs.c
etc where the platform specific implementations have been
tweaked/renamed).
File opening path validation
All file opening routines now call a central routine for
path validation.
This then consults new entries in gs_lib_ctx to see if validation
is enabled or not. If so, it validates the paths by seeing if
they match.
Simple C level functions for adding/removing/clearing paths, exposed
through the gsapi level.
Add 2 postscript operators for path control.
<name> <string> .addcontrolpath -
Add the given <string> (path) to the list of paths for
controlset <name>, where <name> can be:
/PermitFileReading
/PermitFileWriting
/PermitFileControl
(Anything else -> rangecheck)
- .activatepathcontrol -
Enable path control. At this point PS cannot make any
more changes, and all file access is checked.
|
|
|
|
|
|
|
|
| |
To preserve building as a standalone test exe, we avoided using Ghostscript
includes in the md5 source and header files, but dynamically add them to
copies of the files during the build. Since we no longer need/care for the
stand alone exe, remove the build complication, and just include the header
file normally.
|