« Return to Thread: Printer driver interface different

Re: Printer driver interface different

by LiuYan 刘研 :: Rate this Message:

Reply to Author | View in Thread

I have a similar issue on my HP LaserJet P2015n printer.
I've followed your hint and add the "PrinterDriverData\DocUiHideFlags" to remote samba registry, but it did not work with this HP LaserJet P2015n printer.
I've post it here:
http://www.nabble.com/Different-%22print-preference-dialog%22-between-windows-local-printer-and-samba-shared-printer-td18583819.html

There are many differences between the registry settings of samba shared printer and windows local one.


Martin Zielinski wrote:
Gerald (Jerry) Carter schrieb:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Matthew Forrest wrote:
>>> Does this driver contain a file names UNIDRV.DLL ?  It's probably a
>>> difference in behavior between EMF and RAW printing.
>>>
>> It doesn't contain UNIDRV.DLL
>> It looks like it uses the generic windows PS driver PSCRIPT5.DLL with a
>> bunch of extras - for the UI?
>> The only difference between rpcclient -c 'enumdrivers 3' on samba vs
>> win2k is that the win2k driver has a Monitorname: [RICOH Language
>> Monitor2] entry.
>>
>> Printer Driver Info 3:
>>     Version: [3]
>>     Driver Name: [RICOH Aficio Color5560 PS]
>>     Architecture: [Windows NT x86]
>>     Driver Path: [\\\\LOCALHOST\print$\W32X86\3\PSCRIPT5.DLL]
>>     Datafile: [\\\\LOCALHOST\print$\W32X86\3\RIC55603.PPD]
>>     Configfile: [\\\\LOCALHOST\print$\W32X86\3\PS5UI.DLL]
>>     Helpfile: [\\\\LOCALHOST\print$\W32X86\3\PSCRIPT.HLP]
>
> Matthew,
>
> Set the print processor to RAW on the Windows print server
> and see if the appearance looks the same.
>
[...]

Matthew,

The reason for the gui that is different from the local installation is
a missing registry value.
It's: "PrinterDriverData\DocUiHideFlags" REG_DWORD 000001

I didn't succeed in copying the settings via printui.dll, but I wrote a
little program to set the missing value. I think, this list cuts off the
attachments, so I put it inline. If you cannot compile it, I can send
you a binary as well.

I can't test, if the printer will work as expected, cause I have no
ricoh printer - but the GUI looks the same as the local installation.

Greets,
Martin

--------------------
main.cxx:

#include <windows.h>
#include <stdio.h>

int main (int argc, char *argv[])
{
        if (!argv[1] || *argv[1] == '/') {
        printf ("Usage:   ricoh <printer>\nExample: ricoh
\\\\MYSERVER\\MYPRINTER\n");
                exit (0);
        }

        HANDLE hPrinter;
        PRINTER_DEFAULTS Default = { 0, 0, PRINTER_ACCESS_ADMINISTER };
        DWORD on = 1;

        if (!OpenPrinter(argv[1], &hPrinter, &Default)) {
                printf ("OpenPrinter %s failed\n", argv[1]);
                exit (1);
        }

        BOOL rc =SetPrinterDataEx( hPrinter, "PrinterDriverData",
"DocUiHideFlags", REG_DWORD, (LPBYTE)&on, 4 ) ;
        ClosePrinter (hPrinter);

        printf ("Setting printer data to %s: %s\n", argv[1], rc?"ERROR":"SUCCESS");

        return rc;
}
--------

Makefile:
CXX      =  cl
LINK = link
CXXFLAGS = /nologo /MLd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D
"_CONSOLE" /D "_MBCS" /YX  /FD /GZ /c /D_WIN32_WINNT=0x0500
LFLAGS =  /nologo /subsystem:console /incremental:yes
/pdb:"nwprinter.pdb" /debug /machine:I386 /out:"ricoh.exe" /pdbtype:sept
LIBS = kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib
advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib
odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib
advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib
odbccp32.lib version.lib

.SUFFIXES: .cxx

{.}.cxx{}.obj::
        $(CXX) -c $(CXXFLAGS) $(INCPATH) -Fo @<<
        $<
<<

{src}.cxx{}.obj::
        $(CXX) -c $(CXXFLAGS) $(INCPATH) -Fo @<<
        $<
<<

TARGET = ricoh.exe
OBJECTS = main.obj

$(TARGET) : $(OBJECTS)
     $(LINK) @<<
   $(LFLAGS) $(OBJECTS) $(LIBS)
<<

all: $(TARGET)
main.obj: main.cxx

--
Martin Zielinski mz@seh.de
Softwareentwicklung T +49 (0)521 94226 76

SEH Computertechnik GmbH www.seh.de

--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba

 « Return to Thread: Printer driver interface different