Bug 166016 - EPUB output requires metadata to be entered each time
Summary: EPUB output requires metadata to be entered each time
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
25.2.2.2 release
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL: https://en.wikipedia.org/wiki/Average...
Whiteboard:
Keywords:
Depends on:
Blocks: EPUB-Export
  Show dependency treegraph
 
Reported: 2025-04-03 02:37 UTC by Peyton R
Modified: 2025-04-24 18:29 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
Screen shot of Kindle Previewer 3 (119.04 KB, image/png)
2025-04-03 18:24 UTC, Peyton R
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Peyton R 2025-04-03 02:37:58 UTC
Description:
When exporting an EPUB from LibreOffice Writer, the metadata needs to be entered each time. Would prefer that this dialog box remember the previous values.

Steps to Reproduce:
1.File -> Export as -> Export as EPUB...
2. Enter pertinent details.
3. Proceed with export.
4. Do another File -> Export as -> Export as EPUB, notice that the input fields are blank again.

Actual Results:
The metadata fields are blank every time we do an EPUB export, requiring the user to re-enter the values.

Expected Results:
Would be helpful if the metadata fields remembered the previously entered values.


Reproducible: Always


User Profile Reset: No

Additional Info:
Version: 25.2.2.2 (X86_64) / LibreOffice Community
Build ID: 7370d4be9e3cf6031a51beef54ff3bda878e3fac
CPU threads: 6; OS: Windows 11 X86_64 (10.0 build 26100); UI render: Skia/Raster; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: CL threaded
Comment 1 Olivier Hallot 2025-04-03 11:47:17 UTC
I suggest a checkbox in the dialog with "Remember these values" or such.

Values stored in profile or in document? Question for debate.
Comment 2 m_a_riosv 2025-04-03 12:06:32 UTC
I think it only needs to use the data in Menu>File>Properties [Description]

Seems only the Title is got from properties.
Comment 3 Heiko Tietze 2025-04-03 13:47:57 UTC
We would have to distinguish between reading the metadata and editing. Only the latter should be saved, if at all. Wonder if this might become a privacy issue.
Comment 4 Peyton R 2025-04-03 18:20:39 UTC
Thankyou for considering this enhancement request.

Some of us LibreOffice users are authors who write under one or more pseudonyms. We need the ability to set the title, author, cover image, etc separately for each document.

One of the responses mentioned File->Properties, so I went to look at mine. All Description fields are blank. I suspect most Writer users never look in File -> Properties. Also, there is no 'Author' field in the Description tab.

If we begin another book by starting with the current ODT file (which we would do because all the font styles, page styles, header styles, margins, etc. would stay the same) we still need to change at least the document title, (possibly) author, cover image, and perhaps more.
Comment 5 Peyton R 2025-04-03 18:24:32 UTC
Created attachment 200154 [details]
Screen shot of Kindle Previewer 3

Screen shot of an EPUB loaded into Kindle Previewer 3 showing Title and Author, and just a thin slice of the cover image, which were manually entered during the Writer Export -> EPUB process.
Comment 6 Peyton R 2025-04-03 18:38:54 UTC
This is just For Your Information.

During the File -> Export as EPUB process, I entered the filename of a cover image, the book title, the author's name, and the language "English" into the dialog box. The attachment shows a corner of the Kindle Previewer 3 window. You can see the title, author's name, and a slim strip of the cover image (in the background).

As you surely surmise, we would want the same values which we entered in the interactive export option to be used in the "Export Directly" option.

Thank you.
Comment 7 Heiko Tietze 2025-04-07 08:51:17 UTC
The EPUB export provides the metadata 
* Identifier (not taken from #1), 
* Title (#1), 
* Author (#2), 
* Language (always empty), and 
* Date (last saved).

#1 is File > Properties > Description
#2 is Tools > Options > User Data

The recommended workflow could be to create a template with the metadata. If the author needs to be overwritten I could imagine to have this entry with the meta data at #1 filled with the default from #2. And what definitely should be done is to take the identifier from #1 into the EPUB metadata, or is it a different information?
Comment 8 Miklos Vajna 2025-04-07 11:52:20 UTC
IIRC epub identifier is meant to be a UUID, while epub title is indeed similar to the document title (that's why it's autofilled).

See writerperfect/qa/uitest/epubexport/epubexport.py:108 for a sample epub identifier.

So unless I'm missing something, autofilling the epub identifier from the document title is not a good idea.

My first thought was to check what the PDF export does (it does store these things to the user profile, it seems) and then the EPUB export could behave similarly, to be consistent.
Comment 9 Peyton R 2025-04-07 19:19:34 UTC
I'm in favor of consistency if the thing you're being consistent with is already good :-)

As a user of the product and process, I would prefer to enter (or edit) the document title, author, language and date once as I do File -> Export As -> Export as EPUB. Then, ideally, the title, author and language would be retained with the document so that I can do Export Directly after that, knowing I'll get the same values put into the ePub again.

Please keep in mind that the user may be working on different manuscripts using different author names concurrently, so it's okay initially load the author name from the (user?) profile but the process should then retain the (possibly edited) author name on a per-document basis.
Comment 10 Eyal Rozenberg 2025-04-08 18:06:47 UTC
(In reply to Peyton R from comment #0)
> Description:
> When exporting an EPUB from LibreOffice Writer, the metadata needs to be
> entered each time. Would prefer that this dialog box remember the previous
> values.

Why should it be entered even a _single_ time? Provided, that is, that the meta data has already been entered in the Document Properties?

Specifically, I noticed that:

* Identifier is not carried over from the Document Properties.
* Author is not carried over from the Document Properties.
* The Date timestamp is arbitrarily zero instead of being taken from either the current time or the last save time.
* Language... interesting field. Relates to 148257. We should be able to actually set the language of text, which currently, we can't do. In the mean time, this should probably be added to Document Properties (I would not support a style-based approach, although that's also possible).

As for cover image - that should be added to the Document Properties. And "media directory" - don't know what that is, but might probably fit in Document Properties as well.

So, bottom line - persistence of Document Properties and keeping relevant data in there should resolve this problem.
Comment 11 V Stuart Foote 2025-04-23 11:22:33 UTC
(In reply to Heiko Tietze from comment #7)
> The EPUB export provides the metadata 
> * Identifier (not taken from #1), 


(In reply to Miklos Vajna from comment #8)
> IIRC epub identifier is meant to be a UUID, while epub title is indeed
> similar to the document title (that's why it's autofilled).
> 
> See writerperfect/qa/uitest/epubexport/epubexport.py:108 for a sample epub
> identifier.
> 
> So unless I'm missing something, autofilling the epub identifier from the
> document title is not a good idea.
> 

Use of UUID (RFC 9562 May 2024) as EPUB identifier is not universal, a registered DOI is often more useful, and some folks prefer to structure a URI. 

But IMHO creating/assigning the 'Identifier' field for a given EPUB export should be read per-document from its Properties... dialog. We added the dc: properties as for see also bug 138792, both PDF and EPUB export should honor those fields.

Users needing persistence should prepopulate via their template work flows.

The EPUB Export should be adjusted to make use of the per-document field content  recorded to Properties... dialog, both the fixed field from the General and Description tabs, but potentially the Custom Properties.

A lot of room in both the EPUB and the PDF export dialogs for handling metadata like this.  But key would be consistent handling of metadata extracted from user profile or document properties.

It should all be populated--and then the export dialogs should expose those values during export for author review.  That workflow tracks with current File -> Properties... dialog where we have checkbox to 'Apply user data'
Comment 12 Eyal Rozenberg 2025-04-23 14:09:58 UTC
(In reply to V Stuart Foote from comment #11)
> key would be consistent handling of metadata extracted from user profile or 
> document properties.
>
> It should all be populated--and then the export dialogs should expose those
> values during export for author review.  

A solid suggestion.

But - if the user populates something in the export dialog, or edits something in the export dialog - should that be written back to the document properties, in your opinion? Or should it just apply to that particular export?
Comment 13 V Stuart Foote 2025-04-23 14:57:47 UTC
(In reply to Eyal Rozenberg from comment #12)

> 
> But - if the user populates something in the export dialog, or edits
> something in the export dialog - should that be written back to the document
> properties, in your opinion? Or should it just apply to that particular
> export?

Would apply edits only to the export instance.

Much like export to PDF (except our Hybrid ODF attachment), the EPUB is complete. I see limited requirement, nor desirability, of edits made to an "uneditable" format to make their way back into the ODF source document. 

I would not expect change to metadata on the Properties dialog during the Export process. Better to correct/change what is recorded to ODF archive, if needed for work flow, while in LO proper and to then make adjustments during export.
Comment 14 Heiko Tietze 2025-04-24 07:06:05 UTC
We discussed the topic in the design meeting.

There is a disagreement whether epub meta data should be pre-populated with information from the document or take own content. The document author ie. dc:creator is filled from user data and immutable. Using it for the epub could be beneficial for some users would be wrong for other. Some suggest to store the (altered) epub meta data in the odt document, other think this would be over-engineering.
Comment 15 Eyal Rozenberg 2025-04-24 17:51:00 UTC
(In reply to Heiko Tietze from comment #14)
> The document author ie.
> dc:creator is filled from user data and immutable.

... and I argued in the meeting that that's a bug. Just need to check whether it's open already on Bugzilla or whether I need to open it.

Plus, beyond the fact that one needs to be able to set the supposed identity of the document creator, we are currently in the situation where the user may believe they are changing the author identity - in Tools > Options - but that will have no effect on the epub export and will not be pulled into the dialog. :-(
Comment 16 Peyton R 2025-04-24 18:29:19 UTC
Regarding "the user may believe they are changing the author identity - in Tools > Options - but that will have no effect on the epub export and will not be pulled into the dialog"

I wouldn't worry about the user misunderstanding this. When I (a user) set up LibreOffice, I put as little information as possible (just my initials) into the Tools-Options list because I don't want to include information about myself in every document I create and (perhaps) send to others. Basically, I rarely look in Tools->Options after that. It's only when I'm creating an ePub, which I *do* want to associate with my author persona, that I want to provide meaningful information (mainly my pen name and the title of the book, which is not the same as the file name of the document). It's this information that I want to fill in once (the first time I do File -> Export as EPUB) and to remain the same when doing successive File --> Export Directly as EPUB). For this to work, those values must be stored in the document, because I often work on multiple stories with different titles "at the same time" (actually, in overlapping days, weeks and months).

To further complicate matters, authors often write with different pseudonyms, e.g. one name for "sweet" novels and another for "racy" novels, so we need to be presented (in an obvious manner) with the opportunity to associate different author names and titles with different ODT or DOCX documents.

Thank you for considering the needs of the "average Joe" or average Jane.