ralfbiedert / cheats.rs

Rust Language Cheat Sheet - https://cheats.rs
https://cheats.rs
4.14k stars 395 forks source link

Issues with the PDF #179

Closed jonasmalacofilho closed 9 months ago

jonasmalacofilho commented 1 year ago

The current PDF (from 76a86d3) has some issues. One of the worst can be seen bellow, but in general many of diagrams are currently badly rendered.

Screenshot from 2023-02-03 00-43-27

ralfbiedert commented 1 year ago

Thanks for the report. I just had a quick look and fixed some minor CSS / HTML issues, but unfortunately I don't know what's causing this, the debugging tools for printing are pretty bad. For example, Firefox renders the page perfectly when enabling "Print Media Simulation", but still produces artifacts in the PDF:

image

I don't have so much time digging deeper right now, but help / PRs to fix this would be very welcome.

ralfbiedert commented 1 year ago

Ah, and meanwhile there's a hack you can try to build your own PDF. If you open

https://cheats.rs/#_print

(UPDATE -- WARNING - If you click this link tables will be permanently expanded and you must delete the "Local Storage" setting expand_everything in your web / storage inspector, usually reachable by pressing F11)

you get all tables unfolded, which is what our script does internally, and then you can try to print with your favorite browser and see if the result is better. You can of course just print the site as-is, which looks a bit nicer but doesn't unpack tables.

jonasmalacofilho commented 1 year ago

Thanks for the reply! And, actually, I mostly use the website... just wanted to let you know of the issue.

But I'll see if I can take a look when I have some time (although, due to some personal issues at the moment, that might take a while).

Thanks again!

ralfbiedert commented 9 months ago

This seems to have fixed itself.