Hello,
Did you try to run a VBA code on the worksheet?
By doing this, you can also define more parameters and the file path can be passed as an argument:
My below function prints a range in PDF:
Function SaveRangeAsPDF(rng As Range, filePath As String)
rng.ExportAsFixedFormat Type:=xlTypePDF, filename:=filePath, Quality:=xlQualityStandard, _
IncludeDocProperties:=True, IgnorePrintAreas:=False, OpenAfterPublish:=False
End Function