0

I want to save PDF at specific location without user interaction in Windows.

To achieve this goal I configured local printer port which saves file in Documents folder. I want it to be changed to "C:\CIRFSpooler" so that printed files can be saved in specific folder.

I tried to put directory name in port but shows error. enter image description here

I followed these steps:

  1. Press Win + R to bring up the Run dialog, and type Control Printers,
  2. Add a printer Select The printer is not listed Select the last item:
  3. Add a local printer… Create a new port.
  4. Select Local and Name your Port
  5. Select Microsoft XPS Class Driver Name the printer.

Thanks!

1 Answer 1

0

When creating a new local port, the printer wizard expects a file, not a directory. If you specified "C:\CIRFSpooler\file_name.pdf" it would work fine.

Of course, that file may then be overwritten every time you print to it. However, when I tried it the PDF-XChange Lite driver, it created its own file with the title of the document and ignored the name I specified.

2
  • Thanks, but I don't want to use 3rd party tools. I have found a way to get random file name where we need to set Keep Printed Document setting. It will create spool file with incremented number. which can be converted to PDF. Commented Jun 6, 2022 at 4:24
  • My method works with any printer driver. The PDF-Xchange driver I used was just to test the idea.
    – hdhondt
    Commented Jun 6, 2022 at 9:38

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .