clawsoftware / clawPDF

Open Source Virtual (Network) Printer for Windows that allows you to create PDFs, OCR text, and print images, with advanced features usually available only in enterprise solutions.
https://github.com/clawsoftware/clawPDF
GNU Affero General Public License v3.0
658 stars 147 forks source link

clawPDF uses wrong queue/profile for multiple printers #84

Open NitroxydeX opened 1 year ago

NitroxydeX commented 1 year ago

In clawPDF 0.9.2 something seems to be broken with profiles or how the printer is added to the system and the profile is attached to it.

Regardless of how many printers I add and if network mode is enabled or not the printer is always using the wrong profile (this is especially frustrating with multiple printers [which are actually just multiple queues under the same printer] but for whatever reason it isn't working with only one printer either)

clawPDF is always using the first user created profile if I have a specific profile selected for the printer and even if the primary printer is changed in Windows or clawPDF itself.

If looking into the log clawPDF is using the wrong profile here: [Debug] clawSoft.clawPDF.Workflow.WorkflowFactory.CreateWorkflow where it shows me the first profile I did create but not the one I actually choose.

ThinkEV commented 1 year ago

I can confirm this error.

clawsoftware commented 1 year ago

@NitroxydeX @ThinkEV The profiles created must be assigned to the printer for each user. It is a user setting until now and is not stored system-wide. If you use Shared Network Printing, the profiles must be assigned to the printers under the service account user.

NitroxydeX commented 1 year ago

@clawsoftware I did create an extra user as according to the wiki for network printers and assigned on that user the different profiles to the different printers.

I then shared the printers on the Server through the Print Management with the Admin-Account.

Maybe I misunderstood the last point in the wiki "Share the printer and distribute it using GPO."

But regardless of that as I stated in my first post: It doesn't matter if it is in network mode or not. Even with the local account it always uses the wrong profile for printing.

clawsoftware commented 1 year ago

@NitroxydeX Did the problem also occur with 0.9.0 or 0.9.1? Have you tried a clean install with 0.9.2?

NitroxydeX commented 1 year ago

@NitroxydeX I made a clean install for every version now. 0.9.0, 0.9.1 and 0.9.2 - all share the same problem. It's ignoring the choosen profile.

clawsoftware commented 1 year ago

@NitroxydeX What operating system version are you using? Can you please give me the output of these two commands:

reg query "HKEY_CURRENT_USER\Software\clawSoft\clawPDF\Settings\ApplicationSettings" /v LastUsedProfileGuid reg query "HKEY_CURRENT_USER\Software\clawSoft\clawPDF\Settings\ApplicationSettings\PrinterMappings\0" /v ProfileGuid

NitroxydeX commented 1 year ago

@clawsoftware Windows Server 2016

C:\Users\clawpdf>reg query "HKEY_CURRENT_USER\Software\clawSoft\clawPDF\Settings\ApplicationSettings" /v LastUsedProfileGuid

HKEY_CURRENT_USER\Software\clawSoft\clawPDF\Settings\ApplicationSettings
    LastUsedProfileGuid    REG_SZ    ac77cb83-188e-4371-ba19-7c29c570546d

C:\Users\clawpdf>reg query "HKEY_CURRENT_USER\Software\clawSoft\clawPDF\Settings\ApplicationSettings\PrinterMappings\0" /v ProfileGuid

HKEY_CURRENT_USER\Software\clawSoft\clawPDF\Settings\ApplicationSettings\PrinterMappings\0
    ProfileGuid    REG_SZ    af3bf0e1-1efb-4647-89b4-9451f840dee5

It doesn't matter which printer I try LastUsedProfileGuid never changes.

NitroxydeX commented 1 year ago

Just some more information on this:

[Debug] clawSoft.clawPDF.JobInfoQueue.Add: PrinterName: doesn't contain a printer name - that's why it fallbacks.