Skip to content

Download figure as pdf, not as png. #339

Description

@srosenzweig09

Describe the issue

Widgets are displayed with a toolbar, which has a save/download button that saves the figure directly to my Downloads folder. I love this feature, but I would appreciate it even more if I can set it to download the image as a pdf instead of as a png. Is this a possibility?

Activity

  1. martinRenou commented on Aug 17, 2021

    @martinRenou
    Member

    I believe this is not on the roadmap for ipympl, but maybe someone has another opinion, do you have any input on this @ianhi?

    I guess this would be difficult to implement unless we find a JavaScript library that makes this easy.

  2. martinRenou commented on Aug 17, 2021

    @martinRenou
    Member
  3. ianhi commented on Aug 17, 2021

    @ianhi
    Collaborator

    This is the same underlying issue as #138 and #234 which is the savefig button doesn't respect rcparams because it doesn't follow the normal savefig path.

    Ultimately I think ipympl should respect that from buttons. I think the way to have that happen is to have a bit more back and forth between front and backend when the save button is pushed. So it could like what I sketched out in #138 (comment)

  4. ianhi commented on Aug 17, 2021

    @ianhi
    Collaborator

    For pdf we need the option 1 i proposed which is just using the javascript to choose the filepath and then doing everything on hte backend

  5. abast commented on Jun 6, 2024

    @abast

    Is there any news regarding this feature? pdf is the format I use most frequently as I can import it as vectorgraphic into illustrator, and this worflow would be much improved if I could download a pdf directly from the notebook.

  6. giulioiannelli commented on Nov 13, 2024

    @giulioiannelli

    I also found myself in the need of this functionality. Any news?

  7. bjudkewitz commented on Jan 13, 2026

    @bjudkewitz

    +1

  8. ianhi commented on Jan 21, 2026

    @ianhi
    Collaborator

    this should now work in the just released on pypi (soon on conda-forge) version 0.10.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions