The .docx format is a text file format that is based on the Office Open XML package and uses a compression algorithm similar to a ZIP archiver. This algorithm is what distinguishes it from its predecessor - the .doc format. If .doc is a binary text file, then .docx contains XML files and additional folders that compress the file and, as a result, reduce its size. The DOCX document format is used as the default format for modern versions of Word. Basically, it's a slightly more advanced version of the DOC. Most word processing programs, as well as ordinary file viewers, are able to work correctly with this format.
The Portable Document Format (PDF) is a versatile file format that preserves the fonts, images, and layout of the original document, regardless of which of many platforms and which of many applications the document was created on. It was initiated by Adobe and was originally intended for electronic presentation of printed materials. PDFs look the same no matter what device they are viewed on. Whether you're using Windows 10, Mac, Chrome OS, Android, Windows Phone, iPad, or Windows XP - on any software or hardware, PDFs remain the same.