Bug 155124 - macOS print options do not provide page size settings to export as PDF.
Summary: macOS print options do not provide page size settings to export as PDF.
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Printing and PDF export (show other bugs)
Version:
(earliest affected)
7.5.2.2 release
Hardware: All macOS (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Print-Dialog
  Show dependency treegraph
 
Reported: 2023-05-02 10:35 UTC by M-Rick
Modified: 2025-03-01 23:54 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Test file (24.25 KB, application/vnd.oasis.opendocument.spreadsheet)
2023-05-02 10:36 UTC, M-Rick
Details
macOS settings in Ventura (1) (191.03 KB, image/png)
2023-05-02 10:37 UTC, M-Rick
Details
macOS settings in Ventura (2) (194.07 KB, image/png)
2023-05-02 10:37 UTC, M-Rick
Details
macOS settings in previous macOS versions (120.17 KB, image/png)
2023-05-02 10:38 UTC, M-Rick
Details
macOS settings in other macOS softwares (141.74 KB, image/png)
2023-05-02 10:39 UTC, M-Rick
Details
Linux print settings (89.29 KB, image/png)
2023-05-02 10:40 UTC, M-Rick
Details
Windows print settings (89.29 KB, image/png)
2023-05-02 10:41 UTC, M-Rick
Details
Linux result (7.83 KB, application/pdf)
2023-05-02 10:41 UTC, M-Rick
Details
Windows result (74.47 KB, application/pdf)
2023-05-02 10:42 UTC, M-Rick
Details
macOS result (any versions) (11.86 KB, application/pdf)
2023-05-02 10:42 UTC, M-Rick
Details
Snapshot on macOS Sequoia of the test file with 2 pages for page in print dialog (601.48 KB, image/png)
2024-12-27 16:11 UTC, Patrick (volunteer)
Details
Snapshot of macOS Sequoia native Page Setup dialog (307.72 KB, image/png)
2024-12-27 16:18 UTC, Patrick (volunteer)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description M-Rick 2023-05-02 10:35:09 UTC
Description:
In macOS, it is possible to export natively a document as PDF and set the document size in the print settings. Unfortunately, this option isn't available in LibreOffice mac.
I want to export a document in A3 by associating A4 pages. It is a very great feature available only in LibreOffice. It's work perfactly in Linux or Windows, but in macOS it is impossible to change the final document size that will be A4 by defaut.

Steps to Reproduce:
1. Create a new Calc spreadsheet and make several printing areas equivalent to a single A4 page (or American letter for imperial). 

2. Print the document, in the settings, enable 2 pages by documents and set as A3 to keep the original A4 size.

3. Save as PDF or print on a printer that supports A3 size.

Actual Results:
In macOS, LibreOffice reduce the page and add a large margin.

Expected Results:
Should have 2 A4 pages side-by-side on a single A3 sheet.


Reproducible: Always


User Profile Reset: No

Additional Info:
I indicated the latest LibreOffice release, but it happens in every versions.
Comment 1 M-Rick 2023-05-02 10:36:14 UTC
Created attachment 187050 [details]
Test file
Comment 2 M-Rick 2023-05-02 10:37:09 UTC
Created attachment 187051 [details]
macOS settings in Ventura (1)
Comment 3 M-Rick 2023-05-02 10:37:26 UTC
Created attachment 187052 [details]
macOS settings in Ventura (2)
Comment 4 M-Rick 2023-05-02 10:38:22 UTC
Created attachment 187053 [details]
macOS settings in previous macOS versions
Comment 5 M-Rick 2023-05-02 10:39:08 UTC
Created attachment 187054 [details]
macOS settings in other macOS softwares

It is possible to choose the paper size unlike LibreOffice.
Comment 6 M-Rick 2023-05-02 10:40:43 UTC
Created attachment 187055 [details]
Linux print settings

It is possible to set the paper size, unlike in macOS.
Comment 7 M-Rick 2023-05-02 10:41:26 UTC
Created attachment 187056 [details]
Windows print settings

It is possible to set the paper size, unlike in macOS.
Comment 8 M-Rick 2023-05-02 10:41:49 UTC
Created attachment 187057 [details]
Linux result
Comment 9 M-Rick 2023-05-02 10:42:09 UTC
Created attachment 187058 [details]
Windows result
Comment 10 M-Rick 2023-05-02 10:42:35 UTC
Created attachment 187059 [details]
macOS result (any versions)
Comment 11 Stéphane Guillou (stragu) 2023-05-31 23:43:32 UTC
Reproduced.
Even with "scale to fit paper size" off, which reduces the white margins, there is still a margin left and the result does not match the preview.
I have been using the "PDF" button at the bottom of the dialog.

Version: 7.5.2.2 (X86_64) / LibreOffice Community
Build ID: 53bb9681a964705cf672590721dbc85eb4d0c3a2
CPU threads: 2; OS: Mac OS X 13.2.1; UI render: default; VCL: osx
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded

Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: fc6806c4be8585ce0d35a6b581bf8b3dbf858500
CPU threads: 2; OS: Mac OS X 13.2.1; UI render: Skia/Raster; VCL: osx
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded

On Linux, PDF is like previewed, no margins.
Comment 12 Patrick (volunteer) 2024-12-27 16:11:06 UTC
Created attachment 198291 [details]
Snapshot on macOS Sequoia of the test file with 2 pages for page in print dialog

So I think I know what is happening: macOS is enforcing the printer's built-in page margins somewhere in the print pipeline after LibreOffice finishes its work.

If you print without any of the macOS post-processing (i.e. print 2 A4 pages), the Calc content will be drawn to the very edge of each page when opened in the Preview application. If you add any macOS-processing steps like in my snapshot, the print dialog preview renders to the edge of the page, but when opened in Preview the content is clipped by the printer's margins.

Since this bug is happening in the post processing steps, I think custom print margins need to be added in macOS somewhere. Normally that is done in the native Page Setup dialog.
Comment 13 Patrick (volunteer) 2024-12-27 16:18:36 UTC
Created attachment 198292 [details]
Snapshot of macOS Sequoia native Page Setup dialog

Bad news: it appears that the ability to create custom margins has been removed in macOS Sequoia. Almost no applications have a File > Page Setup menu anymore either.

I wonder if Apple has moved this functionality elsewhere? I don't see anything in the System Preferences or Print Center applications.
Comment 14 Patrick (volunteer) 2024-12-29 00:20:35 UTC
(In reply to Patrick (volunteer) from comment #13)
> Created attachment 198292 [details]
> Snapshot of macOS Sequoia native Page Setup dialog
> 
> Bad news: it appears that the ability to create custom margins has been
> removed in macOS Sequoia. Almost no applications have a File > Page Setup
> menu anymore either.
> 
> I wonder if Apple has moved this functionality elsewhere? I don't see
> anything in the System Preferences or Print Center applications.

After some more debugging and testing, I no longer think that the margins that macOS adds when printing more than one sheet per page is due to printer margins. 

My "print to PDF" printer (RWTS) has zero margins in its PPD file so I think that Apple has hardcoded adding two border areas:

1. A roughly 1/4" border around the edge of the page
2. A roughly 1/10" border around each sheet printed to the page
3. The content LibreOffice draws is scaled down to fit the added borders

The second border is used by macOS to print the border lines and, even if you select "None" in the print dialog, macOS will include that border.

Conclusion: I don't think we can suppress this "added borders" behavior as it appears to be macOS code. If I leave sheets per page to "1" to skip macOS' multiple sheets per page post processing step, both the preview in the macOS print dialog and printing to PDF does *not* add a border and content is drawn to the edge of the page.

Clearly Apple wants the output to look "pretty" and the native print dialog give users no way to fine tune the layout of multiple pages per sheet as Apple only gives you one layout choice with multiple sheets per page.

I think the only way we could implement printing multiple sheets per page without the unwanted border is to add support for selecting multiple sheets per page within LibreOffice so LibreOffice does all the work.

If we are able to implement tdf#155124, that would add orientation and paper size to the native print dialog. Then, if we could figure out how to add the sheets per page listbox from the Windows/Linux print dialog in the native print dialog, that might fix tdf#159995 so that the existing pages per sheet can be left at "1" for no borders.
Comment 15 Patrick (volunteer) 2024-12-29 00:22:54 UTC
Reopening as I posted to the wrong bug. Getting confused by 3 different bugs that are essentially the same thing: can't print 2 sheets per page with content that fills the paper completely.
Comment 16 Patrick (volunteer) 2024-12-29 00:34:48 UTC
(In reply to Patrick (volunteer) from comment #15)
> Reopening as I posted to the wrong bug. Getting confused by 3 different bugs
> that are essentially the same thing: can't print 2 sheets per page with
> content that fills the paper completely.

Found the third bug: tdf#163558. So when reading commit #14, replace any links to tdf#155124 (i.e. this bug) with tdf#163558.