Skip to content
This repository has been archived by the owner on Oct 2, 2018. It is now read-only.

[desktop] Printing documents #206

Closed
twiss opened this issue Nov 7, 2014 · 13 comments
Closed

[desktop] Printing documents #206

twiss opened this issue Nov 7, 2014 · 13 comments
Milestone

Comments

@twiss
Copy link
Collaborator

twiss commented Nov 7, 2014

Currently, you can print a document by selecting everything (ctrl-a) first. It would be nice if printing worked without doing that.

@ferndot
Copy link
Member

ferndot commented Nov 7, 2014

This is an important feature for desktop.

There are several ways to address this issue:

  • We could use https://developer.mozilla.org/docs/Web/API/window.print to trigger the print dialog on the iframe with the document's contents. The only caveat is that most browsers print meta information in the header of the document.
  • We could cause the browser to download a pdf version of the file (after we implement pdf support). This is what Google Docs does.

Any other ideas?

@twiss
Copy link
Collaborator Author

twiss commented Nov 7, 2014

Another idea is to try and use media=print/@media print to hide everything but the document. One problem with that is that it doesn't print the whole document, just the part that's visible. So you'd have to make all of it visible first.

@twiss
Copy link
Collaborator Author

twiss commented Nov 7, 2014

Calling window.print() from within the iframe in Chrome works fine, including metadata from the top iframe. In Firefox Nightly on linux it doesn't work in at least some cases, I'll see if I can file a bug with them.

@ferndot
Copy link
Member

ferndot commented Nov 7, 2014

In that case, this feature should be simple to solve. I think that we should wait to fix this until there is a plan in #203. What do you think?

@twiss
Copy link
Collaborator Author

twiss commented Nov 8, 2014

I've filed a bug in Firefox with details: https://bugzil.la/1095808

Only downside of print() versus @media print is that with the latter, selecting print from the browser menu also works. I guess though that a print button inside Firetext is more like what people expect. Also, we could intercept ctrl-p.

@ferndot
Copy link
Member

ferndot commented Nov 8, 2014

I've filed a bug in Firefox with details: https://bugzil.la/1095808

Thanks! It is definitely a Firefox on Linux issue because it works fine on OS X.

I guess though that a print button inside Firetext is more like what people expect.

I would expect that as well. The print menu item connotes printing the entire page, not just the document. Also, keyboard shortcut interception will be a good feature in the future!

@Ryuno-Ki
Copy link

Also, keyboard shortcut interception will be a good feature in the future!

When intercepting keys, please, bear in mind, that screenreader users depend heavily on them.

@twiss
Copy link
Collaborator Author

twiss commented Nov 10, 2014

When intercepting keys, please, bear in mind, that screenreader users depend heavily on them.

Good point, I'll file some issues about that. Is ctrl-p something important in screenreaders (or elsewhere for that matter)?

@Ryuno-Ki
Copy link

Umm, I assume not so. Orca didn't get it to upload their default keystrokes, so I have to dig into the code in order to extract them.

Meanwhile, I can point you to

Shall I copy-paste those links into one of the other issues?

@twiss
Copy link
Collaborator Author

twiss commented Nov 10, 2014

Thanks a lot for those links! Just here is fine, I'll refer to them there.

@Ryuno-Ki
Copy link

I discovered Orca being hosted on GitHub as well.

At first glance, I'd say, these files look promising:

Of course, all of them can be customised to one's pleasure, but we're just dealing with the default ones.

I'll look after spare some time to wrap the files into a table for easier consuming.

@twiss
Copy link
Collaborator Author

twiss commented Dec 9, 2014

Another option is to window.open() the document.

Depending on how we implement that, that would allow the user to access their browser's print preview and page setup features (Firefox and IE, unlike Chrome have these separately from their window.print() popup).

The question then is whether we want that. Allowing access to page setup would make the most sense if the changes made there would have effect in the editor, and thus we didn't have our own dialog (#239).

@twiss twiss mentioned this issue Dec 12, 2014
@twiss twiss mentioned this issue Feb 1, 2015
@ferndot ferndot added this to the v0.4 milestone Feb 4, 2015
@ferndot
Copy link
Member

ferndot commented Feb 8, 2015

Fixed by #252

@ferndot ferndot closed this as completed Feb 8, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants