You can check out the leadtools Virtual Printer c# sdk.
This will allow you to create a custom virtual printer and give events that you control to do a variety of different things, including saving it out to a PDF silently.
There is a tutorial here that you can follow to test it out with a free eval:
Print to File Using the Virtual Printer Driver - Console C#
The relevant pieces of the is highlighted below:
The Emf Event will fire for each page of a print job. The Job Event will fire twice: the first time when the job begins, and a second time when the job ends.
static void LeadPrinter_EmfEvent(object sender, EmfEventArgs e)
{
Metafile metaFile = new Metafile(e.Stream);
DocumentWriterEmfPage documentPage = new DocumentWriterEmfPage
{
EmfHandle = metaFile.GetHenhmetafile()
};
DocumentWriter.AddPage(documentPage);
}
static void LeadPrinter_JobEvent(object sender, JobEventArgs e)
{
string printerName = e.PrinterName;
int jobID = e.JobID;
if (e.JobEventState == EventState.JobStart)
{
OutputFile = Path.Combine(@"C:\Temp", Path.ChangeExtension(Path.GetRandomFileName(), "pdf"));
DocumentWriter.BeginDocument(OutputFile, DocumentFormat.Pdf);
Console.WriteLine($"Job {jobID} for {printerName} was started");
}
else if (e.JobEventState == EventState.JobEnd)
{
DocumentWriter.EndDocument();
Console.WriteLine($"Job {jobID} for {printerName} was ended. PDF saved to {OutputFile}");
}
}
Please note that I am an employee of this company