Autoprinting a PDF

Hi
Trying to print a PDF from a batch file using PDF Creator.
I want to choose a profile from PDF creator to pick up the printer stored against it. My batch file is as follows:

Start C:“Program Files”\PDFCreator\PDFCreator.exe /PrintFile=“C:\Users\nick\Desktop\Shelf-01.pdf” /PrinterName=“PDFCreator” /Profile=“Profile1”

Doesn’t seem to work - can anyone see what is wrong?

Thanks

Hi,

the /PrintFile parameter relies on finding a correctly registered “print to” shell verb / command for the file type which you’d like to convert from. Please try using /PdfFile instead, this will directly convert the PDF instead of sending it through the virtual printer and doesn’t rely on any Windows registry settings.

Best regards

Robin

Hi Robin.
Thanks for your reply and sorry for the delay in replying.
I’ve tried this:
Start C:“Program Files”\PDFCreator\PDFCreator.exe /PdfFile=“y:\Printed\ToPrint.pdf” /PrinterName=“PDFCreator” /Profile=“Shelf01”
(also tried without /PrinterName=“PDFCreator” )
Nothing prints… any thoughts?

Hi,

it does look correct on first sight, What happens if you drag&drop the PDF onto a PDFCreator window with the “Shelf01” profile selected for your default PDFCreator printer?
Are there any error messages inside the PDFCreator log (%localappdata%\PDFCreator\PDFCreator.log)?

Best regards

Robin

Hi Robin
Hope you are well
I'm getting the error in the log file -
2018-11-08 10:05:03.1782 [Error] pdfforge.PDFCreator.Core.DirectConversion.DirectConversionInfFileHelper.TransformToInfFileWithMerge: The file "Y:\Printed\Shelf1-01.pdf" does not exist.
Thanks
Nick

Hi Nick,

is y a network path / mapped drive?
Does it work if you try to print a PDF from a local drive, or does it give the same error?
I will see if I can somehow reproduce this here.
Is there a specific reason why you'd like to use PDFCreator for this?
If it is only about printing the PDF to a selection of specific printers, it might be easier to just call a reader like SumatraPDF which supports printing to specific printers silently through a command line.

Best regards

Robin

Hi Robin
Thanks for the prompt reply.
Yes - the Y drive is a mapped directory. It looks like the same issue on a C: drive.
What I am trying to do is create a pdf and depending on the name of the file, it prints to a specific profile (i.e. printer).
I could use Sumatra but that would mean people having to change printers in the batch file or something like. They could use the PdfCreator to change a profile - it would be much easier.
I'm using a windows 10 PC - I don't think I had the issue when I had a Windows 7 PC (but I cannot guarantee that!)
Thanks
Nick

Hi,

thanks for the additional details.
I am afraid I still wasn't able to reproduce this here, are you using the latest PDFCreator version 3.3.0?

Best regards

Robin

Hi Robin

Have uninstalled and reinstalled and will try again (annoyingly the printer is about 160miles from the PC I'm running the code on) - its at a customers site! And he isn't in today to confirm if its now working.
Will update you.
I have tried local and it works on a windows 7 machine, but the issue I have is with Windows 10

Thanks
Nick

Hi,

PDFCreator isn't built to handle remote print jobs, this is the reason it isn't working,
It needs a user session to run in and will try to use the session of the user who sent the print job.

Best regards

Robin

Hi Robin

Ah, probably didn't explain myself very well.
My customer is 160 miles away, pdfcreator is installed local on his site, and printing locally to a network printer (I am just screen connecting to his PC) but physically cannot see if stuff comes off the printer!
More testing tomorrow...

Thanks
Nick