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

JPEG and PDF offline exporting #5157

Closed
ulrik59 opened this issue Mar 25, 2016 · 8 comments
Closed

JPEG and PDF offline exporting #5157

ulrik59 opened this issue Mar 25, 2016 · 8 comments
Assignees

Comments

@ulrik59
Copy link

ulrik59 commented Mar 25, 2016

The offline-exporting module is a great tool but unfortunately it only support PNG and SVG. Is there a possibility to add JPEG and PDF support ?
Also, adding offline-exporting module remove JPEG and PDF buttons... Could we add an options to display these buttons even if the exports is not offline ?

@pawelfus
Copy link
Contributor

Internal note:

I am not sure about exporting anything, using JS, to PDF (jsPDF ? looks problematic for SVG), but for JPEG, can we add type canvas.toDataURL("image/jpeg"), ref?

@ulrik59
Copy link
Author

ulrik59 commented Mar 29, 2016

I used to export with highcharts-export-clientside and it has PDF support with jsPDF.
Apparently there is a method addImage() where you can give a canvas in arguments but it's not documented...
Maybe add JPEG support and an option to display PDF button (PDF export will be done by the server) ?

@TorsteinHonsi
Copy link
Collaborator

TorsteinHonsi commented Mar 30, 2016

  • JPEG: We are planning to add that as described by Pawel above. @oysteinmoseng
  • PDF: On an earlier occasion we investigated using jsPDF, but as noted above, it has poort support for SVG. The PDF support in "highcharts-export-clientside" is not optimal - it just embeds a raster image into the PDF. In our opinion the point of exporting to PDF is to preserve the vector quality of the SVG graphics, so we didn't go that route. In order to include vectorized PDF support, we would have to either create our own implementation, contribute to jsPDF or look for other similar solutions with SVG support.

Edit: Here's a first draft on vectorized PDF support: http://jsfiddle.net/highcharts/wad3peww/. Key features like group translation, font styling and paths are missing.

@ulrik59 Here's how you can inject a server-based PDF export into the menu items: http://jsfiddle.net/highcharts/cw8j4nva/

@grahamscott
Copy link

JPEG: We are planning to add that as described by Pawel above. @oysteinmoseng

Is there a proposed release for this enhancement?

@TorsteinHonsi
Copy link
Collaborator

@oysteinmoseng

@oysteinmoseng
Copy link
Member

@grahamscott: I'll take a look at it this week, so it should be part of the next official release.

@grahamscott
Copy link

ah amazing, thank you 👍

@oysteinmoseng
Copy link
Member

Closing this and moving PDF discussion to separate issue.

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

No branches or pull requests

5 participants