All what you need to do is to define full file name including the path:
Dim pdfname As String = "D:\SomePath\SubFolder\mypdf.pdf"
string pdfname = @"D:\SomePath\SubFolder\mypdf.pdf";
Now, use that variable to save your pdf file. For example:
File.WriteAllBytes(string, byte[])[
^]
If you're using NuGet packet to read/write pdf(s), use embeded methods, such as:
Save()
or
SaveAs()
.