nx10 / httpgd

Asynchronous http server graphics device for R.
https://nx10.github.io/httpgd
GNU General Public License v2.0
368 stars 19 forks source link

Pdf option not available when exporting plot #136

Closed subcomarc closed 1 year ago

subcomarc commented 1 year ago

Hello everyone. First of all thank you for the great package. I'm using VScode with httpgd to preview my plots in R. All my machines run R on Ubuntu 20.04 and have fairly identical setups, as vscode is synchronized across computers and installs.

The problem: for whatever reason, one of the machines (HP laptop Elitebook 850 G8) just doesn't allow me to export the plots in PDF format (only svg). The "PDF" option does not even show up in the rollout "Export" menu.

Thanks

nx10 commented 1 year ago

Thanks!

In that case you are most likely missing Cairo, using Ubuntu you can install it with sudo apt install libcairo2-dev. After that you have to re-install httpgd so it can be compiled with it.

Let me know if this works for you!

subcomarc commented 1 year ago

Ah! Worked like a charm. I had launched the cairo install at setup, but clearly it had failed and I was not aware. Now that cairo is properly installed it works as intended. Thanks a lot!!