1

I want to export a pdf of a LibrOffice Calc table, but would like that the pdf output has the same size as my table. Imagine I only have text in cells A2:B4. How can I make sure that the pdf output is a tiny pdf that only contains those cells, instead of being of dimension A4, or letter etc?

Obviously, I could do this manually, going to Format -> Page and selecting the width and height this is only contains my tiny table, but that this very cumbersome! Is there any automatic method?

I used Format -> Print Range -> Define, and looked also at How to scale a long LibreOffice Calc sheet to fit on two pages when exporting to PDF? and how-to-generate-pdf-from-a-libreoffice-calc-sheet-fitting-the-page-width but they don't seem to be doing what I want, instead fitting the cells to the document size!?

Thanks!

Matifou
  • 141
  • 2
  • 8

1 Answers1

1

AFAIK you can't do this with a single step. But it's quite easy when using a graphics software as interim stage. The workflow may look as follows:

  1. Select the cell range in calc and copy it to the clipboard;
  2. Open your preferred graphics software (i've tested both Microsoft Paint and GIMP);
  3. Paste the clipboard content.
    • With GIMP, there's an option "Paste as new image", so the resulting pic already has the size of the selected cell range;
    • In MS Paint, you can use the Crop tool to crop the canvas size to the size of the selected content. The pasted cell range is automatically selected immediately after pasting it, so you can directly apply "Crop" without the need to adjust the selection.
  4. Use the graphics software's PDF export feature to create a PDF with just the size of the initially selected cell range.
tohuwawohu
  • 10,303
  • 1
  • 35
  • 63
  • Thanks! I am wondering whether this would not alter the pdf, in particular turning it from a vector-pdf to a simple raster (pdf) image? – Matifou Oct 26 '20 at 16:35
  • Oh - yes, this is true. You'll in fact receive a simple raster pdf, not a vector PDF (or text PDF). I've just tried to use inkscape as "interim stage" (tzo get a vector image), but sadly, the result is useless. So, my approach is limited in that regard :-( – tohuwawohu Oct 26 '20 at 18:40
  • @Matifou: There may be other approaches - for example, LO Draw is able to handle SCG., and you can paste content from Calc to Draw, So maybe you can use this combination to receive a vector PDF based on a Calc cell selection. – tohuwawohu Oct 26 '20 at 18:46