Article View: borland.public.cppbuilder.nativeapi
Article #14014Re: HP 20ps printer doesn't work with my c++ code.
From: Vladimir Afanasyev
Date: Fri, 05 Sep 2003 07:38
Date: Fri, 05 Sep 2003 07:38
63 lines
3073 bytes
3073 bytes
Hi,
May be different level of emulation.
In one case it may be do printer in another case may be driver.
WritePrinter sends data to printer directly by definition.
Try to find printers description on hp site.
Vladimir.
"Richard Yu" <richard@colorselector.com> wrote:
>I use the following code for PS printing, it works well with my 2 other
>network printers, p8200 and hp 4500
>GetDefaultPrinter(PrinterName, &BytesCopied);//ok
> port=PrinterName;
>
> aPrinterName=PrinterName;
> aPSList->Add(" 350 30 moveto ");
> aPSList->Add("("+aPrinterName+")"+" show");
> aPSList->Add("showpage");
>
> buffer = (char *)malloc(PRINT_BUF_SIZE);
>
> OpenPrinterA(port, &printer, NULL);
> di.pDocName ="";// wbuf;
>
> di.pOutputFile = NULL;
> di.pDatatype = TEXT("RAW");
> StartDocPrinter(printer, 1, (LPBYTE)&di);
>
>
> for(int i=0;i< aPSList->Count;i++)
> {
> aLine=aPSList->Strings[i]+" \r\n";
> buffer=aLine.c_str();
> WritePrinter(printer, (LPVOID)buffer, aLine.Length(), &written);
> }
>
> EndDocPrinter(printer);
> ClosePrinter(printer);
>
>
>but when I switch to the HP 20ps USB printer, can't print any thing, I also
>tries using ghostscript 's tool , gview, no printer action.
>
>but other apps like wordpad, can print with selection of (HP DesignJet 20PS
>by HP only), I have checked in the code, the printer name I got is right,
>
>HP 20ps is a inkjet UBS, PS emulation printer,
>
>I have tried HP 2600 inkjet network printer, it's an ps emulation printer
>too, my code works on it.
>
>what could be the cause ? the USB ? the 20PS specific property ?
>
>this 20ps printer, after installation, you can see in the control panel, two
>icons related to 20ps, one is HP DesignJet 20PS by HP (this works with
>wordpad...)
>
>the other is hp designjet 20ps RIP, I have tried them both, nothing
>happened, RIP is another tool that can accept loading printing job by
>dragging ,
>
>
Technical Details
Message-ID:
<3f583d5f$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-06!sn-xit-08!supernews.com!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<3f57aa76$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,bb667f613de42596 X-Google-Attributes: gid10cc67,public X-Google-ArrivalTime: 2003-09-05 00:40:04 PST From: "Vladimir Afanasyev" <avv@systema.kiev.ua> Sender: "Vladimir Afanasyev" <avv@systema.kiev.ua> Reply-To: "Vladimir Afanasyev" <avv@systema.kiev.ua> Subject: Re: HP 20ps printer doesn't work with my c++ code. Newsgroups: borland.public.cppbuilder.nativeapi X-User-Info: 212.82.216.226 212.82.216.226 X-Forwarded-For: 192.168.0.147 References: <3f57aa76$1@newsgroups.borland.com> NNTP-Posting-Host: 207.105.83.65 Message-ID: <3f583d5f$1@newsgroups.borland.com> Date: 5 Sep 2003 00:38:07 -0700 X-Trace: newsgroups.borland.com 1062747487 207.105.83.65 (5 Sep 2003 00:38:07 -0700) Lines: 64 Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-06!sn-xit-08!supernews.com!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail