Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enh/Improve email printing #9669

Closed
wants to merge 8 commits into from
Closed

Enh/Improve email printing #9669

wants to merge 8 commits into from

Conversation

GVodyanov
Copy link
Contributor

@GVodyanov GVodyanov commented May 25, 2024

Fix #8866

TODO:

  • Add printing button
  • Implement printing iframe
  • Add additional information and styling

@GVodyanov GVodyanov self-assigned this May 25, 2024
@GVodyanov
Copy link
Contributor Author

Current Issue:
image

Longer emails are cut and do not display multiple pages

@hamza221
Copy link
Contributor

hamza221 commented Jun 6, 2024

I think a Print preview would be the easiest way around either a pop up or a new page.
It would also solve the problem of big threads, Theoretically with this approach you would have to programatically expand all of them one by one and then print.
Gmail solves this problem by opening a new page with adequate design and triggering the print event instantly

Signed-off-by: Grigory Vodyanov <scratchx@gmx.com>
@GVodyanov
Copy link
Contributor Author

GVodyanov commented Jun 19, 2024

I think a Print preview would be the easiest way around either a pop up or a new page. It would also solve the problem of big threads, Theoretically with this approach you would have to programatically expand all of them one by one and then print. Gmail solves this problem by opening a new page with adequate design and triggering the print event instantly

@hamza221 I found a solution to be overlaying an iframe and inserting everything needed into it, tell me if you think it looks sane. I know it's hacky, but I believe anything at this point will be, and doing it like this doesn't require a new view.

Having said that, I'm open to any other less hacky solutions anyone might have

@GVodyanov GVodyanov requested a review from hamza221 June 19, 2024 14:08
Signed-off-by: Grigory Vodyanov <scratchx@gmx.com>
@GVodyanov
Copy link
Contributor Author

image

Here is what it currently looks like, and yes, there are multiple pages, they don't get cut off

@GVodyanov GVodyanov marked this pull request as ready for review June 19, 2024 20:14
Signed-off-by: Grigory Vodyanov <scratchx@gmx.com>
@ChristophWurst
Copy link
Member

I am not confident with the way this works. Building HTML by hand is scary. Why do we need this separate page? Can't we use the existing page and adjust the layout for print? E.g. do not limit the height of messages in the thread when printing so that everything is included, hide unwanted elements, etc.

@hamza221
Copy link
Contributor

I am not confident with the way this works. Building HTML by hand is scary. Why do we need this separate page? Can't we use the existing page and adjust the layout for print? E.g. do not limit the height of messages in the thread when printing so that everything is included, hide unwanted elements, etc.

We can also use the already existing IFrame but we can't include the sender's address...

@GVodyanov GVodyanov closed this Jul 15, 2024
@GVodyanov GVodyanov deleted the enh/mail-printing branch July 15, 2024 08:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Print out email
3 participants