Bug 48015 - Option to export all pages / slides from Drawing / Presentation modules as bitmap (PNG, JPG...)
Summary: Option to export all pages / slides from Drawing / Presentation modules as bi...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Draw (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: high enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: topicUI
: 67614 67942 81825 105359 109071 118804 130084 132401 137007 154176 157993 160574 (view as bug list)
Depends on:
Blocks: Draw-File-Handling Graphics-Export
  Show dependency treegraph
 
Reported: 2012-03-28 20:00 UTC by skiani
Modified: 2026-06-01 22:46 UTC (History)
27 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 skiani 2012-03-28 20:00:52 UTC
Currently if I have a 10 sheet drawing or 10 sheet presentation and I want to export all the sheets as png files I have to export one sheet at a time. For each sheet I have to enter the resolution and page size. It is very tedious.

Enhancement: Add ability to select slide to the bitmap export dialog (png, bmp, jpg, etc) similar to how you select pages in the print dialog. Default could be "Selection" which is similar functionality to what is current. If you select more than one slide it will automatically append the slide number to the filename. For example if you type in slides 2,7,8-12,14 and you enter the filename of "My Exported Slides" when you export a png, it will output the followings:

My Exported Slides02.png
My Exported Slides07.png
My Exported Slides08.png
My Exported Slides08.png
My Exported Slides10.png
My Exported Slides11.png
My Exported Slides12.png
My Exported Slides14.png
Comment 1 Regina Henschel 2012-03-29 14:38:07 UTC
Until someone will work on this enhancement request, you can use export the html. This does not only generate the html-files, but generate a picture from each slide. You can choose, whether it is png or jpg. They are simple named img0.png, img1.png,...
Comment 2 Hashem Masoud 2012-10-04 07:18:31 UTC
(In reply to comment #1)
> Until someone will work on this enhancement request, you can use export the
> html. This does not only generate the html-files, but generate a picture
> from each slide. You can choose, whether it is png or jpg. They are simple
> named img0.png, img1.png,...

Reporter: Does this solution satisfy your needs?
Comment 3 QA Administrators 2013-05-29 23:05:00 UTC Comment hidden (obsolete)
Comment 4 skiani 2013-06-12 02:08:23 UTC
No, close but this is just not the same thing. I need 300dpi export of every page to make the legal documents requirements. html has too limited control of export format. Right now only way to export is with controlled size and resolution is one page at a time. If document is 50 pages that is very tedious.
Comment 5 QA Administrators 2013-07-08 21:22:52 UTC Comment hidden (obsolete)
Comment 6 skiani 2013-07-09 01:53:25 UTC
Not certain why closing as "invalid" but here is information requested. Now if developers are rejecting the enhancement then I suppose that would need to be set to "Wontfix". for now I will set to unconfirmed as the instructions recommend. Here are responses to questions for reopening:

> a) Provide details of your system including your operating system and the
> latest version of LibreOffice that you have confirmed the bug to be present

Affects all operating systems and versions up to 4.0.3
 
> b) Provide easy to reproduce steps – the simpler the better

1. Open or create a drawing with many pages.
2. Select page 1.
3. Select File/Export
4. Set file type to .png
5. Set file name to something like "page1.png"
6. Set the options for page size and resolution (this will reset everytime).
7. Repeat steps 2 to 6 for every page.

> c) Provide any test case(s) which will help us confirm the problem

Any drawing with multiple pages, best test case need >10 pages. I often deal with >50 sheet drawing.
 
> d) Provide screenshots of the problem if you think it might help

Would not help

> e) Read all comments and provide any requested information

Biggest comment was if exporting as html is acceptable work around as that creates thumbnails of all the pages. This does not however allow you to set the page size and resolution as you can exporting one page at a time. Other work around is export one page at a time which is very tedious and can take a great deal of time if you have lots of sheets/pages in your drawing.

The other comment as "NeedsInfo" warning which I provide. If not clear and I can try to post a video demonstrating out tedious it is to manually exporting one sheet at a time.
Comment 7 A (Andy) 2014-03-22 09:59:31 UTC
changed to NEW: seems to be an interesting improvement proposal
Comment 8 Florian Reisinger 2014-03-22 11:21:09 UTC
Working with: http://extensions.libreoffice.org/extension-center/export-as-images
Comment 9 Heiko Tietze 2016-06-21 12:04:45 UTC
Sounds like an EASYHACK.
Comment 10 Heiko Tietze 2016-06-28 15:10:36 UTC Comment hidden (no-value)
Comment 11 Joel Madero 2016-06-28 15:56:44 UTC Comment hidden (no-value)
Comment 12 Heiko Tietze 2016-06-28 20:53:42 UTC Comment hidden (no-value)
Comment 13 Joel Madero 2016-06-28 21:04:09 UTC Comment hidden (no-value)
Comment 14 jani 2016-06-28 21:38:19 UTC Comment hidden (no-value)
Comment 15 Joel Madero 2016-06-28 22:56:56 UTC Comment hidden (no-value)
Comment 16 Heiko Tietze 2016-06-29 08:17:40 UTC Comment hidden (no-value)
Comment 17 jani 2016-09-14 11:53:17 UTC
No need to add needsDevlEval for easyhacks (but ok it does not hurt).

need code pointer, difficulty<foo>
Comment 18 jani 2016-09-15 15:25:51 UTC
Adding the menu entry is an easyHack, but making the code loop is non-trivial.
Comment 19 Xisco Faulí 2016-09-15 15:26:51 UTC
Removing keyword 'needsDevEval' as this bug is an easyHack
Comment 20 Roman Kuznetsov 2018-06-16 15:29:03 UTC
there is an extension "Export as image" https://extensions.libreoffice.org/extensions/export-as-images 
try it
Comment 21 Xisco Faulí 2020-03-09 13:28:14 UTC
Please add keyword 'needsUXEval' and CC 'libreoffice-ux-advise@lists.freedesktop.org' if input from UX is needed.
Comment 22 Mike Kaganski 2023-09-13 07:45:03 UTC
*** Bug 137007 has been marked as a duplicate of this bug. ***
Comment 23 Mike Kaganski 2023-09-13 08:05:28 UTC
*** Bug 67614 has been marked as a duplicate of this bug. ***
Comment 24 Mike Kaganski 2023-09-13 08:05:50 UTC
*** Bug 67942 has been marked as a duplicate of this bug. ***
Comment 25 Mike Kaganski 2023-09-13 08:05:53 UTC
*** Bug 81825 has been marked as a duplicate of this bug. ***
Comment 26 Mike Kaganski 2023-09-13 08:05:58 UTC Comment hidden (obsolete)
Comment 27 Mike Kaganski 2023-09-13 08:06:02 UTC
*** Bug 105359 has been marked as a duplicate of this bug. ***
Comment 28 Mike Kaganski 2023-09-13 08:06:06 UTC
*** Bug 109071 has been marked as a duplicate of this bug. ***
Comment 29 Mike Kaganski 2023-09-13 08:06:09 UTC
*** Bug 118804 has been marked as a duplicate of this bug. ***
Comment 30 Mike Kaganski 2023-09-13 08:06:13 UTC
*** Bug 130084 has been marked as a duplicate of this bug. ***
Comment 31 Mike Kaganski 2023-09-13 08:06:18 UTC
*** Bug 132401 has been marked as a duplicate of this bug. ***
Comment 32 Mike Kaganski 2023-09-13 08:06:23 UTC
*** Bug 154176 has been marked as a duplicate of this bug. ***
Comment 33 stragu 2023-10-12 11:05:06 UTC
Let's set the priority to "high" given the 10 duplicates, and the fact that the HTML export wizard is being deprecated in 24.2 and it is currently used as a way to export all slides as images at once (see e.g. comment 1 and bug 157440 and the article https://www.libreofficehelp.com/export-libreoffice-impress-slides-images/).
Comment 34 stragu 2023-10-31 07:40:53 UTC
*** Bug 157993 has been marked as a duplicate of this bug. ***
Comment 35 V Stuart Foote 2024-04-17 13:31:11 UTC
(In reply to Stéphane Guillou (stragu) from comment #33)
> Let's set the priority to "high" given the 10 duplicates, and the fact that
> the HTML export wizard is being deprecated in 24.2 and it is currently used
> as a way to export all slides as images at once (see e.g. comment 1 and bug
> 157440 and the article
> https://www.libreofficehelp.com/export-libreoffice-impress-slides-images/).

But as noted comment 20 The "Export As Images" extension [1] already provides this functionality of exporting an entire sd Draw or Impress document one image at a time (though its SVG export is wonky).

Alternatively, the Impress Export to SVG generates a dated SMIL 2.0 compliant [2] slide show of SVG images. But as for bug 117708 the feature needs rework. Both in its UI, and compliance with more current SMIL 3.0

While the Draw Export... to SVG munges a multi-page drawing selection into a single image (similar to the Extension's handling, likely same export filter).

=-ref-=
[1] https://extensions.libreoffice.org/en/extensions/show/export-as-images
[2] https://en.wikipedia.org/wiki/Synchronized_Multimedia_Integration_Language
Comment 36 V Stuart Foote 2024-04-17 13:35:51 UTC
*** Bug 160574 has been marked as a duplicate of this bug. ***
Comment 37 xordevoreaux 2024-04-17 15:41:04 UTC
One thing to keep in mind regarding the "Export As Images" extension is that it is 100% useless for exporting draw pages having transparent backgrounds.  It always provides white backgrounds regardless.
Comment 38 V Stuart Foote 2024-04-17 16:22:23 UTC
(In reply to xordevoreaux from comment #37)
> One thing to keep in mind regarding the "Export As Images" extension is that
> it is 100% useless for exporting draw pages having transparent backgrounds. 
> It always provides white backgrounds regardless.

No, I think it depends on the export format chosen, e.g. BMP looks to keep the transparent bg just fine.
Comment 39 xordevoreaux 2024-04-17 18:27:25 UTC
(In reply to V Stuart Foote from comment #38)
> (In reply to xordevoreaux from comment #37)
> > One thing to keep in mind regarding the "Export As Images" extension is that
> > it is 100% useless for exporting draw pages having transparent backgrounds. 
> > It always provides white backgrounds regardless.
> 
> No, I think it depends on the export format chosen, e.g. BMP looks to keep
> the transparent bg just fine.

And in my use-case scenario, all I will ever export to is PNG.
Comment 40 V Stuart Foote 2024-04-18 13:29:25 UTC
(In reply to xordevoreaux from comment #39)
> 
> And in my use-case scenario, all I will ever export to is PNG.

Sure YMMV, the filters linked to the GraphicExportFilter.idl calls [1] used in the macro extension could use some work.

For now the extension's BMP, TIFF, and JPEG do look to parse the bg transparency color and apply it as a bg color, though they drop any alpha channel for the bitmap. While PNG munges the bg color and drops transparency (though it should support it that I can tell). And GIF does write out transparency but incorrectly. 

So if you just need the colored bitmap image, export to one of the three that include image "translucence" then use an external program to convert the rasters. E.g. ImageMagick's convert to some other format. But yes, alpha channel transparency is not currently well supported in the API.

But the extension provides what OP asks, though with limitations. And a native export dialog (to include alpha channel transparency and improved SVG handling) still is needed.

=-ref-=

[1] https://api.libreoffice.org/docs/idl/ref/interfacecom_1_1sun_1_1star_1_1drawing_1_1XGraphicExportFilter.html#a6aa9321da133d8081166f37c910c11c2
Comment 41 Lobaluna 2025-01-26 23:08:55 UTC Comment hidden (off-topic)
Comment 42 Mike Kaganski 2025-01-27 09:13:45 UTC Comment hidden (off-topic)
Comment 43 eddie8+DF 2025-01-27 09:33:49 UTC Comment hidden (off-topic)
Comment 44 Mike Kaganski 2025-01-27 10:37:32 UTC Comment hidden (off-topic)
Comment 45 xordevoreaux 2026-03-29 22:23:59 UTC
The "Export As Images" extension is now dead in the water. Simply selecting the extension from the drop-down from the menu produces the following basic error:


Basic Runtime Error
An exception occurred
Type: com.sun.star.container.NoSuchElementException
Message:ExportImages

Dies on line 87:
oLibContainer.loadLibrary( sLibName)


Please work multi-page export functionality from Draw as a standard function. I have 40 drawings in one draw program that I wish to export. Manually is tedious and export as HTML makes more work post-export than it's worth.
Comment 46 Heiko Tietze 2026-03-30 07:55:59 UTC
(In reply to xordevoreaux from comment #45)
> The "Export As Images" extension is now dead in the water.
Mind to report on the extension site?
Comment 47 xordevoreaux 2026-03-30 23:13:33 UTC
Actually, I do mind. Keeping this broken, ancient extension limping along is not the solution. A practical, complete, error-free, in-house implementation programmed directly into Draw is the solution. That is the goal. That is what you should be working toward, not hoping the author of the original extension is even alive much less caring to update old code. Bring it in house and call it a day.
Comment 48 V Stuart Foote 2026-03-31 01:47:06 UTC
@Neil, @Mike K.

With a 26.2.2 or a 26.8.0 install, I am getting the error noted when the 'Export as Images' extension is loaded and its Basic macros are run for the export. JPEG works, but PNG and BMP were choking with this error:

   Basic runtime error
   Variable not defined.

Don't believe Sergii Kuznietsov remains active.

Since past consensus has been to keep this as an Extension might this be a good feature to consider reimplementing and distributing as an embedded extension, done while bringing the graphics handling and filters current?

And maybe good one for port to Python?
Comment 49 Neil Roberts 2026-03-31 07:44:54 UTC
For what it’s worth, the extension seems to work fine for me. I was able to export a presentation with multiple slides to jpg, png and bmp.

I agree it seems like it would be a good idea to add this functionality directly to LibreOffice seeing as there are so many duplicates of the bug report. The extension is GPL so presumably it would have to be a “clean room” implementation instead of a port to make it MPL.

On the other hand I don’t think that adding it to the LO codebase will magically mean that there will be people to work on it and maintain it. If contributors that work on parts of the core code disappear then it is just as much a problem as if an extension developer disappears.
Comment 50 V Stuart Foote 2026-03-31 11:33:16 UTC
I was on Windows builds of 26.2.2 or recent 26.8.0 with the 1.01 build of the extension installed.

Trying to get the PNG export to choke again, now not sure what I'd done that triggered it.

For sure the extensions BMP export is having an issue with its RLE selector. The undefined variable bmpRLB, seems that should be bmpRLE to match its dim?
Comment 51 xordevoreaux 2026-06-01 21:50:30 UTC
For me, on:
Version: 26.2.3.2 (X86_64)
Build ID: 70e089b17412e4cb7773e41413306b17a2328c34
CPU threads: 24; OS: Windows 11 X86_64 (build 26200); UI render: Skia/Raster; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: CL threaded

All I had to do was:
1. create a new draw document
2. immediately select export as images

Boom.

---
Sub ShowDialog()
	
	REM library container
	oLibContainer = DialogLibraries
	REM load the library
	oLibContainer.loadLibrary( sLibName )
	REM get library
	oLib = oLibContainer.getByName( sLibName )
	REM get input stream provider
	oInputStreamProvider = oLib.getByName( sDialogName )
	REM create dialog control
	oDialog = CreateUnoDialog( oInputStreamProvider )
	REM show the dialog
	oDialog.Model.Step = 1
	imgType = "jpg"
	imgColor = true
	bmpExMode = 0
	StopMark = false

	dirText = oDialog.Model.getByName("dirTextField")
	nameText = oDialog.Model.getByName("nameTextField")

	oDialog.getControl("dirTextField").setText(docDir)
	oDialog.getControl("nameTextField").setText(docName)
	
	if oDialog.execute()=1 then
		OK
	else
		StopMark = true
	endif
End Sub

It died on the line:
	oLib = oLibContainer.getByName( sLibName )

Ditto situation when I actually created content prior to export attempt.
Comment 52 Eyal Rozenberg 2026-06-01 22:43:51 UTC
The File > Export... command should export the entire document, in every one of the LO modules. My new bug 172242 was filed due to my surprise at not finding a slide export function anywhere else, and this command actually exporting a single slide.
Comment 53 xordevoreaux 2026-06-01 22:46:20 UTC
@skiani it should be a choice. Some of my documents, no two slides/pages are topically related and I just wish to export that one. Other times, everything is very much topically central and yes in those cases I wish to export the entire document as separate PNG files, one per slide.