Bug 90039 - Calc diagrams should be exportable as PDF from the “Export as Graphic” context menu command
Summary: Calc diagrams should be exportable as PDF from the “Export as Graphic” contex...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Chart (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: filter:pdf, needsDevEval
Depends on:
Blocks: PDF-Export
  Show dependency treegraph
 
Reported: 2015-03-16 14:46 UTC by Robert Pollak
Modified: 2023-03-31 02:53 UTC (History)
8 users (show)

See Also:
Crash report or crash signature:


Attachments
exisitng grpahics formats available to export charts using "Save as Image" dialog (31.68 KB, image/png)
2015-03-22 18:02 UTC, V Stuart Foote
Details
ScreenCast on Libreoffice 7 Linux Version (1.10 MB, video/x-matroska)
2020-07-28 07:08 UTC, sawakaze
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Pollak 2015-03-16 14:46:51 UTC
I am using LO 4.3.62 on Windows 7.

In Calc, when I want to save a diagram as image, I get a lot of formats offered, but PDF is not among them.

My workaround in order to process the image with pdfLaTeX: exporting as eps, then converting to pdf on the fly, via `\usepackage{epstopdf}`.
Comment 1 raal 2015-03-16 15:03:20 UTC
Hello,
you can do it now:
Select the chart -> Export as PDF -> Selection
Comment 2 Robert Pollak 2015-03-17 07:59:36 UTC
Thank you. Maybe the diagram context menu should also have "Export as PDF" next to "Export as Graphic"?
Comment 3 Adolfo Jayme Barrientos 2015-03-17 11:20:27 UTC
(In reply to Robert Pollak from comment #2)
> Thank you. Maybe the diagram context menu should also have "Export as PDF"
> next to "Export as Graphic"?

I would rather just add the missing “PDF” option to the list of formats in the Export dialog that appears when clicking “Export as Graphic”.
Comment 4 Robert Pollak 2015-03-17 12:08:03 UTC
(In reply to Adolfo Jayme from comment #3)
In that case the PDF settings should be set to lossless compression and no bookmarks.
Comment 5 V Stuart Foote 2015-03-22 18:02:35 UTC
Created attachment 114248 [details]
exisitng grpahics formats available to export charts using "Save as Image" dialog

(In reply to Adolfo Jayme from comment #3)
> I would rather just add the missing “PDF” option to the list of formats in
> the Export dialog that appears when clicking “Export as Graphic”.

Unfortunately, PDF is not handled as a graphic filter. Adding PDF as an option to the export filter list would be a kludge.

Would probably be cleaner to go ahead and reuse the existing Export as PDF dialog in its own export chart menu item.

=-refs-=

http://opengrok.libreoffice.org/xref/core/svx/source/core/graphichelper.cxx#205
http://opengrok.libreoffice.org/xref/core/vcl/source/filter/graphicfilter.cxx
Comment 6 Adolfo Jayme Barrientos 2015-03-22 21:30:46 UTC
(In reply to V Stuart Foote from comment #5)
> Unfortunately, PDF is not handled as a graphic filter. Adding PDF as an
> option to the export filter list would be a kludge.

Sigh, I suspected it. Well, then I guess we should follow a menu structure similar to this:

Export This Chart > As Raster/Vector Image…
                    As PDF…
Comment 7 Robinson Tryon (qubit) 2015-12-13 11:21:13 UTC Comment hidden (obsolete)
Comment 8 QA Administrators 2017-10-30 08:32:18 UTC Comment hidden (obsolete)
Comment 9 Robert Pollak 2017-10-30 09:15:26 UTC
I now see PDF listed among the possible types in the "Save as Image" dialog, but it creates an empty file.

Version: 5.4.2.2 (x64)
Build-ID: 22b09f6418e8c2d508a9eaf86b2399209b0990f4
CPU-Threads: 8; Betriebssystem:Windows 6.1; UI-Render: Standard; 
Gebietsschema: en-US (de_AT); Calc: group
Comment 10 QA Administrators 2018-10-31 03:53:16 UTC Comment hidden (obsolete)
Comment 11 Robert Pollak 2018-11-02 00:14:16 UTC
I still see that PDF is listed among the possible types in the "Save as Image" dialog, but it creates an empty file.

Version: 6.0.6.2
Build-ID: 1:6.0.6-0ubuntu0.18.04.1
CPU-Threads: 2; BS: Linux 4.15; UI-Render: Standard; VCL: gtk3; 
Gebietsschema: de-AT (de_AT.UTF-8); Calc: group
Comment 12 QA Administrators 2019-11-03 03:31:10 UTC Comment hidden (obsolete)
Comment 13 Robert Pollak 2019-11-04 10:07:58 UTC
I still see that PDF is listed among the possible types in the "Save as Image" dialog, but it creates an empty file.

Version: 6.3.2.2
Build ID: 1:6.3.2-0ubuntu0.18.04.1~lo1
CPU threads: 8; OS: Linux 4.15; UI render: default; VCL: gtk3; 
Locale: en-US (en_DK.utf8); UI-Language: en-US
Calc: threaded
Comment 14 sawakaze 2020-07-28 07:08:29 UTC
Created attachment 163667 [details]
ScreenCast on Libreoffice 7 Linux Version

I reproduce this.

Version: 7.1.0.0.alpha0+
Build ID: <buildversion>
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3
Locale: ja-JP (ja_JP.UTF-8); UI: en-US
TinderBox: Linux-rpm_deb-x86_64@86-TDF, Branch:master, Time: 2020-07-27_15:39:15
Calc: threaded

OS Linux Mint 20

Attachment is reproduce video.
Comment 15 sawakaze 2020-07-28 07:11:58 UTC
Change importance

medium minor -> medium normal

i think this bug is important.
Comment 16 Regis Perdreau 2021-12-21 10:37:14 UTC
Still here in 7.2.2.2.... need propably a decision, improve this export dialog or user has to use the ordinary pdf file export menu.
Comment 17 Regis Perdreau 2021-12-27 09:30:03 UTC
If no possibility to fix, i suggest to remove unsupported pdf format here.
Comment 18 Aron Budea 2021-12-28 08:14:58 UTC
(In reply to Robert Pollak from comment #9)
> I now see PDF listed among the possible types in the "Save as Image" dialog,
> but it creates an empty file.
The PDF entry in "Save as Image" was added with the following commit (probably a generic code not taking the deficiency with chart->PDF export into account):

https://cgit.freedesktop.org/libreoffice/core/commit/?id=7d76bb251e0c88ff17282a33b801a5d17a434af5
author		Miklos Vajna <vmiklos@collabora.co.uk>	2016-06-24 13:00:46 +0200
committer	Miklos Vajna <vmiklos@collabora.co.uk>	2016-06-24 11:51:01 +0000

vcl: add graphic export-as-pdf filter
Comment 19 Miklos Vajna 2022-01-06 12:56:07 UTC
https://cgit.freedesktop.org/libreoffice/core/commit/?id=77d2bbaa18e0be5347d7bd7167b245264789e0a4 sc export chart as graphic: handle PDF

This fixes the menu item to produce a pdf containing just the chart, instead of a 0 byte pdf. I'm not sure if the bug should be closed or not. One can argue that the perfect output would be a pdf file with a single page, and the size of that page would be just the chart and nothing else -- similar to the SVG output.

The current output is still a PDF export of the document -- just the content is limited to the chart, i.e. the page size is typically A4.
Comment 20 Andreas Gösele 2023-03-31 02:53:41 UTC
As long it is an export of a full page (or of even two pages) instead of the image (like for svg or eps) the option shouldn't be offered under "export image" as it is misleading.