Export a LibreOffice Calc Chart to PDF witouth margins and empty space

S12000 picture S12000 · Dec 19, 2012 · Viewed 8.7k times · Source

My aim is to export a LibreOffice Calc chart in PDF in order to use it with LaTex later.

I made a 16cm width and 9cm high graph. I would like to get a PDF without border and lot of empty space.

So I went to : file -> export as PDF-> selection...

However even with the selection option, I get a graph in a small pat of a A4 page with margins and empty space...

Image 1/3

Image 2/3

enter image description here

Answer

A5C1D2H2I1M1N2O1R2T1 picture A5C1D2H2I1M1N2O1R2T1 · Dec 20, 2012

Good question, since the settings are very misleading.

To my knowledge, it is not possible to directly save to pdf as you are hoping to do. However, there is a bit of a workaround that will still let you embed a vector graphs from Open/LibreOffice in your LaTeX documents:

  1. Select and copy (ctrl+c) your graph.
  2. Open LibreOffice Draw
  3. Paste your graph from Calc into Draw
  4. Select the graph, and go to File --> Export, select EPS from the list of formats, and make sure the selection box is checked:

enter image description here

I haven't tried the other formats, but EPS should play nicely with your LaTeX document, or you can easily convert your EPS to PDF and insert them.

Here is a side by side comparison of trying the export setting with PDF (left--ends up centered on the page) and EPS (right--exports just the graph).

enter image description here