Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xpdf distiller seems broken #16538

Closed
anntzer opened this issue Feb 16, 2020 · 1 comment · Fixed by #16736
Closed

xpdf distiller seems broken #16538

anntzer opened this issue Feb 16, 2020 · 1 comment · Fixed by #16736
Milestone

Comments

@anntzer
Copy link
Contributor

anntzer commented Feb 16, 2020

Bug report

Bug summary

What the title says

Code for reproduction

rcParams["ps.usedistiller"] = "xpdf"; plot(); savefig("/tmp/test.ps")

Actual outcome

<elided>
  File ".../matplotlib/backends/backend_ps.py", line 1247, in xpdf_distill
    cbook._check_and_log_subprocess(
  File ".../matplotlib/cbook/__init__.py", line 2129, in _check_and_log_subprocess
    raise RuntimeError(
RuntimeError: The command
    ps2pdf '-dAutoFilterColorImages#false' '-dAutoFilterGrayImages#false' '-dAutoRotatePages#false' '-sGrayImageFilter#FlateEncode' '-sColorImageFilter#FlateEncode' '-sPAPERSIZE#letter' /tmp/tmpddvwd66_/tmp.ps /tmp/tmpddvwd66_/tmp.ps.pdf
failed and generated the following output:

and the following error:
Unrecoverable error: typecheck in .putdeviceprops

Expected outcome

Success.

Matplotlib version

  • Operating system: arch linux / fedora
  • Matplotlib version: master, but present as far back as mpl3.0 at least.
  • Matplotlib backend (print(matplotlib.get_backend())): ps
  • Python version: 38
  • Jupyter version (if applicable): no
  • Other libraries: ghostscript 9.50 on arch; 9.27 on fedora
@anntzer anntzer changed the title xpdf distiller seems broken with ghostcript 9.50 xpdf distiller seems broken Feb 16, 2020
@QuLogic
Copy link
Member

QuLogic commented Mar 11, 2020

Bisect points to 4ba9be1, i.e., #10295, but the problem is not changing = to #, but rather that that PR incorporates #10294 which adds -dAutoRotatePages#false (on a side note, this is why you shouldn't mix different behavioural changes in a single commit.)

But maybe since it doesn't fail on CI, but does locally, it's a regression in Ghostscript too.

QuLogic added a commit to QuLogic/matplotlib that referenced this issue Mar 12, 2020
Looking at the Ghostscript source code, it should take
None/All/PageByPage instead of a boolean.

Fixes matplotlib#16538.
@QuLogic QuLogic added this to the v3.2.1 milestone Mar 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants