The NULL values are optional parameters that I didn't use to keep it simple. The one in FSPathMakeRef would be a Boolean * that would contain whether or not the path is a directory on return. The NULL in LSOpenFSRef would be a FSRef * that would contain the opening program if you needed to know on return.
Just to clarify, are you asking how to open a .pdf file with the user's default application for .pdf's? or are you asking about how to implement PDFView and/or PDFKit into your app?