Custom Printer Preferences resetting after restarting Printer Spooler/Restarting PC - printing

I have come across a second PC whereby if I Create a New Form with a different paper size, Save the Form and set the new Form as the printer's preference it will save correctly.
but when I restart the printer spooler service/restart the PC the custom Form I created for the printer is reset to another existing form (e.g. Letter)
This started in 2022, could it be a windows 10 update regression? (because I am not experiencing this issue on windows 7/server 2012) or has someone solved this?
Current Solution: When I restart the spooler and custom preferences are reset and set them again and restart the spooler again too, then all will be good for a while(days) before custom preferences are auto-reset

Related

Zebra Printer GK420d flashes green once, but doesn't print

I'm using a service on multiple computers that is essentially a socket and TcpListener that listens on a port for a message. This message is a byte array of ZPL code. The service then sends this array to a USB connected Zebra GK420d printer and then prints it. The byte array is sent from another application where users select different label layouts for different products. The other computers do not have admin privileges but i do not think this is the cause.
I've got the printers working on the computer at my desk and one other computer, but on other computers (about 10 more) it doesn't . All computers have a connected USB Zebra GK420d printer.
The issue I'm having is the printers flash green once, but it does not print. I know for a fact the service works fine, as when I view a CMD window, I see the ZPL message and the printer it is trying to send to. This suggests the service works and the printer gets the message, hence the flash.
I've tried a variety of drivers, updating the drivers, different USB ports, updating the .Net on the computers, deleting the printers and reinstalling them etc but nothing seems to be fixing the issue. They print test pages fine so i'm not sure what the issue is.
The computers/printers all now have identical printer properties / preferences / drivers and Windows version. However the printers were all bought at different times over the last 6 years.
I strongly recommend using the text based driver. If you are sending ZPL, that's the the cleanest option. If it didn't work before, try a simpler label/ZPL blob; there could be something wrong with the ZPL you are sending.
Else, I found this: https://code-examples.net/en/q/43c80a
Right-click on the Printer and choose "Properties".
On the "General" tab, click on the "Printing Preferences..." button.
On the "Advanced Setup" tab, click on the "Other" button.
Make sure there is a check in the box labeled "Enable Passthrough Mode".
Make sure the "Start sequence:" is "${".
Make sure the "End sequence:" is "}$".
Click on the "Close" button.
Click on the "OK" button.
Click on the "OK" button.
In code, add "${" to the beginning of ZPL and "}$" to the end. This is with the Windows driver for ZDesigner.
Turns out it was due to the ZPL code not having a new line at the end of each ZPL file that got sent over the stream.

How to Automatically pull printer settings from printer into the print queue?

Is there a way to automate (trigger) the queue properties -> configuration -> 'Update Now-Ask Printer' button? I need to pull configuration information directly from the printer itself into the queue. Driver is Lexmark Universal v2 XL if that matters... I think PrintUI only triggers specifics if they are in the registry. Not sure if Printui can be used? (Win server 2008 r2, 32bit)
I think I found a way to automatically do this, the three corresponding checkbox registry keys under configuration are DCDPrtPropOK (On Properties Open), OnPortChange and UpdateConfigurationFromPrinter. Values are 1 ā€“ ON, or 0 ā€“ OFF. Actual location is (computer\HKLM\SYSTEM\CurrentControlSet\Control\Print(drivername)\PrinterDriverData.
Essentially, we need to change DCDPrtPropOK to 1, then run this command:
rundll32 printui.dll,PrintUIEntry /p /n "Lexmark Universal v2 XLā€
as a non adm (users if the have the rights) command prompt to trigger Printer Properties. This should force the printer to open the Printer Properties window, and ask the printers for the settings.

SATO Label Printer - Inconsistency Between Printers

We use SATO CL412e printers to print labels (3x7), with the label coming from a local SSRS report. Until recently, this setup worked without issue. A few months ago we modified the label, and implemented (new implementation) at one site (Site A). Then a few weeks ago, we pushed the change out to another site (Site B) that had previously been using this label (old version). Since we did this, the label at Site B is... weird.
The barcode is quite clearly not right, and all the normal characters are squished together, and perhaps bolded. Theoretically, we have proved that it is not the application (which recently changed as well) or the label report because it works fine at Site A, as well as from a different printer (same model, same drivers, etc.) at Site B.
Yesterday the drivers at Site B were updated to match Site A, which resulted in no change. This morning we found a few settings in the web interface that were different. I have not heard yet, but I seriously doubt it will have an effect.
What am I missing? To date, this exactly configuration works on three printers, and fails on one. I am at a complete loss as to what to check next. What could possibly cause this behavior?
Edit:
It has been discovered that this happens only through RDP. When we use a Citrix connection to the same server, we have no problem. It has been suggested that maybe this is a problem with the Internet Explorer settings. Any basis to this, and what settings?
RDP has a feature which connects your local printers to the remote server. This can mean the printer you get when connected with RDP is different than the printer when you are locally working on that server, or using Citrix. It's possible your local workstation has the same printer defined with different settings.
In your RDP connection dialog, click "Settings" and click the "Local resources" tab. Then clear the "Printers" checkbox to prevent this behavior.

Pspad "File contents were changed. Reload?" dialog bug

I've been using PsPad for quite some time now, always on Windows XP never a problem. But since I've upgraded to Windows7, PsPad is throwing the confirmation dialog "File contents were changed. Reload?" when it doesn't have to. I can reproduce this annoying message by: editing a file, saving it (to the fileserver win3k over a network), viewing that file/page in the browser, going back to PsPad to work on the file. After that last point it throws the dialog, while obviously nothing has changed in the meantime.
Does anybody experience the same bug? Is there something to do about it? PsPad forum has a thread about this, but no solution is provided there.
You can switch it off in program settings / Direct edit button
CheckDocChanges=0
You can switch it off in program settings / Direct edit button CheckDocChanges=0
The DIRECT EDIT button it's a button to the left of the OK button on the program settings dialog box ( in version 4.5.4 ). It's not entirely intuitive but it's there alright if you look.
This occurs because the time on your server and your workstations are not in sync. You can set your workstation to synchronize with the same timeserver as your server, which you will have to find out yourself or from your admin.
To change the time server on your workstation do the following
Open date and time
Go to Internet Time
Change Settings
Put in the server
Click update now and OK

QuickReport throws "There Is No Default Printer Currently Selected" Exception

I have created a Delphi Service which prints TQuickReports. Everything works fine if compiled and run as a Windows Application. But when converted to operate as a service trying to create a form containing a TQuickRep component throws the exception.
This service runs fine on many other boxes but not this one in particular. Here are some details:
Using QuickReport version 4.07
Box is a Windows Server 2008 operating system.
Using Delphi 2007
Printer.Printers.Count is returning a positive value. In fact I can list out all of the printers.
I have tried running the service both using Local System Account and Logged on as an Admin.
Is there a default printer set up in session 0? Remember that under Vista / Server 2008 / Windows 7, services run in a separate session. Whether or not the logged-in user has a default printer set is not relevant - it's a per-session setting and doesn't affect session 0.
Can you rewrite the code to gracefully handle that exception and pick a printer to use?
You can solve this problem by creating a new dword UserSelectedDefault with the value: 1 in
HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows\SessionDefaultDevices\Session_ID
Make sure you have a local printer selected.
You might give the user a way to select the printer for the service. The Windows service probably does not have a default printer set.
Set TQuickRep.PrinterSettings.PrinterIndex to set the printer number. Then, TQuickRep.Print to print the report.
A colleague ended up finding the solution. I should have added these are "network" printers and not Local printers (at the time I didn't think this was related to the problem). So the service needed to be installed with "NetworkService" as the user account under the logon tab. From the Windows Help:
To specify that the service uses the Network Service account, click This account, and
then type NT AUTHORITY\NetworkService
We had a simular problem here. Using TS servers, Citrix and Powerfuse 9.
Powerfuse had all printers capitalized, however they were shared in a mixed case.
This combination caused Delphi/QReport to crash
When all printers are from printserver to powerfuse in the same case (not important upper or lower or even mixed), the problem was gone
Actually it is a Delphi(5) problem. The comparison of the available printers and the default printer is case sensitive (Printers.pas):
if TPrinterDevice(Objects[I]).Device = Device then
begin
with TPrinterDevice(Objects[I]) do
SetPrinter(PChar(Device), PChar(Driver), PChar(Port), 0);
Exit;
end;
Changing the comparison to:
if lowercase(TPrinterDevice(Objects[I]).Device) = lowercase(Device)
solves the problem.
If using terminal services 2008, same user for multiple sessions, you should look into the:
HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows\SessionDefaultDevices\Session_ID
instead of
HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows\
I solved a similar problem: If a Delphi application (or service) uses QuickReport, it runs before the system loads the default printer (or printers).
When QuickReport executes TQRPrinter.Init, the printer.printers.count is zero,
shortly after the system loads, the printer.printers.count is the number of printers,
but tqrprinter.int has already executed, so TQRPrinter.FPrinterOK is false,
you then see this error when you try open a QuickReport.
The solution for me was wait until the printers were loaded before launching the application (in citrix and terminal server). I solved this in two ways, either by overwriting tqrprinter or delay the dpr.

Resources