You said:
i am using splwow64 to open the file not wordpad
You are not supposed to open the file with "splwow64" - the only place you
use splwow64.exe is when you create the registry key to specify the PDF
file name (and only on 64bit systems).
You need to open your file in an application that can render (and print)
HTML. Then, in this application, you print to the "Adobe PDF" printer, and
if you've set the correct registry key, the output will be saved to the
desired filename.