Summary: | Print > Selection omits some text | ||
---|---|---|---|
Product: | [Applications] kate | Reporter: | Nicolás Adamo <nicoadamo> |
Component: | application | Assignee: | KWrite Developers <kwrite-bugs-null> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | christoph, justin.zobel, nate, nck, nicoadamo |
Priority: | NOR | ||
Version: | 19.12.0 | ||
Target Milestone: | --- | ||
Platform: | Arch Linux | ||
OS: | Linux | ||
Latest Commit: | https://invent.kde.org/frameworks/ktexteditor/-/commit/cbd7210df6d5dff2e6197c1dec224b8f7870ad4f | Version Fixed In: | |
Sentry Crash Report: | |||
Attachments: |
The result of the bug I'm trying to describe.
Selected Text Printed Text Source Text |
I can confirm odd issues with this as well. I printed the line in step 1 as part of another document but it printed only part of the sentence (removing some parts in the middle). Hmm, for me this prints just the full selected line to the PDF, at least with Kate 21.12 & Frameworks 5.89. Can you reproduce it with a fresh version? Created attachment 145270 [details]
Selected Text
Created attachment 145271 [details]
Printed Text
Created attachment 145272 [details]
Source Text
I've just tested Kate version 21.12.1 It stills performs wrong, or not as expected. Regards, Nicolás Adamo This problem seems to be because the logic to clip individual lines to selection doesn't work properly when there is a line wrap in the printed document: https://invent.kde.org/frameworks/ktexteditor/-/blob/4594c7e66df9325ef2dd256af75bbe9cf3b06398/src/printing/printpainter.cpp#L650-661 Help to fix that would be welcome! A possibly relevant merge request was started @ https://invent.kde.org/frameworks/ktexteditor/-/merge_requests/712 Git commit cbd7210df6d5dff2e6197c1dec224b8f7870ad4f by Christoph Cullmann, on behalf of Waqar Ahmed. Committed on 02/08/2024 at 20:44. Pushed by cullmann into branch 'master'. Fix selection printing Personally I think clipping away selection like this is a poor way to handle selection during printing. It would be better if we instead only layout the selected part of the text and paint that just. M +15 -3 src/printing/printpainter.cpp https://invent.kde.org/frameworks/ktexteditor/-/commit/cbd7210df6d5dff2e6197c1dec224b8f7870ad4f |
Created attachment 124718 [details] The result of the bug I'm trying to describe. SUMMARY The Print menu, with option "Selection" triggers the printer, but one line in the paper is trimmed. It's wired. No special characters other than " (quotes), Spanish accents like 'ú' and one '!'. STEPS TO REPRODUCE 1. Open a text file in Kate with final line as the following: -Lo anterior va de la mano con el comentario de Nicole Jeldres "Eres súper exigente contigo mismo, y con los demás!". 2. Select the final line and then File > Print or Ctrl+P. 3. Selection. 4. Print button. OBSERVED RESULT It's on a paper. I could show some photo if you require, but the attached PDF was generated with the same result. EXPECTED RESULT The full line printed. SOFTWARE/OS VERSIONS Windows: macOS: Linux/KDE Plasma: (available in About System) KDE Plasma Version: KDE Frameworks Version: Qt Version: ADDITIONAL INFORMATION