summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Correct OCR docs for multiple languages.ghostpdl-9.53.x-ocr-fixesRobin Watts2020-10-201-1/+1
|
* Update tesseract traineddata loader with new path search.Robin Watts2020-10-148-21/+113
| | | | | | | | | | | | | | First, we look in TESSDATA_PREFIX (if defined). If not found there, we look in ROMFS (in tessdata). If not found there, we look at the configured "tessdata" path (which defaults to ${datadir}/tessdata). (${datadir} defaults to ${prefix}/share on unix, and ${gsrootdir} on windows.) If not found there, we look in the current directory. Update doc/Devices.html (and fix some indexing).
* Update makefile for tesseract changes.Robin Watts2020-10-141-5/+0
|
* Add/remove paths to permit-file-read automatically for tesseract.Robin Watts2020-10-071-3/+21
|
* Fix Tesseract build glitches.Robin Watts2020-10-072-1/+2
|
* Docs/dates/version for 9.53.3ghostpdl-9.53.3gs9.53.xChris Liddell2020-10-0148-74/+249
|
* WhatIsGS.htm updates from Lisa FChris Liddell2020-09-301-64/+54
|
* Bug 702948: Ensure initial bitmap cache sizes are properly alignedChris Liddell2020-09-303-4/+10
| | | | | | | | | | | | | | | | | | | | | | Now that the allocations from the bitmap cache are aligned to the platform's required alignment, see commit: 260c443bc14cdffa4d94e14c3a57e35bebee3a5b We also want the initial size of the memory pool used by the cache to be "aligned". This is so that code that attempts to identify cache entries to evict by requesting a size equal to the entire size of cache memory pool doesn't get an unexpected failure, because we've rounded up that allocation request to a value larger than the entire size of the memory pool. Because we don't expect an error to be possible at that point, a crash can occur. Of the "normal" platforms we use, this only exhibits on Win32 because that is the only platform where the align_bitmap_mod we use is less than the obj_align_mod used for the memory managers.
* Fix icc profile reference counting in transparency compositorChris Liddell2020-09-301-0/+6
| | | | | | | | | | | | | | Found during Windows testing for a release. The full test file for https://bugs.ghostscript.com/show_bug.cgi?id=693365 would cause Ghostscript to crash due to an ICC profile being freed whilst a reference was still being held for it. That was not counting up a reference count when restoring the device profile back to a previous value. Fixing that introduced a leak for other profiles. And that turned out to be not decrementing the reference count when replacing a device profile.
* Work around for (I think) a VS2019 optimiser bugChris Liddell2020-09-281-4/+14
| | | | | | | | | | | | | | VS2019 release builds crash with the input file from bug 702916 and several other files, in copied_glyph_slot() because the pointer retrieved and stored in *pslot is non-sensical. Debug/Profile builds and optimised builds with earler VS versions don't show the problem. Adding debug code to assign the calculated index to an interim unsigned integer variable also cause the problem to go away. So, use that as a workaround.
* Fix some casting confusion for special glyph CID/index valuesChris Liddell2020-09-281-2/+2
| | | | | | And a whitespace/indentation issue. Noticed in passing....
* Fix Bug 702941 - Mispelled PDF interpreter variable name.Ray Johnston2020-09-281-1/+1
| | | | | s/RepiredAnError/RepairedAnError/ A simple typo that was missed because we did not have a test file with a format error to trigger this code.
* Version, doc and date updates for 9.53.2ghostpdl-9.53.2gs9.53.0Chris Liddell2020-09-2544-75/+332
|
* Bug 702938: Allocating cached glyphs, account for alignmentChris Liddell2020-09-252-3/+6
| | | | | | | | | | | | | | | | | For efficiency, the glyph cache allocates "large" blocks of memory into which it parcels out offsets for individual glyph cache bitmaps, as required. Since cached glyphs are usually fairly small, and potentially can be short lived, this saves the overheads of "full" memory for every cached glyph. Unfortunately, in calculating the offsets for the cached glyph, it was failing to account for the required alignment of the system. In any environment that strictly enforces aligned memory accesses, this will potentially cause a bus error. In this case, it was switching the gs_glyph type to a 64 bit type that triggered the issue. But any changed to the contents of the cached_char struct could have resulted in it happening.
* Remove links to ghostscript.com/release_history.htmlChris Liddell2020-09-2431-31/+0
| | | | That page is now gone.
* Remove dead end links from Readme.htmChris Liddell2020-09-241-2/+0
|
* Bug 702920: Fix type confusion in new param type code.Chris Liddell2020-09-241-8/+8
| | | | | In a few cases we were using the wrong element in the union to read the value back from the param list (and to range check the values).
* Fix problem with BGPrint and multi-threaded rendering caused by commit cca27988Ray Johnston2020-09-231-7/+6
| | | | | | | | | The unconditional call to enable multi-threaded rendering during set up of the gx_device_printer as a clist caused the SEGV of bug 702181, but enabling multi-threaded rendering here isn't correct since it is usually done when we output the page (gdev_prn_output_page_aux). The problem is that BGPrint would setup a new clist device to render the page, but needs to enable multi-threaded rendering for the background clist device. Do this if NumRenderThreads > 0.
* Fix gp_file allocations to use thread_safe_memory.Ray Johnston2020-09-231-4/+4
| | | | | | | | | The gpmisc.c does allocations for gp_file objects and buffers used by gp_fprintf, as well as gp_validate_path_len. The helgrind run with -dBGPrint -dNumRenderingThreads=4 and PCL input showed up the gp_fprintf problem since the clist rendering would call gp_fprintf using the same allocator (PCL's chunk allocator which is non_gc_memory). The chunk allocator is intentionally not thread safe (for performance).
* Temporarily disable BGPrint for pcl, xps and gpdl.Ray Johnston2020-09-231-0/+14
| | | | | | In order to safely allow for a 9.53.2 patch release that fixes BGPrint with NumRenderingThreads while the issues with PCL and friends are fixed, just ignore BGPrint in pcl/pl/plmain.c
* Bug 702904: Another fix to check for shared libjpeg/libtiffChris Liddell2020-09-161-1/+1
| | | | | | | | | | We cannot combine shared and not shared libjpeg and libtiff - they either both need to be "local" or both shared, and configure checks that and fails when the two are incompatible. However, that check would fail when either libjpeg or libtiff were not being included at all. Since it is libtiff that is the "problem" for this compatibility, now check if TIFF is included, and if not, skip the check.
* Fix the OpenBSD buildChrisL2020-09-163-5/+16
| | | | Whilst hopefully not breaking the buildroot build.
* Bug 702901: initialize directory for tiff configureChris Liddell2020-09-161-1/+1
| | | | | | | | Previously the directory in which to run the libtiff configure script was initialised to an empty string, but that, in some toolchains, resulted in an error due to "unsafe header/library path used in cross-compilation". So initialise it something benign instead.
* Coverity ID 361427 fix uninitialised variable.Ken Sharp2020-09-161-1/+1
|
* Update docs for 9.53.1 releaseghostpdl-9.53.1Chris Liddell2020-09-1444-66/+106
|
* Fix crashes with pdfwrite, TrueType input fonts and Windows 64-bit buildKen Sharp2020-09-141-5/+0
| | | | | | | | | | With the change to 64-bits unconditionally for gs_glyph we can now define GS_MIN_CID_GLYPH in 64-bit terms. Previously we were using the architecture size of a long_long to determine which define to use, and we do not define long_long on Windows leading to us using an essentially 32-bit definition. This caused indexing off the end of an array in copied_glyph_slot()
* Bug 702897: Fix shared libtiff/libjpeg checkChris Liddell2020-09-141-2/+5
| | | | | | | | | | For various reasons we cannot combine shared and not shared libjpeg and libtiff - they either both need to be "local" or both shared. But the check for that compatibility was triggered during the recursive configure call when setting up for cross compiling. Skip the check for that recursive configure call.
* Tweak History9.htm with jbig2dec updatesghostpdl-9.53.0Chris Liddell2020-09-102-1/+30
|
* Bug 702884: Require jbig2dec 0.19 when building ghostscript.Sebastian Rasmussen2020-09-101-1/+1
| | | | | In practice this has been required since commit 9b5008aa2bc1c6a6acb2c6f90d1ef8d6bad9e66a.
* Update jbig2dec stuff for 0.19 release.Sebastian Rasmussen2020-09-103-2/+21
|
* Docs and dates for 9.53.0Chris Liddell2020-09-1044-47/+86
|
* Bug 702871: Fix GraphicsAlphaBits + Fill/Stroke issue.Robin Watts2020-09-091-5/+3
| | | | | | | | | | | | When we flush the alphabuffer, mapped_start and mapped_height are both set to zero. When we refill it, mapped_height is set to non-zero. USUALLY mapped_start is set to non-zero too, but it can be set to zero when we are close to the bottom of the page. Hence we should test for mapped_height != 0, rather than both mapped_height and mapped_start being non-zero. So the 'quick hack' that Chris used is actually correct.
* Bug 702837 typo in warning messageKen Sharp2020-08-281-2/+2
| | | | | | | Thanks to Herbert Voss for spotting this. Fixed the typo and updated the version number in the warning from 9.53 to 9.53.0 to match the actual version and patch number of the release (the decision to add the patch level was taken after the original commit)
* Update dates'n'docs for 9.53.0.RC2ghostpdl-9.53.0rc2Chris Liddell2020-08-2744-45/+173
|
* Fix Tesseract traineddata file loading.Robin Watts2020-08-271-21/+21
| | | | | If it was finding any Tesseract data in ROM it was then not looking for files.
* Coverity 361429: move "break" to correct place.Chris Liddell2020-08-271-1/+1
| | | | | | We had to add the outputfile to the "control" file permission list (as well as write), but for the "pipe" case, I accidentally added the call after the break out of loop that checks for a pipe.
* PDF interp: Consolidate disabling of page handler deviceChris Liddell2020-08-271-7/+18
|
* More version number fixesKen Sharp2020-08-273-8/+16
| | | | | | | | | | | | | | | | | The code to retrieve the Ghostscript paths from the Windows Registry was generating a key based on the version number, but since we added the patch the generation was incorrect. Since this is the third (!) case of this, scan the code for any usage of gs_version, gs_version_number, GS_VERSION, GS_VERSION_NUMBER, gs_revision, gs_revision_number, GS_REVISION and GS_REVISION_NUMBER. This reveals two more places, neither serious but we might as well fix them while we're here. Thanks to Akira Kakuto for finding this problem and suggesting a patch. I chose to use the code we were already using in two other places, just for consistency, but the supplied patch was equally good.
* Fox typos and stuff in the release highlightsChris Liddell2020-08-272-16/+22
|
* Delete binary files from lcms2mt treeChris Liddell2020-08-274-0/+0
| | | | There were left over binary libraries, remove them.
* Fix pdfwrite "%d" mode with file permissionsChris Liddell2020-08-272-7/+15
| | | | | | | | | | | | | | | Firstly, in gx_device_delete_output_file the iodev pointer was being passed to the delete_method incorrectly (passing a pointer to that pointer). Thus when we attempted to use that to confirm permission to delete the file, it crashed. Credit to Ken for finding that. Secondly, due to the way pdfwrite works, when running with an output file per page, it creates the current output file immediately it has completed writing the previous one. Thus, it has to delete that partial file on exit. Previously, the output file was not added to the "control" permission list, so an attempt to delete it would result in an error. So add the output file to the "control" as well as "write" list.
* Update docs, version, dates, product familyghostpdl-9.53.0rc1Chris Liddell2020-08-2044-77/+13341
| | | | for 9.53.0 RC1
* Fix PDF /Producer for new patch levelKen Sharp2020-08-202-4/+14
| | | | | | | | | | | | | | | Bug #702772 "Strange /Producer attribute" The change to include a patch level for Ghostscript in the gs_revision value wasn't being reflected in the code to generate the version number used in the PDF /Producer string. Copied the code from printf_program_ident() in base/gsmisc.c to the code in pdf_store_default_Producer() and commented both pieces of code to note the existence of each other so that in future hopefully we won't forget to keep them in sync. Thanks to Peter Cherepanov for spotting the flaw.
* Fix Bug 702381: Hang due to cyclic PDF resources.Ray Johnston2020-08-192-4/+6
| | | | | | | | | | | | | | The loop is caused by a circular /ParentResources attribute. This branch of code is triggered by an error in the sample file: misplaced /Form resources in a Type 3 font. This font has /Resource dictionaries added to /CharProcs entries rather than the font dictionary. Note that this patch fixes the hang issue, but does not correct the issue of not being able to find the correct resource (in the CharProc) so that the file still output does not match Adobe (mupdf has that same issue). Thanks to Peter Cherepanov for this patch.
* Bug 702744: Add windows utf-8 handling for unlink and rename.Robin Watts2020-08-1919-78/+364
| | | | | | | | | | | | | | | | | | | | | To do this, we introduce gp_unlink and gp_rename, and call those as appropriate. Also, make gp_open_scratch_file add the file to the permit list. When such a file is closed, it will be deleted from the permit list. It will also be removed from the permit list if the file is deleted using the PS deletefile operator. On closedown, if scratch files haven't been deleted, then we'll delete them as part of the closedown of gs_lib_ctx. This means that 'purging' the control lists must not remove scratch file paths from the list. Also, ensure that gsapi callers can't maliciously (or accidentally) remove scratch path paths from the list so as to leave them around after closedown.
* Add patch version to version numberChris Liddell2020-08-184-15/+22
| | | | This makes it easier to issue patch releases for security problems.
* Bug 702360: Allow @loader_path on darwin so buildChris Liddell2020-08-171-4/+4
| | | | | | | | | | | | | | As this is change in behaviour, it's optional. The configure script now uses (if set) a environment variable called "DARWIN_LDFLAGS_SO_PREFIX" - included "DARWIN" because it only applies to DARWIN derived systems. This allows the caller to use: ./configure DARWIN_LDFLAGS_SO_PREFIX="@loader_path/" Thus meaning the build will use loader_path rather than "@executable_path". Configuring/building without that environment variable will retain the current behaviour.
* Enhance First/LastPage processingKen Sharp2020-08-152-5/+93
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously the FirstPage and LastPage processing device did not allow any means to reset the PageCount. This was because Ghostscript's command line processing does not permit changing non-PostScript controls (interpreter and some device parameters) after the first file has been run. GPDL however, has a new mechanism 'set_param' which can be used programmatically, and that does permit for device and interpreter parameters to be altered after the initial file has been processed. To allow for this the gdevflp device now processes parameters itself instead of relying on the underlying device to do so. The parameters FirstPage, LastPage, PageList and DisablePageHandler now all reset the page count to 0 when they are encountered. This means that, using gpdl, it is possible to select a set of pages from one file, then select a different set of pages from a second file. Sending any of these parameters (except, obviously DisablePageHandler) also now automatically enables the device again ie it sets DisablePageHandler to false. It is not, unfortunately, possible to load the gdevflp device at any time except when the underlying device is initially opened. This means that if any file is to be processed using gdevflp the first file must use one of the parameters, in order to load gdevflp. The simplest solution is simply to set -dFirstPage=1 which will load the device and run all the pages from the file. This commit also includes a minor change to the PDF interpreter. Because the PDF interpreter (currently) handles subsets of pages itself, it does not want the first/last page device to be active, so it disables the device by sending a 'DisablePageHandler' to it. However (because of the GS command line, as described in the first paragraph) it did not bother to re-enable the device. So here we add a line to re-enable the device after processing is complete. This is probably superfluous now that sending the params will re-enable the gdevflp device anyway, but it should make the intention plain.
* Bug 702725 Maintain spot colors when overprint mismatch in process CSMichael Vrhel2020-08-144-4/+47
| | | | | | If the process color space does not match the source color space (for example drawing an RGB image to a CMYK device) and overprint is true, then we should still retain the spot colorants assuming the device supports them.
* demos/python/gsapi.py: match new handling of bool by gsapi_set_param().Julian Smith2020-08-141-3/+16
|