Bug 30944 - Allow exporting a single chart (or other object) to different formats (PDF, SVG, PNG, JPG), target document with object size
Summary: Allow exporting a single chart (or other object) to different formats (PDF, S...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard: VOTE target:4.0.0
Keywords:
: 31258 34606 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-10-17 11:35 UTC by freeWorld2050
Modified: 2016-11-11 17:56 UTC (History)
8 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description freeWorld2050 2010-10-17 11:35:05 UTC
I would like to know, if it difficult to implement exporting a chart from calc to a pdf directly. Every bigger spreadsheet software allows to save a chart directly in a pdf or an graphics format. A vector format should be definitely choice for that. I bet in a poll, many many users would vote for this and appreciate this function much to have. Otherwise one has to do several steps to get just the chart out of the hole spreadsheet pdf by installing other software, manipulating the pdf and cropping it. For good Workflow and saving lots of maybe difficult steps for some users, this function would be awesome and be another one that is/should be standard in a spreadsheet software. On productivity should be deep focus in general from my point of view, to become THE preferable office-suite for all.

Greetings
Comment 1 Michael Meeks 2010-10-18 07:09:42 UTC
This would make a great slightly more advanced easy hack [ thanks for the suggestion ].

I guess starting in writer, we should poke:

    sw/source/ui/app/mn.src /FN_FORMAT_FRAME_DLG/
and
    sw/source/ui/shells/frmsh.cxx /case FN_FORMAT_FRAME_DLG:/

and add another menu entry there 'Export as PDF' perhaps; add an ID for it, and handle it in the code.

Then we need to work out how to extract and/or render the embedded object nicely. To do that, I would tend to read back from the existing File->export code to see how that integrates with the document.

HTH.
Comment 2 Cédric Bosdonnat 2010-11-02 02:40:29 UTC
*** Bug 31258 has been marked as a duplicate of this bug. ***
Comment 3 FM Corporation 2011-06-27 13:56:00 UTC
Is this being considered?  The ability to print a chart directly to a printer is the top complaint I get from (real) users about OpenOffice/LibreOffice.

Thanks
Comment 4 Björn Michaelsen 2011-12-23 11:34:08 UTC Comment hidden (obsolete)
Comment 5 sasha.libreoffice 2012-02-22 07:14:45 UTC
in 3.6.0 master not yet implemented, change status to New
Comment 6 Rainer Bielefeld Retired 2012-03-25 01:40:33 UTC
Chart export to PDF is no problem at all (menu 'File -> Export as PDF -> Selection', but a context menu might ease that.

Here we are talking about a request to get all export features we have in DRAW after copy/paste a chart to DRAW?
Comment 7 freeWorld2050 2012-03-25 05:46:27 UTC
(In reply to comment #6)
> Chart export to PDF is no problem at all (menu 'File -> Export as PDF ->
> Selection', but a context menu might ease that.
> 
> Here we are talking about a request to get all export features we have in DRAW
> after copy/paste a chart to DRAW?

Hi,

thanks Rainer for thinking about it, but i think you do not get the point here,
or i can not find the already implemented solution, still.
Let me try to explain my detailed post (first one) in other compressed words, maybe then it is better understandable.

1. chart export is possible, as you said with File -> ..., and with the PDF export button (which only allows to export the whole sheet).
BUT there is no possible function, where ever (context menu, by right click on the chart would be of course perfect), that allows you just out of calc to export JUST the graph object, AND having it in a perfectly cropped pdf. 


2. With DRAW, this work flow need, was not possible, for me at least. Please tell me if am wrong with that, than we would have a compromise solution here at least. Furthermore a point is that this request is/was already duplicated, and libreoffice would rather be last to provide this feature. If anybody is able to do that, then he should please do it, because some people would surely be happy about it.


In general, thanks to all contributors who made libreoffice much nicer in this short time, just more and more lovely. But there are still a few features to do, to replace the sad big player completely. Maybe this is not the most important of these features, but many small nice parts make the wounderful big image. 


Greetings,
FreeWorld2050
Comment 8 Rainer Bielefeld Retired 2012-03-25 07:22:51 UTC
I'm afraid we have a bunch of bugs, inconsistencies, imprecise help texts and and not existing features here. Some of these problems have been already reported, some not, I will do some further research next days


For other needs (for example export to other formats like png, svg, ... separat3e bugs will be required.

@freeWorld2050:
Can we summarize your problem as following?

Current Situation:
PDF export of a selected chart will export (only) the chart contents on PDF page, size as selected for the sheet and at the position chart has on the page in the sheet.

Desired Feature:
PDF export of a selected chart will export (only) the chart contents on PDF page, size of the page = chart dimensions.
Comment 9 freeWorld2050 2012-03-25 07:37:26 UTC
(In reply to comment #8)

> @freeWorld2050:
> Can we summarize your problem as following?
> 
> Current Situation:
> PDF export of a selected chart will export (only) the chart contents on PDF
> page, size as selected for the sheet and at the position chart has on the page
> in the sheet.
> 
> Desired Feature:
> PDF export of a selected chart will export (only) the chart contents on PDF
> page, size of the page = chart dimensions.

Hi Rainer,

thanks for the fast consideration. As a short answer i would say, yes, we can summarize it so. By a broader answer, this solution or representation, is just a subset of the superset i tried to explain before. But then further, the short answer can very easily be extended by options, as e.g a definition of a context-menu entry.
Comment 10 gleppert 2012-04-08 10:40:19 UTC
Isn't this request for enhancement related to bug 34606? The other one is about exporting charts in svg, png....
Comment 11 Rainer Bielefeld Retired 2012-04-08 11:02:28 UTC
@gleppert
Yes, I believe both reports are concerning the same desire.
Comment 12 Rainer Bielefeld Retired 2012-04-08 11:04:02 UTC
*** Bug 34606 has been marked as a duplicate of this bug. ***
Comment 13 Stéphane Guillou (stragu) 2012-04-18 08:59:43 UTC
This would be a great enhancement for next versions.

I adapted the title of the bug so the duplicates are actually included in this one.

It is possible to copy a chart from Calc to Draw and then export it from Draw into a great selection of different formats, but this is a workaround that breaks the workflow.
As Calc is the main component used for creating charts, some essential image formats really should be available directly in the "export" options (a good selection could be JPG, PNG, SVG, PDF, BMP and GIF).
Comment 14 Rainer Bielefeld Retired 2012-04-18 22:23:34 UTC
Please consider:
<http://wiki.documentfoundation.org/BugReport_Details#Version>
Comment 15 Stéphane Guillou (stragu) 2012-04-18 23:38:27 UTC
(In reply to comment #14)
> Please consider:
> <http://wiki.documentfoundation.org/BugReport_Details#Version>

Really sorry about that, I had no idea. Cheers for fixing it.
Comment 16 Stéphane Guillou (stragu) 2012-08-09 05:19:12 UTC
Dear all

I added this bug in the "Votes for enhancement" page on the LibreOffice wiki:
https://wiki.documentfoundation.org/Vote_for_Enhancement#Bug_30944_-_Allow_exporting_a_single_chart_.28or_other_object.29_to_different_formats_.28PDF.2C_SVG.2C_PNG.2C_JPG.29.2C_target_document_with_object_size

Please vote if you feel this should be implemented in priority.

Also, I wanted to point out that there are two question on Ask LibreOffice related to this particular issue:
http://ask.libreoffice.org/question/37/how-do-i-export-a-chart-in-an-image-format-from/
and
http://ask.libreoffice.org/question/2142/save-a-chartgraph-as-image-in-calc/

Cheers!
Comment 17 Horst 2012-08-27 15:19:48 UTC
# This and more important direct printing of charts -~~~~
Comment 18 Horst 2012-09-04 00:36:41 UTC
=== [https://bugs.freedesktop.org/show_bug.cgi?id=30944 Bug 30944] - Template for new entries in this list === 
'''I agree with that request '''
#This would be nice and also direct printing of charts--~~~~
'''I disagree with that request '''
#
Comment 19 Stéphane Guillou (stragu) 2012-09-04 12:37:21 UTC
Horst, do you want to vote on this page: https://wiki.documentfoundation.org/Vote_for_Enhancement#Bug_30944_-_Allow_exporting_a_single_chart_.28or_other_object.29_to_different_formats_.28PDF.2C_SVG.2C_PNG.2C_JPG.29.2C_target_document_with_object_size

I don't understand how those two pages are linked, but your vote doesn't appear on the TDF wiki...
Comment 20 Horst 2012-09-04 16:17:11 UTC
=== [https://bugs.freedesktop.org/show_bug.cgi?id=30944 Bug 30944] - Template
for new entries in this list === 
'''I agree with that request '''
#This would be nice and also direct printing of charts--~~~~
'''I disagree with that request '''
#
Comment 21 Horst 2012-09-04 16:21:28 UTC
YES I want to vote on this bug but I seem to be too stupid to do it right.
Comment 22 Not Assigned 2012-10-08 05:52:45 UTC
Tomaž Vajngerl committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=cbb0babb679338ddc9910bbdb2676128d0c236f7

fdo#30944 Add popup menu function to charts to export them as a graphic



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 23 Bartosz 2013-01-02 14:22:07 UTC
This bug was solved in master
Comment 24 Gerry 2013-02-23 20:14:34 UTC
Bug 60137 was created as a follow-up enhancement request for this bug, because the fix for this bug allows the export to raster image formats, but not vector formats such as SVG, PDF,...
Comment 25 Martin Trautmann 2014-02-08 19:48:23 UTC
When I try to export a chart from calc as SVG, I do obtain an empty file (size 0). However, when I do copy the chart to draw and do export that as SVG, the result is rather reasonable.
Comment 26 Stéphane Guillou (stragu) 2014-02-09 00:03:43 UTC
Hi Martin

The problem you describe is reported in Bug 65228, which is a verified duplicate of the (now closed) Bug 60137, which is why I am reverting your changes here.

Do you use the 4.0 branch?
If so, you should probably move to 4.1.4 (or 4.1.5 which should be out in just a couple of days) - I just tried it again, and SVG export of single charts works very well. The 4.0 branch will not see anymore bug-fixing versions.

Cheers