Why does the name keep changing when I use IPXCControlEx.[get_]Printer to create a virtual printer?
Please note that a user asked this question in the PDF XChange forum. They were using a PDF-XChange printer to make PC3s (plotter configuration files) in AutoCAD that contained a link to to the PDF-XChange printer name. Previously they had been using version three of PDF-XChange, in which it was not necessary to know or use the device name as the message events could be used. On PDFXC3_StartDoc all data was sent to the registry. However, in the version to which they had updated, it was necessary to know the device name when documents/DWGs were plotted/printed, and when IPXCControlEx.[get_]Printer was used they had to set a printer name each time.
This issue arose due to an AutoCAD restriction that requires the embedding of the printer name in PC3 files. The same printer name should always be used in AutoCAD, both to prepare PC3 files and to call the PXCControlEx.[get_]Printer function. The reason this issue occured was because when IPXCControlEx.[get_]Printer was called there was already a printer that featured the specified name and, as a result, a new printer was created that had a different name. Therefore we advised the user to ensure the job was complete before it was sent, and also reminded them to release the PXCPrinter objects when they are no longer needed.
If printers are not released then a call to IPXCControlEx.[get_]Printer will create a new printer that has a different name (as the printer with the requested name already exists because it was not released). The correct sequence is to get the printer, use it and then release it. N.b. All 'temporary' printers are removed from the system during spooler start/restart (for example during a system restart).
You can contact us by phone, email or our social media accounts — we are here to assist you.