I am trying to set the filename when printing to PDF. Setting (Printers.pas) Printer.Title works to default the PDF filename for most PDF printing engines (Adobe, CutePDF),
You can try.
var
DeviceMode: THandle;
Device, Driver, Port: array[0..80] of Char;
begin
Printer.PrinterIndex := Printer.Printers.IndexOf('Microsoft Print to PDF');
Printer.GetPrinter(Device, Driver, Port, DeviceMode);
Printer.SetPrinter(Device, Driver, 'C:\Temp\Test.pdf', 0);
Printer.BeginDoc;
Printer.Canvas.TextOut(100, 100, 'Test');
Printer.EndDoc;
end;