Open GoogleCodeExporter opened 8 years ago
Update: A quick grep for 'gswin32' shows that in aconf.h, there is a
hard-coded: #define GHOSTSCRIPT "gswin32". Changing this to "gs" and
re-compiling solves the problem.
Original comment by br...@intercarve.net
on 13 May 2011 at 2:04
Same problem. same issue. it work's now. thanks br...@intercarve.net
Original comment by vincent....@gmail.com
on 19 May 2011 at 12:06
Update: even after I changed 'gswin32' to 'gs' in aconf.h, pdf2image does not
run properly:
../../src/pdf2image/src/pdf2image D5WjS8ERKb.pdf
Page-1
Page-2
Page-3
Page-4
Page-5
Page-6
Page-7
Page-8
Page-9
Page-10
Page-11
Page-12
Page-13
Page-14
Error: /ioerror in --image--
Operand stack:
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 1755 1 3 %oparray_pop --nostringval-- %errorexec_pop .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval-- 1782 1 7 %oparray_pop
Dictionary stack:
--dict:1158/1684(ro)(G)-- --dict:0/20(G)-- --dict:71/200(L)-- --dict:65/75(L)-- --dict:18/25(L)-- --dict:0/15(L)-- --dict:0/15(L)--
Current allocation mode is local
Last OS error: 2
Current file position is 13358
GPL Ghostscript 8.71: Unrecoverable error, exit code 1
Error: Failed to launch Ghostscript!
Original comment by br...@intercarve.net
on 20 Jun 2011 at 4:57
I'm having the same issue with RHEL 6.1 and pdf2image.
Error: /ioerror in --image--
Operand stack:
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 1739 1 3 %oparray_pop --nostringval-- %errorexec_pop .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval-- 1766 1 8 %oparray_pop
Dictionary stack:
--dict:1156/1684(ro)(G)-- --dict:0/20(G)-- --dict:71/200(L)-- --dict:71/75(L)-- --dict:18/25(L)-- --dict:0/15(L)-- --dict:0/15(L)-- --dict:0/15(L)--
Current allocation mode is local
Last OS error: 2
Current file position is 6573993
GPL Ghostscript 8.70: Unrecoverable error, exit code 1
Error: Failed to launch Ghostscript!
Original comment by tech...@gmail.com
on 8 Sep 2011 at 6:55
Same issue here.
pdf2image FLEXUI_LICENSE.pdf -JSON -compress
Page-1
Page-2
Error: /undefined in $F
Operand stack:
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--
Dictionary stack:
--dict:1161/1684(ro)(G)-- --dict:0/20(G)-- --dict:78/200(L)-- --dict:65/75(L)-- --dict:18/25(L)--
Current allocation mode is local
Last OS error: 2
Current file position is 350406
GPL Ghostscript 9.01: Unrecoverable error, exit code 1
Error: Failed to launch Ghostscript!
Original comment by cajay...@gmail.com
on 30 Sep 2011 at 9:45
same issue here .
[root@localhost splash]# pdf2image /root/tempalte/tao/confirmation.pdf -JSON
-compress
Page-1
Error: /ioerror in --image--
Operand stack:
Execution stack:
%interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval-- --nostringval-- false 1 %stopped_push 1846 1 3 %oparray_pop 1845 1 3 %oparray_pop 1829 1 3 %oparray_pop 1723 1 3 %oparray_pop --nostringval-- %errorexec_pop .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval-- 1750 1 7 %oparray_pop
Dictionary stack:
--dict:1156/1684(ro)(G)-- --dict:0/20(G)-- --dict:71/200(L)-- --dict:65/75(L)-- --dict:18/25(L)-- --dict:2/15(L)-- --dict:0/15(L)--
Current allocation mode is local
Last OS error: 2
Current file position is 13337
GPL Ghostscript 8.70: Unrecoverable error, exit code 1
Error: Failed to launch Ghostscript!
Original comment by nguyenho...@gmail.com
on 24 Nov 2011 at 9:56
Pretty sure this software is unmaintained...
Original comment by br...@intercarve.net
on 27 Nov 2011 at 3:21
Yeah it seems that no-one is maintaining this code.
However, I have managed to fix this bug as I had the same Ghostscript error as
the previous few comments.
The problem is that pdf2image creates a ps file that Ghostscript can't handle.
However, if you give Ghostscript the original PDF file instead, that works fine
and your PNGs will be created fine (the default zoom of 1.5 isn't great though,
for my purposes at least, but this easy enough to change)
I don't know how to check in my fixes, this is the first time I have
contributed anything, but here is what I did:
edit the file: src/pdf2image.cc
Comment out or delete lines 298-302 (psOut = ... to delete psOut;)
Replace line 323:
old 323: gsCmd->append(psFileName);
new 323: gsCmd->append(fileName);
(fileName is just your PDF filename, whereas psFilename is the .ps file that
got created in the lines you have commented out, that GhostScript doesn't like)
Replace line 329:
old 329: unlink(psFileName->getCString());
new 329: unlink(htmlFileName->getCString());
(htmlFileName is an empty file with the same name as your PDF, but with no
extension, the purpose of which I don't know...)
If you like, you can get the GhostScript command directly, just output
gsCmd->getCString() around line 325.
make and make install and you should be away.
How to improve the resolution of the output file: you are looking for the
variable called "scale", or alternatively change the number 72 in line 309 to a
higher number. I guess the author thought 72 was good enough for screen
resolution, and a scale of 1 would be OK - but it isn't for me, and maybe not
for you.
I hope this helps someone!
Cheers
Tim
Original comment by timtheco...@gmail.com
on 30 Nov 2011 at 4:19
P.S. Re "scale", I just realised that you can just do -zoom <x> as an option to
pdf2image, no need to change "scale" in the code unless you really want to...
Original comment by timtheco...@gmail.com
on 30 Nov 2011 at 4:27
Original comment by pdf2im...@devaldi.com
on 9 Jan 2012 at 1:10
Original issue reported on code.google.com by
br...@intercarve.net
on 13 May 2011 at 1:58