Closed Opware2000 closed 2 years ago
I forgot to mention that I compile with XeLaTeX (and of course with -shell-escape)
Hey, thanks for the report!
This is probably because the .setpdfwrite
operator has been removed from GhostScript (see for example https://github.com/GravityMedia/Ghostscript/issues/6). It seems it's not really necessary anyway, so I'll look into dropping it.
It's interesting that you can compile with XeLaTeX
- last time I checked it was missing some crucial commands I'm using.
Thanks for your answer. I just tested on a copy of graphicscache.sty where I removed the parts
'.setpdfwrite <<
/AutoFilterColorImages false
/EncodeColorImages true
/ColorImageFilter /\graphicscache@compress@mode\space
/ColorImageDict << /ColorTransform 1 /QFactor \graphicscache@qfactor\space /Blend 1 /HSamples [1 1 1 1] /VSamples [1 1 1 1] >>
/ColorImageResolution \graphicscache@dpi\space
/AutoFilterGrayImages false
/EncodeGrayImages true
/GrayImageFilter /graphicscache@compress@mode\space
/GrayImageDict << /ColorTransform 1 /QFactor \graphicscache@qfactor\space /Blend 1 /HSamples [1 1 1 1] /VSamples [1 1 1 1] >>
/GrayImageResolution \graphicscache@dpi\space
>> setdistillerparams'
My doc compiles correctly with XeLaTeX without error. However, I may have been a bit rough.
I think you just have to remove the .setpdfwrite
itself. Otherwise you lose the DPI specification. So it should be
'<<
/AutoFilterColorImages false
/EncodeColorImages true
/ColorImageFilter /\graphicscache@compress@mode\space
/ColorImageDict << /ColorTransform 1 /QFactor \graphicscache@qfactor\space /Blend 1 /HSamples [1 1 1 1] /VSamples [1 1 1 1] >>
/ColorImageResolution \graphicscache@dpi\space
/AutoFilterGrayImages false
/EncodeGrayImages true
/GrayImageFilter /graphicscache@compress@mode\space
/GrayImageDict << /ColorTransform 1 /QFactor \graphicscache@qfactor\space /Blend 1 /HSamples [1 1 1 1] /VSamples [1 1 1 1] >>
/GrayImageResolution \graphicscache@dpi\space
>> setdistillerparams'
It works great!
First compilation: 25 seconds Second compilation: 12 seconds
(no particular parameters, just the use of \usepackage{graphicscache} )
Thanks for testing :+1: I'll integrate that in the next days.
Hello. With the default options (\usepackage{graphicscache}) I have an error related to the cache system not found (?) by ghostscript.
This error is not present if I use the option [compress=false] (for example during a second compilation) I have as expected the PDF file in cache
OS : macOs Big Sur GhostScript version 9.54.0 (installed via HomeBrew)