I ran into reports to PDF years ago (2019) and have been doing the following.
Echo False
DoCmd.OpenReport "ReportName", acViewPreview
DoCmd.SelectObject acReport, "ReportName"
DoCmd.OutputTo acOutputReport, puchaseOrderReportName, acFormatPDF, "FullNameAndPath.PDF"
DoCmd.Close acReport, "ReportName"
Echo True