Bug 144065 - add RTF \page control as an option for inserting page breaks in RTF documents
Summary: add RTF \page control as an option for inserting page breaks in RTF documents
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.1.5.2 release
Hardware: All All
: medium minor
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: filter:rtf, needsDevAdvice
Depends on:
Blocks: RTF
  Show dependency treegraph
 
Reported: 2021-08-24 17:29 UTC by Tracey
Modified: 2024-01-05 23:05 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
RTF with manual page break (3.78 KB, application/rtf)
2021-10-23 13:58 UTC, Michael Warner
Details
Word 2007-365 with manual page break (1.72 KB, text/xml)
2021-11-12 03:48 UTC, Michael Warner
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tracey 2021-08-24 17:29:36 UTC
Description:
Please add the option to use the \page control for Page Break Control in Writer.
Some RTF word processors do NOT recognize the \pagebb control.

Writer always uses \pagebb when inserting a page break.

If I manually change all the \pagebb controls to the \page control then everything works fine.
Please advise if I am missing something.
Thanks, Tracey
\pagebb	Break page before the paragraph.
\page	Required page break.

Steps to Reproduce:
1.Insert page break in a document
2.Save document as an RTF type
3.Open RTF in WordPad and print: page breaks are not recognized/visible (printing to PDF file for testing).

Actual Results:
page breaks missing.

Expected Results:
visible page breaks in preview or multiple pages when printing.


Reproducible: Always


User Profile Reset: No



Additional Info:
Version: 7.1.5.2 (x64) / LibreOffice Community
Build ID: 85f04e9f809797b8199d13c421bd8a2b025d52b5
CPU threads: 2; OS: Windows 6.1 Service Pack 1 Build 7601; UI render: Skia/Raster; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: threaded
Comment 1 Michael Warner 2021-08-25 12:36:41 UTC
Based on what you have written, it sounds like recognizing \pagebb is a problem for other word processors to solve, not LO.
Comment 2 Tracey 2021-10-21 18:51:20 UTC
When I add a page break before or after a paragraph, LO puts a \pagebb(page break before paragraph) in both instances.

Can LO be fixed to insert a \page(page break) after a paragraph?
Comment 3 Michael Warner 2021-10-22 14:37:31 UTC
What word processor(s) specifically are you having a problem with? In the Description I notice that you mention WordPad, but I can see that WordPad supports ODT and DOCX, which LO also supports (and get a lot more developer attention for obvious reasons). Is there a particular reason you are using RTF? I'm just trying to understand the use case here.
Comment 4 Tracey 2021-10-22 17:09:56 UTC
Yes I do use WordPad.
But I also use text accessible formats for data/document (exporting from / importing to) a database.
For example: exporting a list of parts for an RFQ to be sent as an email (maybe just the body with tab delimited data) or sent as an email (body-of-text) with a <simple>(HTML, RTF, or TAB delimited data) file as an attachment.


I also had some LO.odt documents with multiple fonts and font sizes that needed the font sizes changed.
When I used the LO find-&-replace to change font sizes, some font sizes of different fonts were missed (not all occurrences were changed).
After multiple attempts, I end up saving the documents as an RTF and opening up the documents in notepad and replacing-all (for example: replacing \fs12 with \fs14) to complete the changes/updates


Just FYI, Tracey
Comment 5 Michael Warner 2021-10-23 13:58:42 UTC
Created attachment 175887 [details]
RTF with manual page break

File saved as RTF where I inserted a manual page break before the word "faucibus". In the RTF code it created a new paragraph tagged with \pagebb.
Comment 6 Tracey 2021-10-26 17:04:56 UTC
|...I inserted a manual page break before the word "faucibus". In the RTF code it |created a new paragraph tagged with \pagebb.

Yes, I know that.

When I insert a manual page break (after / following) the paragraph, a <Break page before the paragraph control> (\pagebb) is still inserted when a \page (Required page break) control should be inserted.

Inserting a <before paragraph> control at the end of a paragraph (defeats/ nullifies) the (purpose / feature) and flexibility of having both a \page and a \pagebb control

Thanks, Tracey
Reference Document: MS Rich Text Format (RTF) Specification Version 1.9.1 dated: 19 March 2008

*** on page 78 in the [Paragraph Formatting Properties] section, a \pagebb control is defined as a Break page before the paragraph.

*** on page 143 in the [Special Characters] section, a \page control is defined as a Required page break.
Comment 7 Michael Warner 2021-10-28 04:24:28 UTC
@Miklos, do you have any thoughts on this?
Comment 8 Miklos Vajna 2021-11-02 08:44:20 UTC
It would be useful to check if the special "page break" char is preserved for DOCX and DOC or not. If they also convert it to "page break before" para property, then I think it's fair if RTF does the same.
Comment 9 Michael Warner 2021-11-12 03:48:12 UTC
Created attachment 176201 [details]
Word 2007-365 with manual page break

This is the document.xml file from inside a .docx, created from an LO document containing a manual page break between the "Page 1" and "Page 2" text. 

The portion relevant to this discussion appears to be this:
<w:r>
    <w:br w:type="page"/>
</w:r>
Comment 11 Tracey 2023-05-05 16:41:39 UTC
The reason why I use HTML and RTF is because I can export text and data in HTML or RTF and the file is readable by other applications.
\page appears to be {more} universally recognized than \pagebb.

Along the same lines(my manual changes):
One time I created an ODT document with 12 and 10 point font size.
Due to me declining eyesight, I made a global [font size] change using LibreOffice:
I changed 12 point to 14 point and 10 point to 12 point.
Not all occurrences were changed.

I saved the ODT document as an RTF document then opened the RTF document in notepad.
I "manually" changed the remaining point sizes as needed.
I reopened it in LibreOffice Writer re-saving it as an ODT using LibreOffice Writer and now the point size is what I need/want.

Just FYI, Tracey
Comment 12 Tracey 2023-05-25 16:31:28 UTC
My last comment was way off-point/off-base (sorry about that).

I use RTF for portability reasons:
\page seems to be more widely recognized.
\pagebb that is less widely recognized.

It appears that \page and \pagebb effectively function the same.

\page should have greater priority over \pagebb because it is more widely recognized.

Just FYI, Tracey
Comment 13 Tracey 2023-12-05 19:04:53 UTC
Just FYI, I created a (3 line 3 page) document
I inserted 1 manual page break before and 1 manual page break after (via <right>+<click> > paragraphs> text flow> insert> page> (both before and after)).

I saved the page as RTF, but when viewing the RTF file as text: the \page control was missing and only had \pagebb was stored/saved.

Just FYI, Tracey