Open westerman opened 6 years ago
I should add that if I remove the processcolors section as outlined in the README in order to produce black & white images then the file gets converted to PDF without an error message. So there is something in that processcolors section that is causing a problem for the Mac.
Another point, the Mac comes with two different conversion programs -- ps2pdf (ghostscript) and pstopdf (Apple's version) -- and both have the same problem, albeit with slightly different error messages such as:
pstopdf P30.ps %%[ Error: undefined; OffendingCommand: processcolors ]%%
Stack: /haveColor
%%[ Flushing: rest of job (to end-of-file) will be ignored ]%% %%[ Warning: PostScript error. No PDF file produced. ] %% pstopdf failed on file P30.ps with error code -31000
Hi Rick,
I haven't touched this in many moons, but I can say for certain that I was successfully playing with this package on OSX on my Macbook a handful of years ago using ps2pdf to convert the .ps files for play.
Given this fact and your other issue that I just saw pop up, I suspect both of these issues are ones introduced by the recent pull request from JC. I'd suggest that you prove or disprove that theory first by trying what you're doing against the last version of this code prior to the commits of Dec 7th 2017. This would be the fastest route to narrowing the window of where to look. I can see in his code there is a PAPERSIZE env added, so it surely explains the other issue. My hunch is it is also connected to this one.
If you can let me know the result of that test, I'll ask the author to have a look at the commits. I don't intend to work on this project any more myself (there are better non-perl projects replacing it as we speak) but unless someone wants to manage this codebase on GH themselves, I'll continue to keep an eye on these messages.
Good idea of going back however even going back to near the beginning (Jun 21, 2014) still has the same problem. So it appears to be a mismatch between what the Mac wants vs. what ps18xx is providing. Perhaps the Mac has become more strict since you developed on it.
I believe this has to do with "processcolors" being undefined. Perhaps this is an environment variable that is set on other operating systems?
Needless to say, I was able to get this to work with color files by commenting out (put a % in front of each line):
/haveColor glob-known not {
/haveColor false def
systemdict /statusdict known {
statusdict /processcolors known {
/haveColor processcolors 1 ne def
} if
} if
} if
and adding the line:
/haveColor true def
If you make this change to the 18-defs.ps it will make this change globally for all files created.
This is due to change (cleanup) in how Ghostview/Ghostscript handles the non-standard processcolors
in statusdict
. The change was supposed to be innocuous, but ps18xx trips across it. I'll get a PR submitted in a bit (I'm on the road ATM).
New to ps18xx but while I can get ps2pdf to work on ps18xx files in Linux I can not get them to work on my Mac. The exact same ps18xx-generated file gives a problem on the Mac but not Linux. A non-ps18xx PS file does not give problems on the Mac thus I think that the problem is ps18xx oriented. The error is, unfortunately, rather generic but it is consistent between different ps18xx-generated files (both MAP and overall tiles for a variant). My limited knowledge of Postscript and playing around with the PS files does not give me any obvious clues as to what is happening. I'll just use my Linux system for the moment but if anyone has a Mac or can point me in the correct direction then I would appreciate the help. The error message is: