On 24.04.21 08:03, Jairo A. del Rio wrote:
Hi, list!
When I try to convert a PDF generated by ConTeXt LMTX to PNG using
ImageMagick's convert the following happens:
**** Error: stream Length incorrect.
Output may be incorrect.
**** Error: An error occurred while reading an XREF table.
**** The file has been damaged. This may have been caused
**** by a problem while converting or transfering the file.
**** Ghostscript will attempt to recover the data.
**** However, the output may be incorrect.
Error: /ioerror in --runpdf--
Operand stack:
post_eof_count 4096 --nostringval-- 4571
Execution stack:
%interp_exit .runexec2 --nostringval-- runpdf --nostringval--
2 %stopped_push --nostringval-- runpdf runpdf false 1
%stopped_push 1990 1 3 %oparray_pop 1989 1 3 %oparray_pop
1977 1 3 %oparray_pop 1978 1 3 %oparray_pop runpdf runpdf
runpdf runpdf runpdf runpdf runpdf
Dictionary stack:
--dict:735/1123(ro)(G)-- --dict:1/20(G)-- --dict:80/200(L)--
--dict:80/200(L)-- --dict:135/256(ro)(G)-- --dict:315/325(ro)(G)--
--dict:28/32(L)--
Current allocation mode is local
GPL Ghostscript 9.50: Unrecoverable error, exit code 1
convert-im6.q16: FailedToExecuteCommand `'gs' -sstdout=%stderr -dQUIET
-dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000
-dAlignToPixels=0 -dGridFitTT=2 '-sDEVICE=pngalpha' -dTextAlphaBits=4
-dGraphicsAlphaBits=4 '-r300x300'
'-sOutputFile=/tmp/magick-55690XUwDR8veJQEc%d'
'-f/tmp/magick-55690zbxNvSPCVCYe' '-f/tmp/magick-55690aVvG11u3p8wd'' (1) @
error/pdf.c/InvokePDFDelegate/291.
convert-im6.q16: no images defined `151.png' @
error/convert.c/ConvertImageCommand/3258.
I'd blame ImageMagick, except for the fact that 1) other converters fail
too and 2) it doesn't happen with ConTeXt MkIV (PDF is successfully
converted).
Cordially,
Jairo
Very interesting! I have seen similar behavior these past days (I think
it's very recent) but thought it was something in my documents. Hans, MWE:
I have two test files, simply with
\starttext
Test
\stoptext
I try to concatenate the resulting pdf files with qpdf:
qpdf test1.pdf --pages test1.pdf test2.pdf -- result.pdf
And I get these warnings (though the resulting file appears to be OK):
WARNING: test1.pdf (xref stream: object 18 0, offset 4154): expected
endstream
WARNING: test1.pdf (xref stream: object 18 0, offset 4078): attempting
to recover stream length
WARNING: test1.pdf (xref stream: object 18 0, offset 4078): recovered
stream length: 64
WARNING: test1.pdf (object 3 0, offset 4179): expected endstream
WARNING: test1.pdf (object 3 0, offset 2982): attempting to recover
stream length
WARNING: test1.pdf (object 3 0, offset 2982): recovered stream length: 887
WARNING: test2.pdf (xref stream: object 18 0, offset 4215): expected
endstream
WARNING: test2.pdf (xref stream: object 18 0, offset 4139): attempting
to recover stream length
WARNING: test2.pdf (xref stream: object 18 0, offset 4139): recovered
stream length: 65
WARNING: test2.pdf (object 3 0, offset 4241): expected endstream
WARNING: test2.pdf (object 3 0, offset 3050): attempting to recover
stream length
WARNING: test2.pdf (object 3 0, offset 3050): recovered stream length: 880
qpdf: operation succeeded with warnings; resulting file may have some
problems
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the
Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___________________________________________________________________________________