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

Exporting stats to PDF produces white on white text if Anki is in night mode. #1114

Closed
Filius-Patris opened this issue Apr 9, 2021 · 8 comments
Labels

Comments

@Filius-Patris
Copy link

Steps to reproduce

  1. Make sure Anki is in night mode (Preferences > Basic > Night mode; Restart if needed)
  2. Go to Stats, "Save PDF" (very bottom)
  3. Inspect the PDF. (Using LibreOffice Draw, for example)

Expected behaviour

The text renders black on white (like in light mode).

Observed behaviour

The text renders white on white.

@dae
Copy link
Member

dae commented Apr 17, 2021

Looks fine to me. Did you test with the latest version and without add-ons?

Screen Shot 2021-04-17 at 10 01 42 am

@Filius-Patris
Copy link
Author

Without addons: yes, latest version: latest stable yes. You mean master?

@Filius-Patris
Copy link
Author

Hmm weid. I tried again this morning and now it worked.

Sorry for the inconvenience.

@lukawarren
Copy link
Contributor

Sorry to bump a year-old issue but I'm having this issue too, but only when I begin to scroll down.

In other words if I open stats with the dark theme and immediately click "Save PDF" it works just fine, but if I first scroll down so that the top is out of view and then click save, then the top of the PDF turns white. The more I scroll down, the more of the final PDF turns white.

Maybe that is why it was hard to reproduce?

(I'm on version ⁨2.1.49 - dc80804)

@dae
Copy link
Member

dae commented Apr 18, 2022

Thanks, that does seem to trigger the issue here too. It's not totally white, but the background is white, making it hard to see.

@dae dae reopened this Apr 18, 2022
@dae dae added the stats label Apr 18, 2022
dae pushed a commit that referenced this issue Apr 19, 2022
* Scroll stats to top when exporting (#1114)

It's obviously a bit of a "hacky" solution, since it's slightly jarring for users to scroll down, click export, then find themselves all the way at the top again, but it's somewhat less confusing than wondering why your PDF is broken :-)

* Clarified comment in stats.py (#1114)

* Apply scrolling fix to new stats screen, not legacy stats (dae)

Also wait for JS callback before saving the PDF, as JS is executed
asynchronously.
@dae
Copy link
Member

dae commented May 3, 2022

Fixed in #1810

@dae dae closed this as completed May 3, 2022
@RotyBR
Copy link

RotyBR commented May 3, 2022

Is it possible to export stats to pdf on mobile? If so, where do I find it? Please, help me!

@dae
Copy link
Member

dae commented May 4, 2022

If you're asking about AnkiMobile, it does not presently have such a feature, but I'll keep an eye on demand.

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

No branches or pull requests

4 participants