artifex | memory job queue for Golang using worker | Job Scheduling library
kandi X-RAY | artifex Summary
kandi X-RAY | artifex Summary
Simple in-memory job queue for Golang using worker-based dispatching. Cron jobs use the robfig/cron library:
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Start starts the dispatcher .
- NewWorker creates a new Worker
- NewDispatcher creates a new Dispatcher .
artifex Key Features
artifex Examples and Code Snippets
Community Discussions
Trending Discussions on artifex
QUESTION
I have bash script that takes a booklet format PDF and converts it to separate pages. The script is called by php running under nginx.
I am using pdfcrop, which calls pdfTex, which is the point of failure.
The script runs fine as root from the command line. However, when run by nginx (the script is called via php) it fails when pdfcrop calls pdfTex.
Here is the line for the failure point:
...ANSWER
Answered 2021-Feb-07 at 23:02My original theory that pdfTex was not available to the nginx user was correct.
In my script, I logged the result of which pdftex
. This command returned not found. The solution was to create a symlink to the pdftex script. I did this by adding the following to my script.
QUESTION
I've been trying for a few hours now solve this problem and I looked everywhere for a solution and I did not find one. I'm trying to run a spec test for my project and I have the following error coming up:
...ANSWER
Answered 2021-Jan-14 at 14:33I managed to figure out a solution. Looking for the code for the Rghost, what I saw in its spec is that the path expected was different than the path the ghostscript really is. When I run whereis or which on my terminal, it returns:
QUESTION
$ command gs
GPL Ghostscript 8.70 (2009-07-31)
Copyright (C) 2009 Artifex Software, Inc. All rights reserved.
This software comes with NO WARRANTY: see the file PUBLIC for details.
GPL Ghostscript 8.70: Cannot open X display `(null)'.
**** Unable to open the initial device, quitting.
$ which gs
alias gs='git status'
/opt/rh/rh-git29/root/usr/bin/git
...ANSWER
Answered 2020-Oct-27 at 09:29I was working on a company machine. The comment from @Cyrus showed that which
is aliased to alias
. Doing this worked as it should have:
QUESTION
It's that dreaded time of generating publication ready EPS files for a science manuscript submission. The data, line-art figures for plots, is in R (RStudio coupled with R version 4.02). I've meet this challenge before but on a very well populated Linux machine. Today, I am using x64 bit Windows 10 that was only installed four months ago.
The code is:
...ANSWER
Answered 2020-Sep-23 at 22:09Recent versions of Ghostscript (unfortunately you've trimmed off the version from stdout, but it's (C) 2020 so it must be fairly recent) have altered the default behaviour, because of security vulnerabilities. The default is now to run in SAFER mode (previously the default was NOSAFER). This means that PostScript programs are not permitted to open/read/write/delete files on disk.
It looks like the file you are running is encountering an invalidfileaccess error when trying to write a file. The filename it's trying to write '00002dc' isn't mentioned as the output file on the Ghostscript command line, and that's the only way Ghostscript has of inferring that a file access should be permitted. Basically if the file isn't named on the command line, and you haven't told GS that it has permission to read/write to the given directory, then it's not permitted to access that file.
You could try using -dNOSAFER, I've no real idea how to add this to gsprint, which is not part of Ghostscript, but possibly (reading the gsprint.htm file) -option "-dNOSAFER" might work.
I wouldn't really recommend that as a long-term solution though.
QUESTION
I am converting .ps file to .jpeg file using ghostscript. But the output file should be rotated by 180 degree.
I am using the below command to rotate.
gswin64c.exe -sDEVICE=jpeg -dBATCH -dNOPAUSE -dSAFER -r300x300 -sOutputFile=E:\temp\test.jpg -dEPSCrop -c "<> setpagedevice" "E:\temp\myFile.ps.
Its giving below error:
GPL Ghostscript 9.10 (2013-08-30) Copyright (C) 2013 Artifex Software, Inc. All rights reserved. This software comes with NO WARRANTY: see the file PUBLIC for details. Error: /undefined in E:\temp\myFile.ps Operand stack:
Execution stack: %interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval-
- 2 %stopped_push --nostringval-- --nostringval-- --nostringval-- fa lse 1 %stopped_push .runexec2 --nostringval-- --nostringval-- --nost ringval-- 2 %stopped_push --nostringval-- Dictionary stack: --dict:1182/1684(ro)(G)-- --dict:0/20(G)-- --dict:77/200(L)-- Current allocation mode is local Last OS error: No such file or directory GPL Ghostscript 9.10: Unrecoverable error, exit code 1
PS:- E:\temp\myFile.ps location and file exists in my system.
...ANSWER
Answered 2020-Sep-11 at 10:56You have started arbitrary PostScript by using the -c switch. From then on everything until the next switch is treated as PostScript.
Your command line does not include any '-' between the closing " and the input filename, so the input filename is treated as part of the PostScript program. Since there is no PostScript token 'E;\temp\myFile.ps' the interpreter gives you an undefined error.
Try putting a -f
(-f means treat the next thing as a filename) after the "...setpagedevice".
That said, I'm dubious this will achieve what you want anyway, it depends on what's in the input file. You've used -dEPSCrop
yet the filename has a .ps extension. Unless the file is really an EPS then EPSCrop won't have any effect. If it is an EPS then the media size will be the dimensions of the EPS BoundingBox and (I believe) the Orientation will be ignored. If the input file is not an EPS then the EPSCrop will be ignored.
You are using a very elderly version of Ghostscript (7 years old) you should really update.
QUESTION
In my Symfony 4 project, I try to add bootstrap as an import after
...ANSWER
Answered 2019-Oct-14 at 12:21It seems I somehow solved the problem. First of all the import directory is this:
QUESTION
I am using firebase functions to crop certain area of pdf and convert them to image using ghostscript [The wrapper https://www.npmjs.com/package/node-gs and compiled version of gs v9.2 "https://github.com/sina-masnadi/node-gs/tarball/master" ]
and this is the code i am using :
...ANSWER
Answered 2020-Apr-03 at 07:17In the absence of an example file (and ideally the actual command line being sent to Ghostscript) as well as the lack of the back channel output (stout and stderr) the only observation I can make is that the 'option' you refer to (actually a piece of PostScript programming) introduces PostScript input with the -c
switch but does not terminate it with -f
. That means anything which folows this on the comand line will be treated as more PostScript, which is likely to either lead to an error or a 'hang', awaiting more input.
QUESTION
I have a .bmp
image file, and always returns the error when i convert from a bitmap
:
ANSWER
Answered 2020-Jan-20 at 13:13Ghostscript doesn't process .bmp files, it accepts PDF or PostScript. You could write a PostScript program to place a .bmp image (see for example viewgif.ps) but that's not the same thing at all.
You need an image processing application such as ImageMagick, as suggested by Mark Setchell above.
QUESTION
I am currently trying to add some TrueType Fonts to my current Ghostscript setup. (Windows 10, Ghostscript 9.25, 64bit)
I am editing the Fontmap.GS file found in the folder C:\Program Files\gs\gs9.25\Resource\Init but somehow that doesn't change the behavior. Ghostscript is still substituting Arial-BoldMT with Helvetiva-BoldMT even though I have specified a font to use in that case:
...ANSWER
Answered 2018-Oct-19 at 07:35In older versions of Ghostscript we did not even ship the support files for Windows, 9.25 is the first (Windows) version where these files are actually installed without extra effort from the user.
The Windows version (and in fact all versions now) defaults to using a ROM file system. That is, the support files are compiled into the executable. What that means is that Ghostscript doesn't look at the disk files, unless you tell it to.
You need to add a -I (Include) directive to tell Ghostscript to look at the modified files on disk. In your case that would be :
QUESTION
I am using linux (ubuntu 9.26) version of ghostscript. When I try to convert the postscript file into pdf using the following:
$ gs -dNOPAUSE -dBATCH -sOutputFile=test.pdf -sDEVICE=pdfwrite -c . setpdfwrite -f d00040-001.ps
The output I get is the following:
...ANSWER
Answered 2019-Sep-04 at 12:31Leave out the "-c . setpdfwrite -f" from your command line.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install artifex
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page