1 /*****************************************************************************\
2 djgenericvip.cpp : Implimentation for the generic VIP class
4 Copyright (c) 2001-2006, Hewlett-Packard Co.
7 Redistribution and use in source and binary forms, with or without
8 modification, are permitted provided that the following conditions
10 1. Redistributions of source code must retain the above copyright
11 notice, this list of conditions and the following disclaimer.
12 2. Redistributions in binary form must reproduce the above copyright
13 notice, this list of conditions and the following disclaimer in the
14 documentation and/or other materials provided with the distribution.
15 3. Neither the name of Hewlett-Packard nor the names of its
16 contributors may be used to endorse or promote products derived
17 from this software without specific prior written permission.
19 THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED
20 WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
21 MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
22 NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
24 TO, PATENT INFRINGEMENT; PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
25 OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
26 ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
28 THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 \*****************************************************************************/
32 #if defined(APDK_DJGENERICVIP) && defined (APDK_DJ9xxVIP)
36 #include "djgenericvip.h"
37 #include "printerproxy.h"
41 extern uint32_t ulMapDJ600_CCM_K[ 9 * 9 * 9 ];
44 * All VIP printers that are released after the APDK release.
45 * This subclass is mainly there to allow any combination of
49 DJGenericVIP::DJGenericVIP (SystemServices* pSS, BOOL proto)
50 : DJ9xxVIP (pSS, proto)
53 if (!proto && IOMode.bDevID)
55 bCheckForCancelButton = TRUE;
56 constructor_error = VerifyPenInfo ();
57 if (constructor_error != NO_ERROR)
59 constructor_error = NO_ERROR;
67 * For this printer class, allow any print mode to be compatible with
68 * any installed pen set. Printer is expected to do the right thing.
69 * Also, language has to be PCL3GUI because some printers may not work
70 * properly in plain PCL3 mode. ex. PhotoSmart 1xx family. This means
71 * no device text support.
74 pMode[ModeCount++] = new VIPFastDraftMode (); // Fast Draft
75 pMode[ModeCount++] = new VIPGrayFastDraftMode (); // Grayscale Fast Draft
76 pMode[ModeCount++] = new VIPAutoPQMode (); // Printer selects PrintMode
77 pMode[ModeCount++] = new VIPFastPhotoMode (); // Fast Photo
78 pMode[ModeCount++] = new VIPCDDVDMode (); // CD/DVD PrintMode
80 #ifdef APDK_EXTENDED_MEDIASIZE
\r
81 pMode[ModeCount++] = new VIPBrochureNormalMode (); // Normal, Brochure media
\r
82 pMode[ModeCount++] = new VIPPremiumNormalMode (); // Normal, Premium paper
\r
83 pMode[ModeCount++] = new VIPPlainBestMode (); // Best, Plain media
\r
84 pMode[ModeCount++] = new VIPBrochureBestMode (); // Best, Brochure media
\r
85 pMode[ModeCount++] = new VIPPremiumBestMode (); // Best, Premium media
\r
88 for (int i = 0; i < (int) ModeCount; i++)
90 pMode[i]->bFontCapable = FALSE;
91 for (int j = BLACK_PEN; j < MAX_COMPATIBLE_PENS; j++)
93 pMode[i]->CompatiblePens[j] = (PEN_TYPE) j;
96 #ifdef APDK_EXTENDED_MEDIASIZE
98 * Set quality to marvellous for high res (1200 dpi) mode.
99 * This mode was not available in the older printers, which only supported the
100 * media_high_res paper type, but used qualityPresentation for 1200 dpi mode.
102 pMode[4]->theQuality = qualityMarvellous;
106 VIPFastDraftMode::VIPFastDraftMode () : PrintMode (NULL)
108 bFontCapable = FALSE;
109 #ifdef APDK_AUTODUPLEX
110 bDuplexCapable = TRUE;
112 #if defined(APDK_VIP_COLORFILTERING)
113 Config.bErnie = TRUE;
116 Config.bColorImage = FALSE;
119 theQuality = qualityFastDraft;
120 pmQuality = QUALITY_FASTDRAFT;
121 pmMediaType = MEDIA_PLAIN;
122 } // VIPFastDraftMode
124 VIPGrayFastDraftMode::VIPGrayFastDraftMode () : GrayMode (ulMapDJ600_CCM_K)
126 bFontCapable = FALSE;
128 #if defined(APDK_VIP_COLORFILTERING)
129 Config.bErnie = TRUE;
132 Config.bColorImage = FALSE;
134 #ifdef APDK_AUTODUPLEX
135 bDuplexCapable = TRUE;
140 theQuality = qualityFastDraft;
141 pmQuality = QUALITY_FASTDRAFT;
142 pmMediaType = MEDIA_PLAIN;
146 VIPFastPhotoMode::VIPFastPhotoMode () : PrintMode (NULL)
148 bFontCapable = FALSE;
149 #if defined(APDK_VIP_COLORFILTERING)
150 Config.bErnie = FALSE;
152 medium = mediaHighresPhoto;
153 theQuality = qualityFastDraft;
154 pmQuality = QUALITY_FASTDRAFT;
155 pmMediaType = MEDIA_PHOTO;
156 } // VIPFastPhotoMode
158 VIPAutoPQMode::VIPAutoPQMode () : PrintMode (NULL)
162 ResolutionX[0] = 600;
163 ResolutionY[0] = 600;
164 bFontCapable = FALSE;
165 #ifdef APDK_AUTODUPLEX
166 bDuplexCapable = FALSE;
168 #if defined(APDK_VIP_COLORFILTERING)
169 Config.bErnie = TRUE;
172 Config.bColorImage = FALSE;
175 theQuality = qualityAuto;
176 pmQuality = QUALITY_AUTO;
179 VIPCDDVDMode::VIPCDDVDMode () : PrintMode (NULL)
183 ResolutionX[0] = 600;
184 ResolutionY[0] = 600;
185 bFontCapable = FALSE;
186 #ifdef APDK_AUTODUPLEX
187 bDuplexCapable = FALSE;
189 #if defined(APDK_VIP_COLORFILTERING)
190 Config.bErnie = TRUE;
193 Config.bColorImage = FALSE;
196 theQuality = qualityPresentation;
197 pmQuality = QUALITY_BEST;
198 pmMediaType = MEDIA_CDDVD;
201 VIPBrochureNormalMode::VIPBrochureNormalMode () : PrintMode (NULL)
\r
205 ResolutionX[0] = 600;
\r
206 ResolutionY[0] = 600;
\r
207 bFontCapable = FALSE;
\r
208 #ifdef APDK_AUTODUPLEX
\r
209 bDuplexCapable = TRUE;
\r
211 #if defined(APDK_VIP_COLORFILTERING)
\r
212 Config.bErnie = TRUE;
\r
215 Config.bColorImage = FALSE;
\r
217 medium = mediaBrochure;
\r
218 theQuality = qualityNormal;
\r
219 pmQuality = QUALITY_NORMAL;
\r
220 pmMediaType = MEDIA_BROCHURE;
\r
221 } // Added by Lizzie
\r
223 VIPPremiumNormalMode::VIPPremiumNormalMode () : PrintMode (NULL)
\r
227 ResolutionX[0] = 600;
\r
228 ResolutionY[0] = 600;
\r
229 bFontCapable = FALSE;
\r
230 #ifdef APDK_AUTODUPLEX
\r
231 bDuplexCapable = TRUE;
\r
233 #if defined(APDK_VIP_COLORFILTERING)
\r
234 Config.bErnie = TRUE;
\r
237 Config.bColorImage = FALSE;
\r
239 medium = mediaSpecial;
\r
240 theQuality = qualityNormal;
\r
241 pmQuality = QUALITY_NORMAL;
\r
242 pmMediaType = MEDIA_PREMIUM;
\r
243 } // Added by Lizzie
\r
245 VIPPlainBestMode::VIPPlainBestMode () : PrintMode (NULL)
\r
249 ResolutionX[0] = 600;
\r
250 ResolutionY[0] = 600;
\r
251 bFontCapable = FALSE;
\r
252 #ifdef APDK_AUTODUPLEX
\r
253 bDuplexCapable = TRUE;
\r
255 #if defined(APDK_VIP_COLORFILTERING)
\r
256 Config.bErnie = TRUE;
\r
259 Config.bColorImage = FALSE;
\r
261 medium = mediaPlain;
\r
262 theQuality = qualityPresentation;
\r
263 pmQuality = QUALITY_BEST;
\r
264 pmMediaType = MEDIA_PLAIN;
\r
266 } // Added by Lizzie
\r
268 VIPBrochureBestMode::VIPBrochureBestMode () : PrintMode (NULL)
\r
272 ResolutionX[0] = 600;
\r
273 ResolutionY[0] = 600;
\r
274 bFontCapable = FALSE;
\r
275 #ifdef APDK_AUTODUPLEX
\r
276 bDuplexCapable = TRUE;
\r
278 #if defined(APDK_VIP_COLORFILTERING)
\r
279 Config.bErnie = TRUE;
\r
282 Config.bColorImage = FALSE;
\r
284 medium = mediaBrochure;
\r
285 theQuality = qualityPresentation;
\r
286 pmQuality = QUALITY_BEST;
\r
287 pmMediaType = MEDIA_BROCHURE;
\r
288 } // Added by Lizzie
\r
290 VIPPremiumBestMode::VIPPremiumBestMode () : PrintMode (NULL)
\r
294 ResolutionX[0] = 600;
\r
295 ResolutionY[0] = 600;
\r
296 bFontCapable = FALSE;
\r
297 #ifdef APDK_AUTODUPLEX
\r
298 bDuplexCapable = TRUE;
\r
300 #if defined(APDK_VIP_COLORFILTERING)
\r
301 Config.bErnie = TRUE;
\r
304 Config.bColorImage = FALSE;
\r
306 medium = mediaSpecial;
\r
307 theQuality = qualityPresentation;
\r
308 pmQuality = QUALITY_BEST;
\r
309 pmMediaType = MEDIA_PREMIUM;
\r
310 } // Added by Lizzie
\r
312 BOOL DJGenericVIP::UseGUIMode (PrintMode* pPrintMode)
318 * We don't really know beforehand the largest papersize the attached printer
319 * can support. The first reserved nibble after the VIP flag nibble contains
320 * this information. Only firmware version 4 or greater support this feature.
323 PAPER_SIZE DJGenericVIP::MandatoryPaperSize ()
325 BYTE sDevIdStr[DevIDBuffSize];
329 * Try to get the DevID. Advance the pointer to the beginning of the status field.
330 * Currently, only 3 lower bits are used for reporting paper size. Meaning of these
331 * bit-values is as follows:
332 * 000 - Allow any size
339 if ((pSS->GetDeviceID (sDevIdStr, DevIDBuffSize, FALSE)) == NO_ERROR)
341 if ((pStr = strstr ((char *) sDevIdStr, ";S:")) && (pSS->GetVIPVersion ()) >= 3)
343 #ifdef APDK_EXTENDED_MEDIASIZE
344 PAPER_SIZE PaperSizes[8] = {UNSUPPORTED_SIZE, A6, LETTER, B4, SUPERB_SIZE, UNSUPPORTED_SIZE, UNSUPPORTED_SIZE, UNSUPPORTED_SIZE};
346 PAPER_SIZE PaperSizes[8] = {UNSUPPORTED_SIZE, A6, LETTER, B4, UNSUPPORTED_SIZE, UNSUPPORTED_SIZE, UNSUPPORTED_SIZE, UNSUPPORTED_SIZE};
348 char byte12 = pStr[17];
349 short value = (byte12 >= '0' && byte12 <= '9') ? byte12 - '0' :
350 ((byte12 >= 'A' && byte12 <= 'F') ? byte12 - 'A' + 10 :
351 ((byte12 >= 'a' && byte12 <= 'f') ? byte12 - 'a' + 10 : -1));
352 return (value == -1) ? UNSUPPORTED_SIZE : PaperSizes[(value & 0x07)];
355 return UNSUPPORTED_SIZE;
356 } //MandantoryPaperSize
360 * byte 13 - indicates full bleed (to every edge of paper) is supported if
361 * the modifier bit in the lowest position is "set".
364 * 0000b or 0h = Unimplemented, or not specified.
365 * 0001b or 1h = Full bleed (4 edge) printing supported on photo quality papers; this field is a modifier upon the bits in byte 12. That is, if this bit is set, it implies that the "max print width supported" values and smaller widths, ALL support full bleed, 4 edge, printing on photo quality paper.
366 * 0010b or 2h = Full bleed (4 edge) printing supported on non-photo papers (e.g. plain, bond, etc.); this field is a modifier upon the bits in byte 12. If this bit is set, it implies that the "max print width supported" values and smaller widths, all support full bleed, 4 edge, printing on non-photo paper.
367 * nn00b = The "nn" bits are reserved for future definitions
370 BOOL DJGenericVIP::FullBleedCapable (PAPER_SIZE ps, FullbleedType *fbType, float *xOverSpray, float *yOverSpray,
371 float *fLeftOverSpray, float *fTopOverSpray)
373 BYTE sDevIdStr[DevIDBuffSize];
377 // if overspray is passed down and set
\r
378 if (this->m_iTopOverspray && this->m_iLeftOverspray && this->m_iRightOverspray && this->m_iBottomOverspray)
\r
382 * This check is needed because of method override.
\r
383 * Another caller would not pass down this parameter,
\r
384 * and this is default to NULL
\r
386 if (fTopOverSpray)
\r
387 *fTopOverSpray = (float) this->m_iTopOverspray / (float) 1000.0;
\r
388 if (fLeftOverSpray)
\r
389 *fLeftOverSpray = (float) this->m_iLeftOverspray / (float) 1000.0;
\r
391 *xOverSpray = (float) (this->m_iLeftOverspray + this->m_iRightOverspray) / (float) 1000.0;
\r
392 *yOverSpray = (float) (this->m_iTopOverspray + this->m_iBottomOverspray) / (float) 1000.0;
\r
394 *fbType = fullbleed4EdgeAllMedia;
\r
399 if ((pSS->GetDeviceID (sDevIdStr, DevIDBuffSize, FALSE)) == NO_ERROR)
401 if ((pStr = strstr ((char *) sDevIdStr, ";S:")) && (pSS->GetVIPVersion ()) >= 3)
403 char byte13 = pStr[18];
404 short value = (byte13 >= '0' && byte13 <= '9') ? byte13 - '0' :
405 ((byte13 >= 'A' && byte13 <= 'F') ? byte13 - 'A' + 10 :
406 ((byte13 >= 'a' && byte13 <= 'f') ? byte13 - 'a' + 10 : -1));
414 case A6_WITH_TEAR_OFF_TAB:
\r
417 *xOverSpray = (float) 0.12;
418 *yOverSpray = (float) 0.06;
421 *fLeftOverSpray = (float) 0.05;
423 *fTopOverSpray = (float) 0.03;
425 if (ps == PHOTO_SIZE || ps == A6_WITH_TEAR_OFF_TAB)
426 *fbType = fullbleed4EdgeAllMedia;
427 else if ((value != -1) && ((value & 0x03) == 0x03))
428 *fbType = fullbleed4EdgeAllMedia;
429 else if ((value != -1) && ((value & 0x01) == 0x01))
430 *fbType = fullbleed4EdgePhotoMedia;
431 else if ((value != -1) && ((value & 0x02) == 0x02))
432 *fbType = fullbleed4EdgeNonPhotoMedia;
434 *fbType = fullbleed3EdgeAllMedia;
442 if ((value != -1) && (value & 0x03))
444 *xOverSpray = (float) 0.216;
445 *yOverSpray = (float) 0.149;
447 *fLeftOverSpray = (float) 0.098;
449 *fTopOverSpray = (float) 0.051;
451 if ((value & 0x03) == 0x03)
452 *fbType = fullbleed4EdgeAllMedia;
453 else if ((value & 0x01) == 0x01)
454 *fbType = fullbleed4EdgePhotoMedia;
455 else if ((value & 0x02) == 0x02)
456 *fbType = fullbleed4EdgeNonPhotoMedia;
463 *xOverSpray = (float) 0;
464 *yOverSpray = (float) 0;
466 *fLeftOverSpray = (float) 0;
468 *fTopOverSpray = (float) 0;
469 *fbType = fullbleedNotSupported;
482 case A6_WITH_TEAR_OFF_TAB:
\r
487 *xOverSpray = (float) 0.12;
488 *yOverSpray = (float) 0.06;
491 *fLeftOverSpray = (float) 0.05;
493 *fTopOverSpray = (float) 0.03;
495 if (ps == PHOTO_SIZE || ps == A6_WITH_TEAR_OFF_TAB)
496 *fbType = fullbleed4EdgeAllMedia;
\r
497 else if (ps==LETTER||ps==A4||ps==CUSTOM_SIZE)
\r
499 *fbType = fullbleed4EdgeAllMedia;
\r
500 *xOverSpray = (float) 0.1;
\r
501 *yOverSpray = (float) 0.1;
\r
502 if (fLeftOverSpray)
\r
503 *fLeftOverSpray = (float) 0.05;
\r
505 *fTopOverSpray = (float) 0.05;
\r
508 *fbType = fullbleed3EdgeAllMedia;
516 *xOverSpray = (float) 0;
517 *yOverSpray = (float) 0;
519 *fLeftOverSpray = (float) 0;
521 *fTopOverSpray = (float) 0;
522 *fbType = fullbleedNotSupported;
526 BOOL DJGenericVIP::GetMargins (PAPER_SIZE ps, float *fMargins)
528 float xo, yo, xl, yt;
529 FullbleedType fbType = fullbleedNotSupported;
531 if (ps == CDDVD_120 || ps == CDDVD_80)
533 fMargins[0] = (float) 0.06;
534 fMargins[1] = (float) 0.06;
535 fMargins[2] = (float) 0.06;
536 fMargins[3] = (float) 0.06;
540 fMargins[0] = (float) 0.125;
541 fMargins[1] = (float) 0.125;
542 fMargins[2] = (float) 0.125;
543 fMargins[3] = (float) 0.5;
544 if ((FullBleedCapable (ps, &fbType, &xo, &yo, &xl, &yt)) &&
545 (fbType == fullbleed4EdgeAllMedia ||
546 fbType == fullbleed4EdgePhotoMedia ||
547 fbType == fullbleed4EdgeNonPhotoMedia))
549 fMargins[3] = (float) 0.125;
552 if (ps == SUPERB_SIZE)
554 fMargins[0] = (float) 0.125;
555 fMargins[1] = (float) 0.5;
556 fMargins[2] = (float) 0.125;
557 fMargins[3] = (float) 0.75;
564 PHOTOTRAY_STATE DJGenericVIP::PhotoTrayEngaged (BOOL bQueryPrinter)
569 //! Returns TRUE if a hagaki feed is present in printer.
570 BOOL DJGenericVIP::HagakiFeedPresent(BOOL bQueryPrinter)
575 BYTE bDevIDBuff[DevIDBuffSize];
579 bQueryPrinter = FALSE;
582 err = pSS->GetDeviceID(bDevIDBuff, DevIDBuffSize, bQueryPrinter);
588 if ( (pStr=(char *)strstr((const char*)bDevIDBuff+2,";S:")) == NULL )
593 // skip over ";S:<version=2bytes><topcover><inklid><duplexer>"
596 return ((b & 4) == 4);
599 #ifdef APDK_AUTODUPLEX
600 //!Returns TRUE if duplexer and hagaki feed (combined) unit is present in printer.
601 BOOL DJGenericVIP::HagakiFeedDuplexerPresent(BOOL bQueryPrinter)
606 BYTE bDevIDBuff[DevIDBuffSize];
610 bQueryPrinter = FALSE;
613 err = pSS->GetDeviceID (bDevIDBuff, DevIDBuffSize, bQueryPrinter);
619 if ( (pStr=(char *)strstr((const char*)bDevIDBuff+2,";S:")) == NULL )
624 // skip over ";S:<version=2bytes><topcover><inklid>"
627 return ((b & 4) == 4);
632 DRIVER_ERROR DJGenericVIP::VerifyPenInfo ()
635 DRIVER_ERROR err = NO_ERROR;
637 if (IOMode.bDevID == FALSE)
642 err = ParsePenInfo (ePen);
644 if(err == UNSUPPORTED_PEN) // probably Power Off - pens couldn't be read
647 // have to delay or the POWER ON will be ignored
648 if (pSS->BusyWait ((DWORD) 2000) == JOB_CANCELED)
653 DWORD length = sizeof (DJ895_Power_On);
654 err = pSS->ToDevice (DJ895_Power_On, &length);
657 err = pSS->FlushIO ();
660 // give the printer some time to power up
661 if (pSS->BusyWait ((DWORD) 2500) == JOB_CANCELED)
666 err = ParsePenInfo (ePen);
672 * If one or more pens are not installed, check the device id for ReserveMode
673 * capability for this printer. This info in in the flags nibble
674 * ;S:<XX><toplid><supplylic><duplexer><phototray><in-1><in-2><banner><flags>
675 * flags : x1xx - reserve mode supported, x0xx - not supported
678 BYTE sDevIdStr[DevIDBuffSize];
680 BOOL bNeedAllPens = FALSE;
682 if (iNumMissingPens > 0 && ((pSS->GetDeviceID (sDevIdStr, DevIDBuffSize, FALSE)) == NO_ERROR))
684 if ((pStr = strstr ((char *) sDevIdStr, ";S:")))
686 char byte7 = pStr[12];
687 short value = (byte7 >= '0' && byte7 <= '9') ? byte7 - '0' :
688 ((byte7 >= 'A' && byte7 <= 'F') ? byte7 - 'A' + 10 :
689 ((byte7 >= 'a' && byte7 <= 'f') ? byte7 - 'a' + 10 : 0));
690 bNeedAllPens = !(value & 0x04);
694 while (ePen == NO_PEN || (bNeedAllPens && iNumMissingPens > 0))
696 if (ePen == NO_PEN || iNumMissingPens > 0)
698 pSS->DisplayPrinterStatus (DISPLAY_NO_PENS);
700 if (pSS->BusyWait (500) == JOB_CANCELED)
705 err = ParsePenInfo (ePen);
709 pSS->DisplayPrinterStatus(DISPLAY_PRINTING);
714 void DJGenericVIP::AdjustModeSettings (BOOL bDoFullBleed, MEDIATYPE ReqMedia,
715 MediaType *medium, Quality *quality)
719 * Malibu platform printers have a defect that prevents these printers from
720 * performing full-bleed and media detect functions correctly. Check for this
721 * case, i.e., full-bleed and media detect flags and explicitly set the
722 * media type and quality as requested by the application.
725 if (bDoFullBleed && *medium == mediaAuto)
728 if (ReqMedia == MEDIA_PHOTO)
730 *medium = mediaGlossy;
731 *quality = qualityPresentation;
736 *medium = mediaPlain;
737 *quality = qualityNormal;
742 // Added by Lizzie - plain and premium will default to Auto when PQ is not fast draft
\r
743 // so fix the media type here
\r
744 if( ReqMedia == MEDIA_PLAIN)
\r
745 *medium = mediaPlain;
\r
747 if( ReqMedia == MEDIA_PREMIUM)
\r
748 *medium = mediaSpecial;
\r
750 if( ReqMedia == MEDIA_BROCHURE)
\r
751 *medium = mediaBrochure;
\r
753 } // AdjustModeSettings
756 DRIVER_ERROR DJGenericVIP::SendSpeedMechCmd (BOOL bLastPage)
758 DRIVER_ERROR err = NO_ERROR;
762 memcpy (szStr, "\x1B*o5W\x0D\x02\x00\x00\x00", 10);
763 szStr[7] = (BYTE) ((m_iNumPages & 0x00FF0000) >> 16);
764 szStr[8] = (BYTE) ((m_iNumPages & 0x0000FF00) >> 8);
765 szStr[9] = (BYTE) (m_iNumPages & 0x000000FF);
766 err = Send ((const BYTE *) szStr, 10);
769 err = Send ((const BYTE *) "\x1B*o5W\x0D\x05\x00\x00\x01", 10);
773 err = Send ((const BYTE *) "\x1B*o5W\x0D\x05\x00\x00\x00", 10);
780 Header *DJGenericVIP::SelectHeader (PrintContext *pc)
782 return new HeaderDJGenericVIP (this, pc);
785 HeaderDJGenericVIP::HeaderDJGenericVIP (Printer *p, PrintContext *pc) : HeaderDJ990 (p, pc)
790 DRIVER_ERROR HeaderDJGenericVIP::SendCAPy (unsigned int iAbsY)
793 DRIVER_ERROR err = NO_ERROR;
796 sprintf (str, "\x1B*p%dY", iAbsY);
797 err = thePrinter->Send ((const BYTE *) str, strlen (str));
803 DRIVER_ERROR HeaderDJGenericVIP::FormFeed ()
807 return thePrinter->Send ((const BYTE *) &FF, 1);
813 #endif // defined(APDK_DJGENERICVIP) && defined (APDK_DJ9xxVIP)