Export as PDF image instead of PDF page in draw

When using “File > Export” and saving as an EPS, PNG or other image format with the “selection” checkbox ticked, the exported image will automatically be cropped to the size of the selection.

I am however creating images for use in PDF-Latex and would therefore prefer to export as an PDF image. However, when exporting as PDF, the “selection” checkbox changes its behaviour and while the output contains only the selection, it will not be cropped. In order to obtain a cropped PDF image, workarounds have to be employed such as manually changing the page size to fit the image, exporting as EPS and converting to PDF, or cropping the PDF with a third-party tool. While viable, such workarounds remain undesirable. Especially the EPS option, which combined with the “epstopdf” latex package seems convenient at first, fails due to the lack of support for some features in the EPS format (e.g. transparency).

Before filing a bug report / feature request I wanted to make sure that I’m not just missing an option to optain the intended behaviour.

For illustration:

   ODG File          PDF Export        Wanted Export
  +--------------+  +--------------+  +-----+
  |              |  |              |  |IMAGE|
  |              |  |              |  |//\\/|
  |              |  |              |  +-----+
  |   IMAGE      |  |   IMAGE      |
  |   //\\/      |  |   //\\/      |
  |              |  |              |
  |              |  |              |
  |              |  |              |
  +--------------+  +--------------+

Libreoffice version: 4.4.0.3 (Windows 8 64 bit)

1 Like

I have exactly the same “issue” with Libreoffice 4.3.7.2 (Linux 64 bit). I also change the page setting (but it’s a bit boring) or export as svg and open it with Inkscape then resize/export in PDF (by the way there is also a strange thing in Inkscape that way: I can’t enlarge the figure more than its original size, otherwise it turns white…)

I have the same problem. This is so frustrating!! Can somebody please help?

Same here!!! Its very annoying to have to crop a pdf page only because libreoffice draw cant export only the image. By the way, the workaround that I’m using is to crop using the BRISS software.

http://briss.sourceforge.net/

Another workaround on linux is pdfcrop infile.pdf outfile.pdf. However, it is very annoying, as with all other formats, checking the “selection” check mark gets rid of the page background. I think a bug report should be filed.

FYI, here a bash script that crops all pdfs in a given directory to remove excessive whitespace:

#!/bin/sh
#Script to crop all pdf files in folder.

x=1; 
for i in *pdf; 
do pdfcrop $i $i;
done

I have this issue in LibreOffice Draw 7.2.4.1.

My workaround in Ubuntu is cropping the PDF afterwards with:

$ pdfcrop --margin 1 my-file-to-crop.pdf

PDF images?

I have never heard of PDF being an image format. Do you mean produce an export in PDF format or PDF Image format?

You say that exporting to PNG, which is an image format, results in the desired effect with regards to cropping.
What you and the commentators are experiencing sounds to me like a document border. Has everyone tried changing the document page settings, specifically the border settings? Try setting border to 0 (zero).