For official D&DOfficial PDFs versions of the same books have the same quality, I highly recommend that you purchase them fromas usually only the DM's Guild (www.dmsguild.com)publisher releases it. You can also get a varietyIn the case of professionalolder books, some rescans may have been done in order to offer up a higher-looking homebrewn content if you're interestedquality version of the product, and then both of these versions can be found.
A lot of the "high-quality scans" are actually pdf versions of the books made by the publisher, who have a pdf version before they produce a printed one. For homebrewn material, templates exist to allow others to create similar-looking content. In the case of PDFs of books published prior to the widespread use of the pdf or its equivalent, it usually is a high-quality scan in which the pages are scanned individually so as to avoid the darkened section of the page caused by the binding. It may also be an already digital image, as formats such as png appeared during the same time as AD&D.