Macro/API needed to print to pdf and rename to drawing title

Hello,

I currently have a working macro that will remove dimensions from the drawing and print as pdf (if the printer is set up to print to pdf, if not it prints to the selected printer). I am needing two things:

  1. Code to fix the printer issue so it will always print to .pdf instead of selecting the local printer.
  2. Code to pull the drawing title instead of the file name to save as the new pdf.

Here is my current code:

Any information would be greatly appreciated.
Thank you.

SolidworksApi/macros