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

Comments

Projects
None yet
5 participants
@ulrik59

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

This comment has been minimized.

Show comment
Hide comment
@pawelfus

pawelfus Mar 29, 2016

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?

Contributor

pawelfus commented Mar 29, 2016

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

This comment has been minimized.

Show comment
Hide comment
@ulrik59

ulrik59 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) ?

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

This comment has been minimized.

Show comment
Hide comment
@TorsteinHonsi

TorsteinHonsi Mar 30, 2016

Collaborator
  • 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/

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

This comment has been minimized.

Show comment
Hide comment
@grahamscott

grahamscott Apr 29, 2016

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

Is there a proposed release for this enhancement?

grahamscott commented Apr 29, 2016

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

Is there a proposed release for this enhancement?

@TorsteinHonsi

This comment has been minimized.

Show comment
Hide comment
@TorsteinHonsi
Collaborator

TorsteinHonsi commented May 2, 2016

@oysteinmoseng

This comment has been minimized.

Show comment
Hide comment
@oysteinmoseng

oysteinmoseng May 2, 2016

Collaborator

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

Collaborator

oysteinmoseng commented May 2, 2016

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

@grahamscott

This comment has been minimized.

Show comment
Hide comment
@grahamscott

grahamscott May 2, 2016

ah amazing, thank you 👍

grahamscott commented May 2, 2016

ah amazing, thank you 👍

@oysteinmoseng

This comment has been minimized.

Show comment
Hide comment
@oysteinmoseng

oysteinmoseng May 3, 2016

Collaborator

Closing this and moving PDF discussion to separate issue.

Collaborator

oysteinmoseng commented May 3, 2016

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