I've using Ghostscript and ImageMagick for pdf to png conversion. PDF files are nothing but font file.
On some specific fonts like Avenir-BlackOblique, Avenir-BookOblique, Avenir-HeavyOblique etc.. (Fonts having suffix Oblique), I'm getting following error while converting to png.
Error: /rangecheck in --run--
Operand stack:
--dict:6/15(L)-- --dict:13/15(ro)(L)-- 1 A -string-
Execution stack:
%interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval-- --nostringval-- false 1 %stopped_push 1862 1 3 %oparray_pop 1861 1 3 %oparray_pop 1845 1 3 %oparray_pop --nostringval-- --nostringval-- 2 1 1 --nostringval-- %for_pos_int_continue --nostringval-- --nostringval-- --nostringval-- --nostringval-- %array_continue --nostringval-- false 1 %stopped_push --nostringval-- %loop_continue --nostringval-- --nostringval-- --nostringval-- %array_continue %finish_show --nostringval-- --nostringval-- 9 10 1 --nostringval-- (gs_show_enum) %op_show_continue
Dictionary stack:
--dict:1155/1684(ro)(G)-- --dict:1/20(G)-- --dict:77/200(L)-- --dict:77/200(L)-- --dict:106/127(ro)(G)-- --dict:286/300(ro)(G)-- --dict:22/25(L)-- --dict:4/6(L)-- --dict:21/40(L)-- --dict:7/15(L)--
Current allocation mode is local
GPL Ghostscript 8.70: Unrecoverable error, exit code 1
convert: Postscript delegate failed /var/www/smartmarketerca.pbsmartqa.pb.com/data/temp/32946b403f985cd25ee0fde2d309a17a/Avenir-HeavyOblique.pdf': No such file or directory # pdf.c/ReadPDFImage/611.
convert: missing an image filename/var/www/smartmarketerca.pbsmartqa.pb.com/data/temp/daba4128fccab3d646f0980d91660c30/72e2e9945e37481977500d7fdbb00b00.jpg' # convert.c/ConvertImageCommand/2800.
I'm using following configuration:
ImageMagick 6.5.4-7 2014-01-30 Q16
GPL Ghostscript 8.70 (2009-07-31)
Red Hat Enterprise Linux Server release 6.4 (Santiago)
I tried to upgrade GhostScript to 9.15 but even though its giving same but bit other message:
convert: **PDFDelegateFailed [ghostscript library 8.70]** -q -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=2 "-sDEVICE=pngalpha" -dTextAlphaBits=4 -dGraphicsAlphaBits=4 "-r72x72" "-sOutputFile=/tmp/magick-13460R723BggmiU56%d" "-f/tmp/magick-13460xmDYin8GYPzD" "-f/tmp/magick-13460gVQPulJIgS39"': Error: /rangecheck in --run--
Operand stack:
--dict:6/15(L)-- --dict:13/15(ro)(L)-- 1 A -string-
Execution stack:
%interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval-- --nostringval-- false 1 %stopped_push 1862 1 3 %oparray_pop 1861 1 3 %oparray_pop 1845 1 3 %oparray_pop --nostringval-- --nostringval-- 2 1 1 --nostringval-- %for_pos_int_continue --nostringval-- --nostringval-- --nostringval-- --nostringval-- %array_continue --nostringval-- false 1 %stopped_push --nostringval-- %loop_continue --nostringval-- --nostringval-- --nostringval-- %array_continue %finish_show --nostringval-- --nostringval-- 9 10 1 --nostringval-- (gs_show_enum) %op_show_continue
Dictionary stack:
--dict:1154/1684(ro)(G)-- --dict:1/20(G)-- --dict:77/200(L)-- --dict:77/200(L)-- --dict:106/127(ro)(G)-- --dict:286/300(ro)(G)-- --dict:22/25(L)-- --dict:4/6(L)-- --dict:21/40(L)-- --dict:7/15(L)--
Current allocation mode is local
GPL Ghostscript 8.70: Unrecoverable error, exit code 1
# error/pdf.c/InvokePDFDelegate/271.
convert: no images defined/var/www/smartmarketerca/data/temp/0d9e22bf29b00073cfeb51edd2f4d906/9d1f6dbc420b659b6f9489912061c540.jpg' # error/convert.c/ConvertImageCommand/3212.
Please suggest. Thanks.
Related
I am trying to pass both a command string and separate arguments from an input file to GNU parallel. My script looks like this:
parallel="parallel --delay 0.2 -j 100 --joblog remaining_runs_$1.log --resume "
$srun $parallel {python3 scaling.py {1} {2} {3}} < missing_runs_$1.txt
The python script takes 3 separate integers as arguments, each listed in missing_runs_$1.txt like so:
1 1 153
1 1 154
1 1 155
1 1 156
1 1 157
1 1 158
...
I have tried using --colsep but it results to only the file arguments being passed to parallel missing the python3 scaling.py part. Without --colsep each file line is interpreted as a string which is not what I want either (e.g., python3 scaling.py '1 1 153'). Any ideas?
With base in your input sample, I created a reproducible example to test this issue:
A simple python script:
#!/usr/bin/python
import sys
for i in range(1, len(sys.argv)):
print(f'The argument number {i} is {sys.argv[i]}.')
And a simplified command line:
parallel --dry-run -j 100 --colsep ' ' ./python.py {1} {2} {3} :::: < missing_runs_1.txt
./python.py 1 1 153
./python.py 1 1 154
./python.py 1 1 155
./python.py 1 1 156
./python.py 1 1 157
./python.py 1 1 158
without --dry-run:
The argument number 1 is 1.
The argument number 2 is 1.
The argument number 3 is 153.
The argument number 1 is 1.
The argument number 2 is 1.
The argument number 3 is 154.
The argument number 1 is 1.
The argument number 2 is 1.
The argument number 3 is 155.
The argument number 1 is 1.
The argument number 2 is 1.
The argument number 3 is 156.
The argument number 1 is 1.
The argument number 2 is 1.
The argument number 3 is 157.
The argument number 1 is 1.
The argument number 2 is 1.
The argument number 3 is 158.
Using all arguments from your parallel command, in the file remaining_runs_1.log, I got:
Seq Host Starttime JobRuntime Send Receive Exitval Signal Command
1 : 1630591288.009 0.021 0 86 0 0 ./python.py 1 1 153
2 : 1630591288.220 0.040 0 86 0 0 ./python.py 1 1 154
3 : 1630591288.422 0.035 0 86 0 0 ./python.py 1 1 155
4 : 1630591288.649 0.041 0 86 0 0 ./python.py 1 1 156
5 : 1630591288.859 0.042 0 86 0 0 ./python.py 1 1 157
6 : 1630591289.081 0.040 0 86 0 0 ./python.py 1 1 158
I think this can solve the problem or at least give new ideas for the definitive solution.
If
parallel --delay 0.2 -j 100 --joblog curtailment_scaling_remaining_$1.log --resume python3 scaling.py {1} {2} {3} :::: < missing_runs_$1.txt
gives you:
python3 curtailment_scaling.py '1 1 163'
and you want:
python3 curtailment_scaling.py 1 1 163
you can do (version > 20190722):
parallel --delay 0.2 -j 100 --joblog curtailment_scaling_remaining_$1.log --resume python3 scaling.py {=uq=} < missing_runs_$1.txt
(uq runs uq(); which causes the replacement string not to be quoted.)
or:
parallel --delay 0.2 -j 100 --joblog eval curtailment_scaling_remaining_$1.log --resume python3 scaling.py {} < missing_runs_$1.txt
I recently had a big problem with a document that uses pstrick code to figure inside a document. While the document compiled perfectly, an update that I didn't pay attention to, gives me the following error for each figure:
Current allocation mode is local
Last OS error: Permission denied
Current file position is 69
GPL Ghostscript 9.53.3: Unrecoverable error, exit code 1
Error: / invalidfileaccess in --run--
Operand stack:
(/usr/local/texlive/2021/texmf-dist/dvips/pstricks/pstricks.pro) (r)
Execution stack:
% interp_exit .runexec2 --nostringval-- run --nostringval-- 2% stopped_push --nostringval-- run run false 1% stopped_push 1974 1 3% oparray_pop 1973 1 3% oparray_pop 1961 1 3% oparray_pop 1817 1 3% oparray_pop - -nostringval--% errorexec_pop .runexec2 --nostringval-- run --nostringval-- 2% stopped_push --nostringval-- 1974 1 3% oparray_pop run
Dictionary stack:
--dict: 756/1123 (ro) (G) - --dict: 0/20 (G) - --dict: 75/200 (L) -
and the pdf produced only includes the text present in the figures not the figures (curves, axes ...)
I am using texlive 2021 under macOS 11.3.1, mac-mini M1, texshop, xelatex
On an old iMac from 2010 running macOS 10.13.6, with texive 2018 texshop and xelatex, I do not encounter the problem
I'm trying to convert a pdf document that contains multiple layers to a .jpg image. But it gives me an error. Please see below:
with this command:
convert test.pdf test.jpeg
The result:
Error: /rangecheck in --run--
Operand stack:
--dict:7/16(L)-- Im0 0.0 --nostringval-- true 2292 0 0 1
Execution stack:
%interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval-- --nostringval-- false 1 %stopped_push 1878 1 3 %oparray_pop 1877 1 3 %oparray_pop 1861 1 3 %oparray_pop --nostringval-- --nostringval-- 2 1 1 --nostringval-- %for_pos_int_continue --nostringval-- --nostringval-- false 1 %stopped_push --nostringval-- --nostringval-- --nostringval-- %array_continue --nostringval-- false 1 %stopped_push --nostringval-- %loop_continue --nostringval-- --nostringval-- --nostringval--
Dictionary stack:
--dict:1162/1684(ro)(G)-- --dict:1/20(G)-- --dict:75/200(L)-- --dict:75/200(L)-- --dict:108/127(ro)(G)-- --dict:290/300(ro)(G)-- --dict:22/25(L)-- --dict:6/8(L)-- --dict:21/40(L)-- --dict:5/5(L)-- --dict:1/1(ro)(G)-- --dict:5/5(L)-- --dict:8/15(L)--
Current allocation mode is local
Last OS error: 2
GPL Ghostscript 8.71: Unrecoverable error, exit code 1
convert: Postscript delegate failed `test.pdf': ACzp.cache # error/pdf.c/ReadPDFImage/638.
convert: missing an image filename `test.pdf' # error/convert.c/ConvertImageCommand/2940.
i also tried
convert --flatten test.pdf test.jpeg
but also no luck.
Can please anyone help me with this problem im stuck on the moment?
I updated Xcode. Not sure if that's the problem but it is where the problem started.
But long story short:
-"$ cordova emulate android" works
-"$ cordova emulate ios" does not work
It gives me (this is the last part of the output):
** BUILD SUCCEEDED **
2014-10-03 16:35:53.054 ios-sim[74808:507] stderrPath: /Users/doekewartena/Documents/jbc2014/platforms/ios/cordova/console.log
2014-10-03 16:35:53.055 ios-sim[74808:507] stdoutPath: /Users/doekewartena/Documents/jbc2014/platforms/ios/cordova/console.log
2014-10-03 16:35:53.085 ios-sim[74808:507] -[__NSArrayM localizedDescription]: unrecognized selector sent to instance 0x7fea40503090
2014-10-03 16:35:53.086 ios-sim[74808:507] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSArrayM localizedDescription]: unrecognized selector sent to instance 0x7fea40503090'
*** First throw call stack:
(
0 CoreFoundation 0x00007fff98e1025c __exceptionPreprocess + 172
1 libobjc.A.dylib 0x00007fff8cc4ee75 objc_exception_throw + 43
2 CoreFoundation 0x00007fff98e1312d -[NSObject(NSObject) doesNotRecognizeSelector:] + 205
3 CoreFoundation 0x00007fff98d6e272 ___forwarding___ + 1010
4 CoreFoundation 0x00007fff98d6ddf8 _CF_forwarding_prep_0 + 120
5 ios-sim 0x00000001014b8e29 -[iPhoneSimulator LoadSimulatorFramework:] + 245
6 ios-sim 0x00000001014ba8e0 -[iPhoneSimulator runWithArgc:argv:] + 2271
7 ios-sim 0x00000001014bacb2 main + 101
8 ios-sim 0x00000001014b8ce4 start + 52
)
libc++abi.dylib: terminating with uncaught exception of type NSException
/Users/doekewartena/Documents/jbc2014/platforms/ios/cordova/run: line 158: 74808 Abort trap: 6 ios-sim launch "$SIMULATOR_APP_PATH" --stderr "$CORDOVA_PATH/console.log" --stdout "$CORDOVA_PATH/console.log" $TARGET_FLAG --exit
Error: /Users/doekewartena/Documents/jbc2014/platforms/ios/cordova/run: Command failed with exit code 134
at ChildProcess.whenDone (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/superspawn.js:135:23)
at ChildProcess.emit (events.js:98:17)
at maybeClose (child_process.js:755:16)
at Process.ChildProcess._handle.onexit (child_process.js:822:5)
However, I can run the simulator fine from Xcode itself.
I have no clue what to do, I hope someone can help.
For Xcode 6 you'll need version 3 of ios-sim. Check your version by running ios-sim --version. Upgrade by running sudo npm update ios-sim -g.
I am trying to convert an html file to an image by using html2ps and imagemagick. This is the command that is being executed:
convert ./test.html ./test.png
and this is the error I am recieving:
Use of assignment to $[ is deprecated at /usr/bin/html2ps line 3409.
*** Error opening /tmp/magick-mEFhFOmU
Error: /nocurrentpoint in --currentpoint--
Operand stack:
--nostringval--
Execution stack:
%interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval-- --nostringval-- false 1 %stopped_push 1910 1 3 %oparray_pop 1909 1 3 %oparray_pop 1893 1 3 %oparray_pop 1787 1 3 %oparray_pop --nostringval-- %errorexec_pop .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval--
Dictionary stack:
--dict:1166/1684(ro)(G)-- --dict:0/20(G)-- --dict:79/200(L)-- --dict:407/2000(L)--
Current allocation mode is local
Last OS error: 2
Current file position is 27444
GPL Ghostscript 9.05: Unrecoverable error, exit code 1
Error: /nocurrentpoint in --currentpoint--
Operand stack:
--nostringval--
Execution stack:
%interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval-- --nostringval-- false 1 %stopped_push 1910 1 3 %oparray_pop 1909 1 3 %oparray_pop 1893 1 3 %oparray_pop 1787 1 3 %oparray_pop --nostringval-- %errorexec_pop .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval--
Dictionary stack:
--dict:1166/1684(ro)(G)-- --dict:0/20(G)-- --dict:79/200(L)-- -- dict:407/2000(L)--
Current allocation mode is local
Last OS error: 2
Current file position is 27444
GPL Ghostscript 9.05: Unrecoverable error, exit code 1
convert: unable to open image `./test.html': # error/blob.c/OpenBlob/2587.
convert: Postscript delegate failed `/tmp/magick-Dm8Uf9H1': # error/ps.c/ReadPSImage/806.
convert: missing an image filename `./test.png' # error/convert.c/ConvertImageCommand/3011.
I have tried searching but had no luck. I partly understand what is going on here but lost on how to fix it.
edit: I am running this on Ubuntu 32-bit