Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

FIX: don't autorotate xpdf images #10294

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

Closed
wants to merge 2 commits into from

Conversation

jklymak
Copy link
Member

@jklymak jklymak commented Jan 23, 2018

PR Summary

As per #10290, ghostscript auto-rotates during ps2pdf, so if a figure has a lot of roated text it gets unexpectedly rotated if the user has rcParams['ps.usedistiller'] = "xpdf" set.

This passes the flag "-dAutoRotatePages=false" to ps2pdf.

See also

https://www.ghostscript.com/doc/current/Ps2pdf.htm

PR Checklist

  • Has Pytest style unit tests
  • Code is PEP 8 compliant
  • New features are documented, with examples if plot related
  • Documentation is sphinx and numpydoc compliant
  • Added an entry to doc/users/next_whats_new/ if major new feature (follow instructions in README.rst there)
  • Documented in doc/api/api_changes.rst if API changed in a backward-incompatible way

@jklymak jklymak added this to the v2.2 milestone Jan 23, 2018
@@ -1557,12 +1557,14 @@ def xpdf_distill(tmpfile, eps=False, ptype='letter', bbox=None, rotated=False):
command = [str("ps2pdf"), "-dAutoFilterColorImages#false",
"-dAutoFilterGrayImages#false",
"-sGrayImageFilter#FlateEncode",
"-dAutoRotatePages=false",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

needs a hash to make windows happy... (see above too)
unfortunately we're not currently testing this codepath on windows CI

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ooops!

@@ -1544,7 +1544,7 @@ def xpdf_distill(tmpfile, eps=False, ptype='letter', bbox=None, rotated=False):
"""
pdffile = tmpfile + '.pdf'
psfile = tmpfile + '.ps'

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no trailing spaces

@jklymak
Copy link
Member Author

jklymak commented Jan 23, 2018

Closing in lieu of #10295

@jklymak jklymak closed this Jan 23, 2018
@QuLogic QuLogic modified the milestones: needs sorting, v2.2.0 Feb 12, 2018
@jklymak jklymak deleted the fix-noautorotate-xpdf branch March 5, 2019 16:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.