python / python-docs-theme

Sphinx theme for Python documentation
Other
76 stars 59 forks source link

Search box cover up text in PDFs #203

Open gabaryza opened 5 days ago

gabaryza commented 5 days ago

Documentation

Python 3.13.0

I attempted to save a documentation web page, the beginning of the Language Reference, as a PDF for reading offline. In the second and subsequent pages of the saved PDF, the search box from the top of the web page overlays the first line(s) of each PDF page rendering them unreadable.

Demo: https://python-docs-theme-previews--204.org.readthedocs.build/en/204/

hugovk commented 5 days ago

Please can you share a screenshot, and maybe upload the PDF? It might need zipping first.

How did you save the PDF? Using which browser and OS?

I don't think we've done anything to optimise the pages for printing, and perhaps we can improve it.

But did you know we have pre-made PDFs of the docs available at https://docs.python.org/3/download.html

Perhaps they're more suitable for you?

gabaryza commented 5 days ago

My appologies for omitting the info.

The OS is Windows 11 Pro 22H2 Build 22621.4314 (64-bit) The browser is Microsoft Edge Version 130.0.2849.56 (Official build) (64-bit)

I typed Ctrl-P and selected "Save as PDF" for my print device.

I have attached the first three pages of Chapter 2 of the Language Reference to illustrate the issue.

Example-126254.pdf

hugovk commented 5 days ago

Thanks!

It looks like this for page 1:

image

And is worse for subsequent pages:

image
hugovk commented 5 days ago

Please see https://github.com/python/python-docs-theme/pull/204 for a fix, and https://python-docs-theme-previews--204.org.readthedocs.build/en/204/ for a demo.