The Reference parameter defines a path for partial filenames found in the document. Path information is often required if the document is loaded from something other than a file. Generally, this parameter would be a filename or path name where images or linked documents could be found.
Viewer.LoadFromString(S, 'C:\MyDirectory\');
will load the document in String, S, and add the path, 'C:\MyDirectory\', to any partial filenames found in the document.
The Reference parameter is optional.