When loading a DLL from LotusScript Notes needs to locate the DLL on the file system.
Typically DominoPDF should be installed in the Notes software directory (same place as nnotes.exe), however it can also be placed in another directory as long as it is in the system path (for example \system32).
You can also try specifying a direct path to the DLL. For example;
Declare Function DoPDF Lib "c:\lotus\domino\DOMINOPDF.DLL" (Byval szInput As String, Byval szOutput As String, Byval szOptions as String) As Long
You may be using a 64-Bit operating system which needs to reference an alternate DLL. Please see our Knowledge Base entry at 64-Bit DominoPDF for further details.