Bug 266386 - REGRESSION (Safari 17): Document with break-after:page is printed incorrectly
Summary: REGRESSION (Safari 17): Document with break-after:page is printed incorrectly
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Printing (show other bugs)
Version: Safari 17
Hardware: All iOS 17
: P2 Major
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2023-12-13 18:41 PST by ayasdewe
Modified: 2024-02-12 16:46 PST (History)
5 users (show)

See Also:


Attachments
screenshoot while print in Safari 17 when use break-after:page; (76.50 KB, image/jpeg)
2023-12-13 18:45 PST, ayasdewe
no flags Details
naive test case, not reproducing the issue (119 bytes, text/html)
2023-12-13 20:08 PST, Alexey Proskuryakov
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description ayasdewe 2023-12-13 18:41:14 PST
break-after : page; not working in Safari 17

When the printing process is carried out, the page cannot be made into 2 or more pages
Comment 1 ayasdewe 2023-12-13 18:45:31 PST
Created attachment 469032 [details]
screenshoot while print in Safari 17 when use break-after:page;
Comment 2 Alexey Proskuryakov 2023-12-13 20:08:43 PST
Created attachment 469034 [details]
naive test case, not reproducing the issue
Comment 3 Alexey Proskuryakov 2023-12-13 20:10:33 PST
Thank you for the report. I cannot reproduce this with the above test case. 

Could you please provide steps to reproduce that we could follow, including a test case at a publicly accessible URL?
Comment 4 ayasdewe 2023-12-13 22:25:14 PST
(In reply to Alexey Proskuryakov from comment #3)
> Thank you for the report. I cannot reproduce this with the above test case. 
> 
> Could you please provide steps to reproduce that we could follow, including
> a test case at a publicly accessible URL?

https://klinikrespirasimalang.com/pdf/tampil.php?f=resep1-16398-AlanLukitoGunawan.pdf&t=resep

This is a website that I created to display PDF results and print them. When printed, it should produce 2 pages. For other browsers it can still use this code, but for Safari 17 it can't, the output is like the one in the attached image above.
Comment 5 Alexey Proskuryakov 2023-12-14 08:33:20 PST
Thank you! I can reproduce in iOS 17.2, and this works correctly in iOS 16.7.2. I can also reproduce on macOS.

It looks like page break happens correctly, but positioning the content on the paper is wrong, so the second page is partly printed on the first sheet.

Additionally (and it may need a separate investigation), I sometimes only get one page on print preview, not two.

Please keep the test page up for investigation, as we don't have a reduced test case yet.
Comment 6 Radar WebKit Bug Importer 2023-12-14 08:33:31 PST
<rdar://problem/119669466>
Comment 7 ayasdewe 2023-12-14 16:36:35 PST
(In reply to Alexey Proskuryakov from comment #5)
> Thank you! I can reproduce in iOS 17.2, and this works correctly in iOS
> 16.7.2. I can also reproduce on macOS.
> 
> It looks like page break happens correctly, but positioning the content on
> the paper is wrong, so the second page is partly printed on the first sheet.
> 
> Additionally (and it may need a separate investigation), I sometimes only
> get one page on print preview, not two.
> 
> Please keep the test page up for investigation, as we don't have a reduced
> test case yet.

That's right, previously it wasn't a problem, then one of the users updated iOS to version 17 and then this case appeared

For other users can still use this code