Posted by a ceTe Software moderator
Hello,
Here is another method to load the native DLL which is among the list provided in the link
here. Please refer to the documentation provided in the link above and use it accordingly in your application.
Below is the code sample.
[DllImport("kernel32.dll", CharSet = CharSet.Unicode, SetLastError = true)]
[return: MarshalAs(UnmanagedType.Bool)]
static extern bool SetDllDirectory(string lpPathName);
static void Main(string[] args)
{
SetDllDirectory(@"Folder path");
int err = Marshal.GetLastWin32Error();
PrintJob printJob = new PrintJob("Printer name", @"Pdf file path", 1, 1);
printJob.Print();
}
Thanks,
ceTe Software Support Team