Printing in WIN7 and Server2008

Discussion about printing issues and techniques.

Moderators: Susan Smith, admin, Gabriel

Post Reply
gtisdale
Posts: 218
Joined: Sun Jun 07, 2009 7:54 am
Location: Concord, Massachusetts
Contact:

Printing in WIN7 and Server2008

Post by gtisdale »

One of my clients just had an upgrade to server2008 and win7 workstations.
Reports will not print from the Win7 workstations, but will print from the old XP workstations still connected.

What do I need to do to get the Win7 workstations printing to server based printers?

George
bluesfannoz
Posts: 291
Joined: Fri Jun 19, 2009 9:01 am
Location: Lawrence, Kansas
Contact:

Post by bluesfannoz »

You still didn't answer if this is PRN: or WIN: printing which makes a difference in where to look!

If its PRN: then I would check what printer driver was installed on the WIN 7 machines. It may not be a compatible driver with PRN: printing.

They don't happen to be using Remote Desktop to the server are they?
Steve Koger
Computer Specialist
SEKESC-MACS Division
gtisdale
Posts: 218
Joined: Sun Jun 07, 2009 7:54 am
Location: Concord, Massachusetts
Contact:

Post by gtisdale »

In the current situatio we are trying PRN: printing.

No they are not using reote connection to the server.
bluesfannoz
Posts: 291
Joined: Fri Jun 19, 2009 9:01 am
Location: Lawrence, Kansas
Contact:

Post by bluesfannoz »

Are they able to print to the printers from other Windows applications?

gtisdale wrote:In the current situatio we are trying PRN: printing.

No they are not using reote connection to the server.
Steve Koger
Computer Specialist
SEKESC-MACS Division
gordon
Posts: 358
Joined: Fri Apr 24, 2009 6:02 pm

Post by gordon »

If you SUBSTITUTE PRN:/10 DIRECT:/-printer-name-substring-, Windows will send the print file to the printer bypassing the driver.
GomezL
Posts: 258
Joined: Wed Apr 29, 2009 5:51 am
Contact:

Post by GomezL »

The question ultimately depends on if SPOOLCMD is in effect or not.

PRN: will invoke your batch file if SPOOLCMD is in effect. In that case, you are providing your own Print Driver.

PRN: If Spoolcmd is not in effect is similar to WIN: , I would probably avoid using PRN: instead of WIN: or DIRECT:, but I think this is for compatibility purposes.

WIN: /will print to the "Windows Printer", WIN:/\\Server\share, this will use the "NWP Drivers"

Direct:/ is similar to WIN:, but uses your own Drivers (usually PCL). Direct:\\Server\Share

\\Server\Share will often work, although DIRECT:/\\Server\Share is preferred. Either will use your own drivers.

:\\Server\Share is similar, using your own drivers.

If you still need help, please describe the "PORT" that you are using, you can find these under Printer Properties on the printer for the workstation. Also, please let me know if you are using SPOOLCMD (how is it configured?), and fincally, the actual OPEN #255 statement that you are using. Also if if you are using something like SUBST PRN:/10, the destination port.
gtisdale
Posts: 218
Joined: Sun Jun 07, 2009 7:54 am
Location: Concord, Massachusetts
Contact:

Post by gtisdale »

I'm going out tp the client this morning and will try a simpl program testing the various printing methods to see if I can get anything top print from the WIN7 workstations. The old XP workstations seem to work fine with the new 2008SERVER, but not the WIN7.

Yeszterday I had the tech doing the install (not my person) try a simple

"copy file.txt \\server02\hplaser"

which is essentially what happens when PRN: is used. They receivd an "ACCESS DENIED" on the WIN7, but on the XP the file printed.

SPOOLCMD is active in this client and many of the printjobs are directed to //10 substitute statements with a PRN:/\\server02\hplaser.

I'll see what impact WIN:/\\server02\hplaser or DIRECT:/\\server02\hplaser have.
gordon
Posts: 358
Joined: Fri Apr 24, 2009 6:02 pm

Post by gordon »

Concerning
PRN: If Spoolcmd is not in effect is similar to WIN:
This is not true. PRN: uses the Windows print driver in "pass through" mode. Some Windows print drivers simply don't support pass through mode which generates BR error 6210. And some support the mode, but tamper with the data stream passed to the printer. Others, such as Plain Text seem to pass print streams through unaffected.

DIRECT, on the other hand passes the BR print stream through without processing it through any Windows print driver. This is most preferable when not using Spoolcmd, WIN:, PREVIEW: or PDF:.

WIN: and PREVIEW: use a special API for processing print streams. Escape sequences are interpreted by BR and a variety of commands are issued to Windows printing depending on what the escape sequences direct. This is entirely different form sending a print stream through Windows in PRN: mode.

So while BR interprets escape sequences in WIN:, PREVIEW and PDF: modes, it does not interpret them in PRN: (with or without Spoolcmd) or DIRECT: modes. These escape sequences are passed through to the printer which interprets them. Some of these issues are not always evident because BR Native Windows Printing (NWP) uses many PCL (HP's printer language) escape sequences.

Concerning
Direct:/ is similar to WIN:, but uses your own Drivers (usually PCL).
It uses the print drivers built into the printer instead of those in BR or Windows.

Concerning
SPOOLCMD is active in this client and many of the printjobs are directed to //10 substitute statements with a PRN:/\\server02\hplaser.
At ADS, we continue to use Spoolcmd at sites where many printers exist. It enables us to control in one batch file where print files (for each printer number) are directed to. However, for maintainability we DO NOT use Substitute in conjunction with Spoolcmd. Substitute provides a convenient way to redirect various PRN: files. So do Spoolcmd batch files. It adds obscurity to use two levels of interpretation.

In George's case he prefers to manage his redirection via substitutes instead of in the Spoolcmd batch file. Either way is useful.

The following sample Spoolcmd batch file shows one way to interpret Spoolcmd calls:

Code: Select all

REM Prt.bat
REM Spoolcmd Q:\ads\sys\br.d\prt.bat [SPOOLFILE] [PRINTER]

REM Unremark the Following Statements When Debugging
REM echo %1 %2
REM pause

if "%2"=="10" goto lp1
if "%2"=="20" goto lp2
echo printer %2 not defined
pause

:lp1
copy %1 "\\server\HP Laserjet"
del %1
goto end

:lp2
copy %1 "\\server\printer2"
del %1
goto end

:end

George is definitely on to something when he manually tries copying a spool file to a printer, simulating what his batch file is doing. This will expose his customer's current problem.
gtisdale
Posts: 218
Joined: Sun Jun 07, 2009 7:54 am
Location: Concord, Massachusetts
Contact:

Post by gtisdale »

Just got back from client and have learned some things.

The existing XP workstations work with the 2008Server print just fine using PRN: WIN: DIRECT: modes. The COPY file.txt \\server02\hplaser command also works fine with the xp workstation.

On the Win7 workstations WIN: and DIRECT: work fine. However, my PRN: command, which invokes a .BAT file to copy a preformed file to the printer, would not work. I would get an "Access Denied" message and the print job would fail, but BR would not return an error (because it was being invoked by a system call to a .bat file) and BR would think that the job had printed. The .bat file would then continue and delete the print file.

In order to get it to work we had to make the user THE Administrator, not just a member of the administrator's group. If the user were the Domain Administrator or the Workstation Administrator the print job (or a copy command from a system prompt) would work.

In this case checks to vendors are printed usisng an older routine that requires a softfont download and a PCL signature so we made the check signer the Administrator on his WIN7 machine and it is working. The longer term solution will be to rewrite my check printing routine to use Windows fonts rather than download soft fonts to the printer. I will then be able to use the Windows print stream through WIN: and bypass the Window's security "thing" that prevents users lower than "God" level from copying files to the printers.
gordon
Posts: 358
Joined: Fri Apr 24, 2009 6:02 pm

Post by gordon »

And why not use DIRECT?
gtisdale
Posts: 218
Joined: Sun Jun 07, 2009 7:54 am
Location: Concord, Massachusetts
Contact:

Post by gtisdale »

In most cases DIRECT would work, and I have used it in my substitution commands to fix most of the problems that WIN7 was presenting. However, the routine to print the checks is an older routine where I load three or four soft fonts into a file, each "load" opens and closes the file before adding the next font, then I add in the print information for the check and finally a PCL signature. I then close the file one final time and copy it to the printer. The direct routine that I have used in the past moves pieces of the file or print job to the printer in "chunks". The breaks between these chunks often, but not always, corrupt the soft fonts and the signature PCL code by inserting extra spaces or carrialge returns.

It is a great incentive for me to rewite the routine into something that works smoothly in the current environment and makes proper use of the WIN: capabilities.
bluesfannoz
Posts: 291
Joined: Fri Jun 19, 2009 9:01 am
Location: Lawrence, Kansas
Contact:

Post by bluesfannoz »

This sounds like you need to add the Server as trusted in the Internet Options in Control Panel. You cannot run executables or scripts off a share without being prompted unless the server is trusted in Internet Options. Make sure if your share was created with IP address that you use that in the Internet Options.



gtisdale wrote:Just got back from client and have learned some things.

The existing XP workstations work with the 2008Server print just fine using PRN: WIN: DIRECT: modes. The COPY file.txt \\server02\hplaser command also works fine with the xp workstation.

On the Win7 workstations WIN: and DIRECT: work fine. However, my PRN: command, which invokes a .BAT file to copy a preformed file to the printer, would not work. I would get an "Access Denied" message and the print job would fail, but BR would not return an error (because it was being invoked by a system call to a .bat file) and BR would think that the job had printed. The .bat file would then continue and delete the print file.

In order to get it to work we had to make the user THE Administrator, not just a member of the administrator's group. If the user were the Domain Administrator or the Workstation Administrator the print job (or a copy command from a system prompt) would work.

In this case checks to vendors are printed usisng an older routine that requires a softfont download and a PCL signature so we made the check signer the Administrator on his WIN7 machine and it is working. The longer term solution will be to rewrite my check printing routine to use Windows fonts rather than download soft fonts to the printer. I will then be able to use the Windows print stream through WIN: and bypass the Window's security "thing" that prevents users lower than "God" level from copying files to the printers.
Steve Koger
Computer Specialist
SEKESC-MACS Division
bluesfannoz
Posts: 291
Joined: Fri Jun 19, 2009 9:01 am
Location: Lawrence, Kansas
Contact:

Post by bluesfannoz »

Here is how you add a Trusted Server to your Local Intranet:

Look for this Icon in your Control Panel(Win 7, Vista, XP) Classic Control Panel

Image

Double Click it and you should get this Window. Make sure you select the Security Tab It will start off on General.

Image

Click on the 'Local Intranet' Icon

Image

Click on the 'Sites' Button, you will get this Window

Image

Click on the 'Advanced' Button, you will get this Window

Image

Type in the address to the server '\\servername' or '\\192.168.15.200' and click on 'Add', It should add the server like below.

Image

Use 'Close' to get out. Make sure you close all open windows, do not use the 'Cancel' button or your changes will not be saved. Make sure all instances of Internet explorer are closed. Reboot the computer. This should then take effect.

This usually will also stop the Warning message you often get when trying to run BR32.exe from that drive share.


Image
Steve Koger
Computer Specialist
SEKESC-MACS Division
Post Reply