Issue 25341 - PDF export with "bounding box" for exported selection
Summary: PDF export with "bounding box" for exported selection
Alias: None
Product: Draw
Classification: Application
Component: ui (show other issues)
Version: OOo 1.1
Hardware: All All
: P3 Trivial with 34 votes (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
Depends on:
Reported: 2004-02-10 18:21 UTC by nick_08150
Modified: 2017-05-20 11:29 UTC (History)
5 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---

fix PDF bounding box (1.31 KB, text/plain)
2006-02-06 15:59 UTC, frank7
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description nick_08150 2004-02-10 18:21:03 UTC

I hope this has not been addressed already, I searched but didn't find this
particular topic.

I'm using OOo Draw frequently for creating figures which I then export either as
pdf or eps to include them in latex files. When I select my drawing (or a part
of it) I have the possiblity to choose between "All", "Range" and "Selection"
under the "Pages" menu in the "PDF Options" window. Choosing "Selection" only
exports the selected parts, as it should be. But the page format in the pdf file
will always be the same as that currently set in the Draw document, even if the
drawing doesn't cover the whole page. So in order to get a cropped pdf output
(like a bounding box in eps, i.e. the page is only as big a the selected items)
I have two (well, at least two) possiblities:
- either export as eps and do a epstopdf under linux. But that yields not the
same quality as direct pdf export
- change the page size of the document so the drawing items do fit exactly on
the page (and then export as pdf)

To make it short: it would be great if there was sort of a "create bounding box"
feature under the pdf export option, so that the page size of the resulting pdf
file fits to the selected/exported drawing entities. This of course would only
apply to the "Selection" export option.

Hope I made myself clear;-)

Many thanks,  Nick.
Comment 1 wolframgarten 2004-02-11 07:51:23 UTC
Reassigned to Bettina.
Comment 2 nick_08150 2004-03-11 09:10:03 UTC

I just wondered when or if you plan to address this issue. Could someone please
drop a short note here whether or not it has a chance to find its way in a release?


Comment 3 nick_08150 2004-12-10 15:37:45 UTC
Hi there,

I'd like to say that I'm a bit disappointed about the response one gets. I fully
understand that you cannot go and implement any new feature requested
immediately, and I don't expect my requests to be accepted in the first place. 
But in two months it's a year I submitted this first and there hasn't even been
a comment by the devs. I must say that this lowers my motivation for reporting
more issues/requests.

Best regards,   Nick.
Comment 4 dominicb 2005-03-06 05:14:28 UTC
This seems to relate to bug #23138 (dates back to December 2003)
Comment 5 nick_08150 2005-04-22 09:32:48 UTC
This is indeed about the same behaviour as described in bug #23138. I didn't see
it as a bug, since one could consider it useful to PDF-export only the selected
items, but keep the paper size. So an additional option, like 'Resize page
format to selection' or, would be good IMHO.

Regards,   Nick.
Comment 6 amilcarlucas 2005-05-02 11:27:29 UTC
Having this feature would help me and 7 other persons at the institute where I  
So please add the "bounding box" information on the PDF file. 
I've read that the PDF specs support about 5 different bounding boxes, 
(graphics, printable, visible ... etc) So please at least set one of them. 
Comment 7 mael_hillereau 2005-05-10 18:45:34 UTC
I don't know why the bounding box feature isn't yet available in Draw. In my
opinion, this is absurd to export PDF keeping the paper size because Draw should
be dedicated to the drawing activity since Writer does well the page layout.

Nevertheless, people who want to print a single drawing can do that from Oo or
from their favorite PDF viewer even if PDF is cropped, and people who want to
insert their drawing into a more large document can import it (e.g. from Writer).

Anyway cropped PDF are very usefull to all pdflatex users and for that reason,
Oo developpers should find a way to provide cropped PDF export.
Comment 8 nick_08150 2005-05-10 21:09:10 UTC
I definitely agree, although I could think of scenarios, where it might be
convenient to keep the paper size. Anyway, IMHO the feature is a must and I
don't understand why it seems to be such an effort to implement it. But as I
pointed out in my initial post, you can always adjust the paper format
temporarily to achieve the effect. That's how I do it for the time being, but
it's of course not a real solution.

Best,   Nick.
Comment 9 mael_hillereau 2005-05-11 13:09:52 UTC
I don't see what kind of scenarii you think of...

In addition, I found that when performing EPS export, Draw inserts a correct
bounding box into the EPS file. Hence BB is already well computed. All the job
is to provide the user with the ability of incorporating the BB or not, which
shouldn't be a tedious task...
Comment 10 amilcarlucas 2005-05-18 17:24:33 UTC
Please vote for this issue. 
Comment 11 frank7 2006-02-06 15:59:33 UTC
Created attachment 33879 [details]
fix PDF bounding box
Comment 12 frank7 2006-02-06 16:07:19 UTC
OO Draw is also my favorite for drawing block diagrams, more comfortable than
Powerpoint and it has direct PDF export. I'm using PDFLATEX, so I need the Latex
images as PDF. It's a bit dissapointing to see the greyed-out option "selection"
in the PDF export dialog. For EPS it works, selecting objects in the sheet, then
export with a correct bounding box. For PDF-export the same option does not work.

But there is a fix for the PDF bounding box:

I modified this script to overwrite the old PDF, see Attachment.
This is a bash-script for the CYGWIN (Unix for Windows)-Environment.
Comment 13 m8hpw 2006-05-08 13:33:08 UTC
I am also frequenlty use Openoffice for creating pdf figures that are used with

I propose here a temporary solution of the Issue. I wrote a OOo macro in order
to save a selection of drawing objects (a selection in a draw document) with the
correct bounding box. The principle of the macro is simple :
- copy the selection in the clipboard
- create a hidden document.
- paste the selection in the document
- change the size of the document in order to fit to the one of the selection
- export the hidden document - save in pdf file
- delete the hidden document.

You can download the macro at
How to install and run the macro are explained in the website

Feel free to give me some feedback.

Comment 14 wumpus 2007-01-07 17:12:46 UTC

I am also looking forward for a solution for this issue as I am using OOdraw 
to create pdfs for pdflatex, and I am very disappointed about that this issue 
still persists, there is even not any response from the developers ! I mean, 
this issue was reported February 2004 with OO 1.1, and now its 2007 and there 
is OO 2.1 ... or is it really _that_ hard to fix ?

M8hpw, I tested your macro, however with OO 2.1 it doesn't work correctly as 
the image is scaled somehow which e.g. results in additional line breaks in 
text boxes.

The "fixpdfbbox" from frank7 works fine so I am currently using this as a 

But nevertheless It would be great to have that issue fixed...

Regards, Wumpus
Comment 15 nick_08150 2007-01-07 17:34:43 UTC
> this issue was reported February 2004 with OO 1.1, and now its 2007 and there
> is OO 2.1 ... or is it really _that_ hard to fix ?

Yes, I cannot understand that either. It seems like merely getting the bounding
boxes right. I dunno ...

> M8hpw, I tested your macro, however with OO 2.1 it doesn't work correctly as 
> the image is scaled somehow which e.g. results in additional line breaks in 
> text boxes.

Hm, works fine for me ( 2.1, Suse10.1). But... if any of the devs read
this: please fix it, it'd be just such a handy feature.

Best,  Nick.
Comment 16 nick_08150 2007-03-28 10:49:33 UTC
I just read the release notes for OOorg 2.2rc4, and there is still no mention of
fixing this bounding box issue. Also the status of the issue (I reported it in
Feb 2004) is still "NBW". Is this a duplicate of another bug/feature request and
hence obsolete, or was it simply forgotten or abandoned?

I think this functionality would be of huge value to a lot of people and
although there currently is an external macro providing the functionality (see
this thread), I think it should be fixed/added as a native feature.

Best,   Nick.
Comment 17 amilcarlucas 2007-03-28 11:17:52 UTC
I agree, it is very strange that this bug has not yet been fixed.
Comment 18 wumpus 2007-03-28 19:22:41 UTC
I wholeheartedly agree, especially since both workarounds are not 100%: the 
macro sometimes messes up the size and adds extra linebreaks (allthough I seem 
to be the only one having this problem), and by using the "fixpdfbb" script 
any transparency gets lost.

So it would be really cool if this one gets finally fixed. I would have liked 
to ask the guys at the CeBit fair in Hannover, but unfortunately this year no 
OO guys where there.
Comment 19 martinweis 2007-06-11 14:37:33 UTC
For the latex-users:
There is a tool called pdfcrop which fixes the bounding box:
which works quite well on the pdf's created by OOo.
It also does not vectorise the fonts, as the epstopdf approach.
Comment 20 wumpus 2007-06-11 16:23:42 UTC

unfortunately this does not work for me: first, gs fails to compute the 
bounding box if directly feed with a pdf - it wants plain ps. While this one 
can be solved easily, the bbox generated does not "match" the image so it is 
clipped and/or moved off the viewable area. and since I am not a "(T)eX-pert" 
I cannot fix it.

Unfortunately, that is - because it does not only keep the text as text, it 
also maintains transparency.

When does it finally get fixed in OO ? Thiz suckz.
Comment 21 wumpus 2007-06-11 16:38:04 UTC
Hi again,

I just noticed that this issue is marked as "feature" - shouldn't it be a 
defect (bug) ? How can this be changed ?

Comment 22 bettina.haberer 2007-06-11 16:52:03 UTC
Hi Matthias, I am not sure, if you have already noticed this one for the PDF
export. Please evaluate. Thank you.
Comment 23 nick_08150 2007-06-11 17:01:06 UTC

I reported this in 2004 (wow, 3 years and 4 months now), and back then it seemed
like a feature that should be implemented to enhance the pdf export
capabilities. Meanwhile, I would also consider this as a bug since IIRC in 2.2 this "export selection" feature is there, but simply doesn't work. I
will change it to DEFECT now.

I really don't want to sound ungrateful or accusing, but if any dev is
aware of this bug, please fix it in the upcoming release. It just seems such a
simple thing.

Thanks and best regards,

Comment 24 wumpus 2007-06-11 17:37:28 UTC

regarding my comments on pdfcrop: this seems to be a ghostscript bug on my 
system (8.15), so it might work for you.

Regards, Wumpus
Comment 25 wumpus 2007-09-25 17:55:45 UTC

now, what is this ? OpenOffice 2.3 is available, with many fixes, also for the 
pdf export.
But what was again *not* fixed ? Yes, the boundingbox problem. I am 
Or do I just have to set some switches I am not aware of ?

Regards, Sven

Comment 26 amilcarlucas 2007-11-20 10:49:56 UTC
Almost four years have passed and no one at sun has even commented on this 
issue :(

It looks like the quality team is not doing their job, why do old bugs not get 
fixed ? Isn't OO supposed to be a stable bug-free product ? Or is it supposed 
to be a over-featured product with tons of old bugs like MS office ?
Comment 27 preese 2008-06-03 00:22:51 UTC
This appears to still be an issue with 2.4. It is clearly a bug because the
behaviour isn't consistent with the other exports.
Comment 28 nick_08150 2008-06-03 08:25:50 UTC
I just realized that under "Version" it still says "OOo 1.1". Might that be a
reason why it is ignored by the devs? Shall I change it to 2.4X to get their
attention? I have the suspicion that simply no-one has this on their stack right
now and doesn't receive any update about the discussion in this thread.

Comment 29 amilcarlucas 2008-06-06 19:06:33 UTC
No, I think the version is describing the first version where the problem 
The OpenOffice developer do know that the bug is still valid for OO 2.4.1 and 
3.0, but they just don't care.

So please vote for this bug. And tell everybody you know to do the same.
Comment 30 wumpus 2008-06-06 20:13:48 UTC
Hi guys,

I think this one is simple too old for being recognized, and , as far as I 
know, it was originally created as "feature request". Why do I think so ?

Because I reported it a second time as issue 88313 
( I got an answer that 
this bug was reproducible, and it was reassigned twice. It was *not* marked a 
duplicate of this one...
As target milestone originally OOo 3.0 was given, however that was lastly 
changed to 3.x. Hopefully just because it was too close to the 3.0 release 
date and not because no one wants to fix it.

Well maybe you can vote for the new bug report to get this done. For me the 
importance deceased because I finished my PhD tests and I definitely know I am 
not going to write anything for a while...

Regards, Sven
Comment 31 matthias.mueller-prove 2009-09-06 10:08:12 UTC
I am no longer officially active on OOo. Please take over.
Comment 32 Marcus 2017-05-20 11:29:50 UTC
Reset assigne to the default "".