Simplenote-electron: Unwanted text appears when Printing Notes

Created on 9 Dec 2016  路  9Comments  路  Source: Automattic/simplenote-electron

Steps to reproduce

  1. Print any note and save it as a PDF

What I expected

To see the note displayed

What happened instead

The note displayed but with icons slightly visible over part of it.

Further Information

The icons appear to be from the Restore Note function in the note editor as the 4 visible items are: 'Latest' , a Slider Icon, a Cancel button and a Restore Note button.

I suspect hiding the RevisionSelector element found here in the print.scss might solve it.

OS version

Windows 10

Screenshot / Video

Simplenote.pdf
Simplenote1.pdf

bug

Most helpful comment

Maybe we should make the print stylesheet explicit. Like:

* { display: none }
.printable, .printable * { display: unset }

All 9 comments

Thanks for the report @chris-budd. You're probably onto something here. We'll add this to our list. Feel free to submit a PR yourself if you want to clone and try to get this working. We'll be here to answer any questions that might come up.

I wonder if we could do the print stylesheet better, currently we have to remember to add new things to hide to the styles as we add them. We've forgotten a lot :)

No the same error but same "construction site".

In the produced PDF (e.g. Adobe Reader):

  • you cannot find any text string (CTRL + F)
  • you cannot mark text and copy it

This is still an issue, here's a Printout from the Windows App (via @ashercantrell )

test.pdf

Maybe we should make the print stylesheet explicit. Like:

* { display: none }
.printable, .printable * { display: unset }

Pretty sure this is fixed, but we haven't released the update with the fix yet.

@beaucollins or also maybe we could be explicit about the media query and make web CSS media-query-specific

Can select a single element to print in JS by selecting a single ID?

http://electron.atom.io/docs/api/web-contents/#methods

webContents.fromId(id)
id Integer
Returns WebContents - A WebContents instance with the given ID.

If not, we could use the not:() CSS selector. That could hide everything expect for a specified class

Closing this as the original issue has been resolved.

The printing styles have been simplified somewhat (#1013), but we'll be on the lookout for ways to prevent regressions.

Was this page helpful?
0 / 5 - 0 ratings