With the new MapInfo PDF Printer introduced in Mapinfo Professional 10.0 it is possible to print directly to a PDF file using the PrintWin statement.
The lines of code you need are:
Set Window FrontWindow() Printer Name “MapInfo PDF Printer Version 10.0″
PrintWin Window FrontWindow() File “C:\Temp\Test.pdf”
… and a new PDF file is created right away.
To overwrite an existing PDF file you should add the keyword Overwrite, i.e.:
PrintWin Window FrontWindow() File “C:\Temp\Test.pdf” Overwrite
Printing a Layout with Map, Browser etc. results in a PDF with layered Map part.