COM interface Get_PrintJobInfo

Has anyone had any success with using the PrintJobInfo object?
I get this error each time I try to use it:
Unable to get COM type information for COM class "": COM error 0x8002802b, described as "Element not found."
I can't find any examples in the documentation and no tutorials or information in the forum. Any help is appreciated.

To test PrintJobInfo make a copy of the following sample script file and put it out of "C:\Program Files" so you can modify it without any harm:

"C:\Program Files\PDFCreator\Com Scripts\JS Scripts\How To\ConvertFileAsync.js"

This script creates a pdf, named TestPage.pdf and located in the %TEMP% folder, containing the Windows printer test page.

Modify the script this way:

after the line 38 containing this:
var job = PDFCreatorQueue.NextJob;

insert the following code:

var oPrintJobInfo = job.PrintJobInfo;

WScript.Echo(
"PrintJobName: " + oPrintJobInfo.PrintJobName + "\n" +
"PrintJobAuthor: " + oPrintJobInfo.PrintJobAuthor + "\n" +
"Subject: " + oPrintJobInfo.Subject + "\n" +
"Keywords: " + oPrintJobInfo.Keywords + "\n" +
"Producer: " + oPrintJobInfo.Producer);

You can also set those properties:

oPrintJobInfo.PrintJobName = "Test page";
oPrintJobInfo.PrintJobAuthor = "Gianni";
oPrintJobInfo.Subject = "Testing PrintJobInfo";
oPrintJobInfo.Keywords = "PRINT,PAGE,TEST,PDF,PDFFORGE,PDFCREATOR,FORUM";
// oPrintJobInfo.Producer = "Producer";

but only PrintJobName and PrintJobAuthor will be set in the pdf file just created.

To view these properties you must open the pdf file with a pdf reader and look for Properties.

The following code is needed to set also Subject and Keywords
(see: COM Interface access to Subject and Keywords )

After the line containing this:
job.SetProfileByGuid("DefaultGuid");

insert the following code:

// job.SetProfileSetting("TitleTemplate", "Test page");
// job.SetProfileSetting("AuthorTemplate", "Gianni");
job.SetProfileSetting("SubjectTemplate", "Testing PrintJobInfo");
job.SetProfileSetting("KeywordTemplate", "PRINT,PAGE,TEST,PDF,PDFFORGE,PDFCREATOR,FORUM");

I can follow the logic in your processing, however I am using the actual PDFCreatorObj object to control the print queue whereas in the example from the ConvertFileAsync.js uses shellexecute to open the PDFCreator object:
objShell.ShellExecute("RUNDLL32.exe", "PRINTUI.DLL,PrintUIEntry /k /n "PDFCreator"", "", "open", 1);
I know it shouldn't matter, but I guess it does in this case. Is there a difference in accessing the PrintJobInfo object when you execute the print from a shellexecute versus the PDFCreator object?

The ShellExecute print the classic Windows test page and is used simply to easily print something for the purpose of the sample.

Doesn't matter from where the print is coming.

Anyway, if you can run the sample with the added commands, you should have enough info to reuse those in your code.

I changed some things up and was able to get almost everything. For whatever reason, it is not giving me the producer -- it's returning the author, jobname, etc. Perhaps it's too long or the trademark and copyright symbols are throwing it off?
iText(tm) 7.1.9 (c)2000-2019 iText Group NV (AGPL-version)

Me too, even using the simple word "Producer".
This is why the line where it is set is commented out, I forgot to explain it.

Ahhh....that makes sense. There's still so much more that I have to figure out how to do with the COM interface. I appreciate the assist on this.