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

Print Button-format for print/export to PDF from browser #2078

Open
alocalsewerhistorian opened this issue Jul 31, 2021 · 2 comments
Open

Print Button-format for print/export to PDF from browser #2078

alocalsewerhistorian opened this issue Jul 31, 2021 · 2 comments

Comments

@alocalsewerhistorian
Copy link

alocalsewerhistorian commented Jul 31, 2021

Describe the problem your feature will solve.
Feature Request: Printing from browser in nicely formatted way... WYSIWYP

Describe the solution you'd like
Printable format/function
Printing will never be perfect but, it would be nice to have some examples of CSS or print option to format for print
I dont print myself but my users are starting to ask for it.

Describe alternatives you've considered
I've started to mess with css media but this is a nest of worms... I'm hoping someone here might have also worked out some preliminary approach, I'm happy to help expand it for W2ui
(as long as my users keep complaining)

Additional context
I've searched W2ui issues for 'print' and 'printable', it doesnt seem like something that's been brought up yet.

[edit] ok I found issue 1659: #1659
Mike points out this is likely out of scope for the project...I can understand... but if someone has some helpful tips, that would be appreciated!
example of export/print features from Kendo
https://docs.telerik.com/kendo-ui/controls/data-management/grid/export/print-export
[end edit]

browser_print
screenCap

@mpf82
Copy link
Collaborator

mpf82 commented Aug 2, 2021

Personally, I think WYSIWYP is even harder to implement than a (plain text) export functionality.

For example, as shown in your screenshot the grid has several column that are not visible (you'd have to scroll to the right to see them), however w2ui implements "virtual scrolling" (both horizontal and vertical), that means only the cells that are visible are actually created in the browser's DOM. When you scroll, the cells in the DOM get created/destroyed on the fly.

And even if all cells were created - how should "wide" grids be printed? If they are scaled down to fit in call columns the text would probably be way too small to read.

And then there's also "endless scrolling", that only pulls records from the server as the user scrolls down in the grid. For printing, you might want to print all records that match your current filter.

Anyway, I'll leave this open as a Feature Request, however I'm pretty sure @vitmalina will most likely decline it.

As stated in the issue you've linked, we're using the backend for various export formats, such as real Excel (so you can honor the column width), real PDF, SQL statements, and some more plaint text formats (CSV, TSV, ...) were the user can also decide the encoding and other aspects of the created file.

Speaking of plain text exports, maybe CSV (as shown in this declined PR https://github.com/vitmalina/w2ui/pull/777/files) and TSV - which is already part of the copy (to clipboard) method, might actually get implemented as "official" export formats one day - if Vitaly changes his mind that is.

@alocalsewerhistorian
Copy link
Author

alocalsewerhistorian commented Aug 2, 2021 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants