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

pgf: Fix invalid arguments passed to pdftocairo. #8127

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

Merged
merged 1 commit into from
Feb 22, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
pgf: Fix invalid arguments passed to pdftocairo.
This breaks saving PNG when using the PGF backend.

Fixes #8121.
  • Loading branch information
QuLogic committed Feb 22, 2017
commit c0d5a14241720468a297add29e6fabaea3b8f3ab
7 changes: 3 additions & 4 deletions 7 lib/matplotlib/backends/backend_pgf.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,10 +191,9 @@ def make_pdf_to_png_converter():
# pick converter
if "pdftocairo" in tools_available:
def cairo_convert(pdffile, pngfile, dpi):
cmd = [str("pdftocairo"), "-singlefile", "-png",
"-r %d" % dpi, pdffile, os.path.splitext(pngfile)[0]]
# for some reason this doesn't work without shell
check_output(cmd, shell=True, stderr=subprocess.STDOUT)
cmd = [str("pdftocairo"), "-singlefile", "-png", "-r", "%d" % dpi,
pdffile, os.path.splitext(pngfile)[0]]
check_output(cmd, stderr=subprocess.STDOUT)
return cairo_convert
elif "gs" in tools_available:
def gs_convert(pdffile, pngfile, dpi):
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.