Preview of CAD files in format .dwg

You can use QCAD, an open source AutoCAD replacement or the community fork LibreCAD made to work using the newer Qt4 framework. You can install LibreCAD from the Ubuntu Software Center. Using one of these two programs you import DWG files, edit the drawing and export it to PDF.

LibreCAD screenshot

QCad offered a command line tool to convert DWG to PDF directly - I'm guessing it's also available in LibreCAD.

./dwg2pdf.sh drawing.dwg

Best linux-native solution for dwg should be TeighaViewer. Teigha technologies are used by hundreds of companies around the world. Teigha is for dwg what LibreOffice is for office files (doc, xls, etc). Teigha is basically a Design Alliance, a common effort around the world to break the dictatorship of Adsk's dwg. Bricscad, DraftSight, Ares Commander, CorelCAD, Intellicad and many others are members of teigha.

Inkscape can also open .dwg files. But it doesn't always read them right (display errors and scale errors), depending on what app generated the dwg file. Inkscape deals better with .dxf files, because dxfs can't contain advanced entities, just basic entities like lines, arcs, splines, points and dimensions.