Remember when you set a generic printer to print to a file you will be ask for the file name when xprint assigns the printer. This will not happen if you edit the printer definition and set the file name there. I have a program that uses xprint to print to a defined generic printer that is called c:\test.txt.
Ks
Announcement
Collapse
No announcement yet.
XPRINT failed on some computers
Collapse
X
-
I too have had no luck with printers that were redirected to file with xprint.
This was really during testing purposes for my xprint preview/print that i use.
It's not a pbcc problem per se, as the same problem is in pbwin, so I suspect it's somehow just not handled in xprint (or it's real slow and i didn't wait long enough).
Leave a comment:
-
Does your code also check LEN(XPRINT$) after ATTACH?
IF ERR = 0 AND LEN(XPRINT$) > 0 THEN
Leave a comment:
-
The only thing I can think of is have them go into printers and faxes and
cancel all print jobs if any. Be sure they are clicking on the correct printer to be sure there aren't jobs in there.
If that doesn't do it, then re-install the generic printer driver and use the share name. Also, have them do a test print to isolate it to the driver rather than your software. Also, might check the right click option of
the printer and be sure that offline is not checked.
Leave a comment:
-
>> Maybe the share name needs to be used?
as far as I know they have tried this too.
This two affected computer are not here in town.
What I have seen so far, there is some HP printer software installed.
Maybe this could be the culprit ?
The code works here on my side (Domain with one shared generic printer for file output) without any problems.
Leave a comment:
-
I just added a generic printer using XP SP2 and system gave it a share name of "GenericT".
Maybe the share name needs to be used?
This worked and returned no errors. Don't know about that redirect.
XPRINT ATTACH "GenericT"Last edited by Mike Doty; 10 Apr 2008, 10:04 AM.
Leave a comment:
-
Mike,
>> 'Get error 68 on attach and 57 on print (which is expected.)
I get no error condition for XPRINT ATTACH and XPRINT FONT
First error in this line
XPRINT "some text" -> Error 57
Thank you for trying
-Uwe
Leave a comment:
-
'Get error 68 on attach and 57 on print (which is expected.)
'Just placed this here for easier testing.
Code:#COMPILE EXE #DIM ALL FUNCTION PBMAIN () AS LONG XPRINT ATTACH "Generic Printer" ? "Attach" + STR$(ERRCLEAR) XPRINT FONT "Courier New", 10, 0 ? "FONT" + STR$(ERRCLEAR) XPRINT "some text" ? "XPRINT" + STR$(ERRCLEAR) XPRINT CLOSE ? "CLOSE " + STR$(ERRCLEAR) WAITKEY$ END FUNCTION
Leave a comment:
-
XPRINT failed on some computers
Hello All,
environment
WinXP/Win2000 Prof
PC/CC 4.04
Generic Printer redirected to file
this works
wordpad
select font Courier New
input "some text"
print to "Generic Printer"
file created and filled with text
this won't
XPRINT ATTACH "Generic Printer" ' OK
XPRINT FONT "Courier New", 10, 0 ' OK
XPRINT "some text" ' Error 57 - no output, empty file
above code used for HP LaserJet on LPT1 on the same computer works like expected.
above code used on other computers works like a charm
Any idea what would raise error 57 while using XPRINT "text" ?
Thank you
-UweTags: None
Leave a comment: