1 /*****************************************************************************\
2 ljzjs.cpp : Implementation for the LJZjs class
4 Copyright (c) 1996 - 2007, 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_LJZJS_MONO) || defined (APDK_LJZJS_COLOR) || defined (APDK_LJM1005)
36 #include "printerproxy.h"
37 #include "resources.h"
45 int (*HPLJJBGCompress) (int iWidth, int iHeight, unsigned char **pBuff,
46 HPLJZjcBuff *pOutBuff, HPLJZjsJbgEncSt *pJbgEncSt);
47 int (*HPLJSoInit) (int iFlag);
53 extern void *LoadPlugin (const char *szPluginName);
56 const unsigned char LJZjs::szByte1[256] =
58 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
59 0, 0, 0, 0, 2, 2, 2, 2, 2, 2, 2, 2,
60 2, 2, 2, 2, 2, 2, 2, 2, 8, 8, 8, 8,
61 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
62 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
63 10, 10, 10, 10, 32, 32, 32, 32, 32, 32, 32, 32,
64 32, 32, 32, 32, 32, 32, 32, 32, 34, 34, 34, 34,
65 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
66 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
67 40, 40, 40, 40, 42, 42, 42, 42, 42, 42, 42, 42,
68 42, 42, 42, 42, 42, 42, 42, 42, 128, 128, 128, 128,
69 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128,
70 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130,
71 130, 130, 130, 130, 136, 136, 136, 136, 136, 136, 136, 136,
72 136, 136, 136, 136, 136, 136, 136, 136, 138, 138, 138, 138,
73 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
74 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160,
75 160, 160, 160, 160, 162, 162, 162, 162, 162, 162, 162, 162,
76 162, 162, 162, 162, 162, 162, 162, 162, 168, 168, 168, 168,
77 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168,
78 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
81 const unsigned char LJZjs::szByte2[256] =
83 0, 2, 8, 10, 32, 34, 40, 42, 128, 130, 136, 138,
84 160, 162, 168, 170, 0, 2, 8, 10, 32, 34, 40, 42,
85 128, 130, 136, 138, 160, 162, 168, 170, 0, 2, 8, 10,
86 32, 34, 40, 42, 128, 130, 136, 138, 160, 162, 168, 170,
87 0, 2, 8, 10, 32, 34, 40, 42, 128, 130, 136, 138,
88 160, 162, 168, 170, 0, 2, 8, 10, 32, 34, 40, 42,
89 128, 130, 136, 138, 160, 162, 168, 170, 0, 2, 8, 10,
90 32, 34, 40, 42, 128, 130, 136, 138, 160, 162, 168, 170,
91 0, 2, 8, 10, 32, 34, 40, 42, 128, 130, 136, 138,
92 160, 162, 168, 170, 0, 2, 8, 10, 32, 34, 40, 42,
93 128, 130, 136, 138, 160, 162, 168, 170, 0, 2, 8, 10,
94 32, 34, 40, 42, 128, 130, 136, 138, 160, 162, 168, 170,
95 0, 2, 8, 10, 32, 34, 40, 42, 128, 130, 136, 138,
96 160, 162, 168, 170, 0, 2, 8, 10, 32, 34, 40, 42,
97 128, 130, 136, 138, 160, 162, 168, 170, 0, 2, 8, 10,
98 32, 34, 40, 42, 128, 130, 136, 138, 160, 162, 168, 170,
99 0, 2, 8, 10, 32, 34, 40, 42, 128, 130, 136, 138,
100 160, 162, 168, 170, 0, 2, 8, 10, 32, 34, 40, 42,
101 128, 130, 136, 138, 160, 162, 168, 170, 0, 2, 8, 10,
102 32, 34, 40, 42, 128, 130, 136, 138, 160, 162, 168, 170,
103 0, 2, 8, 10, 32, 34, 40, 42, 128, 130, 136, 138,
107 LJZjs::LJZjs (SystemServices* pSS, int numfonts, BOOL proto)
108 : Printer(pSS, numfonts, proto)
112 #ifdef APDK_AUTODUPLEX
113 m_bRotateBackPage = FALSE; // Lasers don't require back side image to be rotated
115 m_pszInputRasterData = NULL;
116 m_dwCurrentRaster = 0;
117 m_bStartPageSent = FALSE;
118 HPLJJBGCompress = NULL;
119 m_hHPLibHandle = NULL;
120 m_iPrinterType = UNSUPPORTED;
122 m_hHPLibHandle = LoadPlugin ("lj.so");
126 *(void **) (&HPLJJBGCompress) = dlsym (m_hHPLibHandle, "hp_encode_bits_to_jbig");
127 *(void **) (&HPLJSoInit) = dlsym (m_hHPLibHandle, "hp_init_lib");
128 if (!HPLJSoInit || (HPLJSoInit && !HPLJSoInit (1)))
130 constructor_error = PLUGIN_LIBRARY_MISSING;
134 if (HPLJJBGCompress == NULL)
136 constructor_error = PLUGIN_LIBRARY_MISSING;
138 //Issue: LJZJSMono class printers not printing in RHEL
\r
139 //Cause: Since start page is common for LJZJSMono and LJZJSColor class, the items of
\r
140 //LJZJSColor-2 format was used for LJZJSMono due to below variable not initialised
\r
141 //Fix: Added initialisation so that correct LJZJSMono items are used.
\r
142 //Variable is updated in LJZJSColor.
\r
143 m_bLJZjsColor2Printer = FALSE;
\r
152 dlclose (m_hHPLibHandle);
155 if (m_pszInputRasterData)
157 delete [] m_pszInputRasterData;
161 HeaderLJZjs::HeaderLJZjs (Printer* p,PrintContext* pc)
166 DRIVER_ERROR HeaderLJZjs::Send ()
168 DRIVER_ERROR err = NO_ERROR;
170 WORD wItems[3] = {ZJI_DMCOLLATE, ZJI_PAGECOUNT, ZJI_DMDUPLEX};
173 QUALITY_MODE eQuality;
177 thePrintContext->GetPrintModeSettings (eQuality, cmt, ccm, cdt);
179 if (((LJZjs *) thePrinter)->m_iPrinterType == eLJM1005)
181 strcpy (szStr, "\x1B\x25-12345X@PJL JOB\x0D\x0A");
182 strcpy (szStr+strlen (szStr), "@PJL SET JAMRECOVERY=OFF\x0D\x0A");
183 strcpy (szStr+strlen (szStr), "@PJL SET DENSITY=3\x0D\x0A");
184 strcpy (szStr+strlen (szStr), "@PJL SET RET=MEDIUM\x0D\x0A");
185 strcpy (szStr+strlen (szStr), "@PJL SET ECONOMODE=");
186 if (eQuality == QUALITY_DRAFT)
188 strcpy (szStr+strlen (szStr), "ON\x0D\x0A");
192 strcpy (szStr+strlen (szStr), "OFF\x0D\x0A");
194 err = thePrinter->Send ((const BYTE *) szStr, strlen (szStr));
197 strcpy (szStr, "\x1B\x25-12345X,XQX");
198 err = thePrinter->Send ((const BYTE *) szStr, strlen (szStr));
199 memset (szStr, 0x0, 92);
203 i += ((LJZjs *) thePrinter)->SendIntItem ((BYTE *) szStr+i, 0x80000000, 0x04, 0x54);
204 i += ((LJZjs *) thePrinter)->SendIntItem ((BYTE *) szStr+i, 0x10000005, 0x04, 0x01);
205 i += ((LJZjs *) thePrinter)->SendIntItem ((BYTE *) szStr+i, 0x10000001, 0x04, 0x00);
206 i += ((LJZjs *) thePrinter)->SendIntItem ((BYTE *) szStr+i, 0x10000002, 0x04, 0x00);
207 i += ((LJZjs *) thePrinter)->SendIntItem ((BYTE *) szStr+i, 0x10000000, 0x04, 0x00);
208 i += ((LJZjs *) thePrinter)->SendIntItem ((BYTE *) szStr+i, 0x10000003, 0x04, 0x01);
209 i += ((LJZjs *) thePrinter)->SendIntItem ((BYTE *) szStr+i, 0x80000001, 0x04, 0xDEADBEEF);
210 err = thePrinter->Send ((const BYTE *) szStr, i);
214 strcpy (szStr, "\x1B\x25-12345X@PJL ENTER LANGUAGE=ZJS\x0A");
215 err = thePrinter->Send ((const BYTE *) szStr, strlen (szStr));
218 memset (szStr, 0, 256);
220 strcpy (szStr, "JZJZ");
223 szStr[i+11] = ZJT_START_DOC;
230 for (int j = 0; j < 3; j++)
233 szStr[i+5] = (char) wItems[j];
234 szStr[i+6] = ZJIT_UINT32;
238 err = thePrinter->Send ((const BYTE *) szStr, i);
242 int LJZjs::MapPaperSize ()
244 switch (thePrintContext->GetPaperSize ())
246 case LETTER: return 1;
247 case LEGAL: return 5;
251 case OUFUKU: return 43;
252 case HAGAKI: return 43;
253 #ifdef APDK_EXTENDED_MEDIASIZE
256 // case LEDGER: return 4;
257 case EXECUTIVE: return 7;
258 // case CUSTOM_SIZE: return 96;
259 case ENVELOPE_NO_10: return 20;
260 case ENVELOPE_DL: return 27;
261 case FLSA: return 258;
267 DRIVER_ERROR LJZjs::StartPage (DWORD dwWidth, DWORD dwHeight)
269 DRIVER_ERROR err = NO_ERROR;
273 DWORD dwNumItems = (m_bIamColor) ? 15 : 14;
274 BYTE szStr[16 + 15 * 12];
277 int iMediaType = 1; // Plain paper
279 if (m_bStartPageSent)
283 m_bStartPageSent = TRUE;
284 err = thePrintContext->GetPrintModeSettings (cqm, cmt, m_cmColorMode, cdt);
285 if (cmt == MEDIA_TRANSPARENCY)
289 else if (cmt == MEDIA_PHOTO)
294 if (m_iPrinterType == eLJM1005)
296 int iOutputResolution = GetOutputResolutionY ();
\r
297 if (cqm == QUALITY_BEST)
\r
298 iOutputResolution = (int) thePrintContext->EffectiveResolutionY ();
299 memset (szStr, 0x0, sizeof (szStr));
302 err = Send ((const BYTE *) szStr, 8);
304 i += SendIntItem (szStr+i, 0x80000000, 0x04, 0xB4);
305 i += SendIntItem (szStr+i, 0x20000005, 0x04, 0x01);
306 i += SendIntItem (szStr+i, 0x20000006, 0x04, 0x07);
307 i += SendIntItem (szStr+i, 0x20000000, 0x04, 0x01);
308 i += SendIntItem (szStr+i, 0x20000007, 0x04, 0x01);
309 i += SendIntItem (szStr+i, 0x20000008, 0x04, (int) thePrintContext->EffectiveResolutionX ());
310 i += SendIntItem (szStr+i, 0x20000009, 0x04, iOutputResolution);
311 i += SendIntItem (szStr+i, 0x2000000D, 0x04, (int) dwWidth);
312 i += SendIntItem (szStr+i, 0x2000000E, 0x04, (int) m_dwLastRaster);
313 i += SendIntItem (szStr+i, 0x2000000A, 0x04, m_iBPP);
314 i += SendIntItem (szStr+i, 0x2000000F, 0x04, (int) dwWidth/m_iBPP);
315 i += SendIntItem (szStr+i, 0x20000010, 0x04, (int) m_dwLastRaster);
316 i += SendIntItem (szStr+i, 0x20000011, 0x04, 0x01);
317 i += SendIntItem (szStr+i, 0x20000001, 0x04, MapPaperSize ());
318 i += SendIntItem (szStr+i, 0x80000001, 0x04, 0xDEADBEEF);
319 err = Send ((const BYTE *) szStr, i);
323 if(m_bLJZjsColor2Printer)
327 if (m_cmColorMode == COLOR && m_bIamColor)
333 i += SendChunkHeader (szStr, 16 + dwNumItems * 12, ZJT_START_PAGE, dwNumItems);
337 i += SendItem (szStr+i, ZJIT_UINT32, ZJI_PLANE, iPlanes);
339 i += SendItem (szStr+i, ZJIT_UINT32, ZJI_DMPAPER, MapPaperSize ());
340 i += SendItem (szStr+i, ZJIT_UINT32, ZJI_DMCOPIES, thePrintContext->GetCopyCount ());
341 i += SendItem (szStr+i, ZJIT_UINT32, ZJI_DMDEFAULTSOURCE, thePrintContext->GetMediaSource ());
342 i += SendItem (szStr+i, ZJIT_UINT32, ZJI_DMMEDIATYPE, iMediaType);
343 i += SendItem (szStr+i, ZJIT_UINT32, ZJI_NBIE, iPlanes);
344 i += SendItem (szStr+i, ZJIT_UINT32, ZJI_RESOLUTION_X, thePrintContext->EffectiveResolutionX ());
345 i += SendItem (szStr+i, ZJIT_UINT32, ZJI_RESOLUTION_Y, thePrintContext->EffectiveResolutionY ());
346 i += SendItem (szStr+i, ZJIT_UINT32, ZJI_RASTER_X, dwWidth);
347 i += SendItem (szStr+i, ZJIT_UINT32, ZJI_RASTER_Y, m_dwLastRaster);
348 i += SendItem (szStr+i, ZJIT_UINT32, ZJI_VIDEO_BPP, m_iBPP);
349 i += SendItem (szStr+i, ZJIT_UINT32, ZJI_VIDEO_X, dwWidth/m_iBPP);
350 i += SendItem (szStr+i, ZJIT_UINT32, ZJI_VIDEO_Y, m_dwLastRaster);
351 if(!m_bLJZjsColor2Printer)
353 i += SendItem (szStr+i, ZJIT_UINT32, ZJI_RET, RET_ON);
354 i += SendItem (szStr+i, ZJIT_UINT32, ZJI_TONER_SAVE, (cqm == QUALITY_DRAFT) ? 1 : 0);
357 err = Send ((const BYTE *) szStr, i);
361 int LJZjs::SendChunkHeader (BYTE *szStr, DWORD dwSize, DWORD dwChunkType, DWORD dwNumItems)
363 for (int j = 3, i = 0; j >= 0; j--)
365 szStr[i] = (BYTE) ((dwSize >> (8 * (j))) & 0xFF);
366 szStr[4+i] = (BYTE) ((dwChunkType >> (8 * (j))) & 0xFF);
367 szStr[8+i] = (BYTE) ((dwNumItems >> (8 * (j))) & 0xFF);
371 szStr[12] = (BYTE) (((dwNumItems * 12) & 0xFF00) >> 8);
372 szStr[13] = (BYTE) (((dwNumItems * 12) & 0x00FF));
379 int LJZjs::SendItem (BYTE *szStr, BYTE cType, WORD wItem, DWORD dwValue, DWORD dwExtra)
383 for (j = 3, i = 0; j >= 0; j--)
385 szStr[i++] = (BYTE) ((dwExtra >> (8 * (j))) & 0xFF);
387 szStr[i++] = (BYTE) ((wItem & 0xFF00) >> 8);
388 szStr[i++] = (BYTE) ((wItem & 0x00FF));
389 szStr[i++] = (BYTE) cType;
391 for (j = 3; j >= 0; j--)
393 szStr[i++] = (BYTE) ((dwValue >> (8 * (j))) & 0xFF);
398 int LJZjs::SendIntItem (BYTE *szStr, int iItem, int iItemType, int iItemValue)
402 for (j = 3; j >= 0; j--)
404 szStr[i++] = (BYTE) ((iItem >> (8 * (j))) & 0xFF);
406 for (j = 3; j >= 0; j--)
408 szStr[i++] = (BYTE) ((iItemType >> (8 * (j))) & 0xFF);
410 for (j = 3; j >= 0; j--)
412 szStr[i++] = (BYTE) ((iItemValue >> (8 * (j))) & 0xFF);
417 DRIVER_ERROR LJZjs::SkipRasters (int iBlankRasters)
419 DRIVER_ERROR err = NO_ERROR;
421 int iPlanes = (m_cmColorMode == COLOR) ? 4 : 1;
422 for (int i = 1; i <= iPlanes; i++)
424 bLastPlane = (i == iPlanes) ? TRUE : FALSE;
425 for (int j = 0; j < iBlankRasters; j++)
427 err = this->Encapsulate (NULL, bLastPlane);
433 DRIVER_ERROR HeaderLJZjs::FormFeed ()
435 DRIVER_ERROR err = NO_ERROR;
437 err = thePrinter->Flush (0);
442 DRIVER_ERROR HeaderLJZjs::SendCAPy (unsigned int iAbsY)
447 DRIVER_ERROR LJZjs::Flush (int FlushSize)
449 DRIVER_ERROR err = NO_ERROR;
450 if (m_dwCurrentRaster == 0)
454 err = SkipRasters ((m_dwLastRaster - m_dwCurrentRaster));
458 DRIVER_ERROR LJZjs::JbigCompress ()
460 DRIVER_ERROR err = NO_ERROR;
461 HPLJZjcBuff myBuffer;
462 int iPlanes = (m_cmColorMode == COLOR) ? 4 : 1;
463 int iIncr = (m_bIamColor) ? 100 : m_dwLastRaster;
468 m_pszInputRasterData,
469 m_pszInputRasterData + (m_dwWidth * m_iBPP * m_dwLastRaster),
470 m_pszInputRasterData + (m_dwWidth * m_iBPP * m_dwLastRaster * 2),
471 m_pszInputRasterData + (m_dwWidth * m_iBPP * m_dwLastRaster * 3)
473 myBuffer.pszCompressedData = new BYTE[m_dwWidth * m_dwLastRaster * m_iBPP];
474 myBuffer.dwTotalSize = 0;
478 for (DWORD y = 0; y < m_dwLastRaster; y += iIncr)
480 for (int i = 0; i < iPlanes; i++)
482 memset (myBuffer.pszCompressedData, 0, m_dwWidth * m_dwLastRaster * m_iBPP);
483 myBuffer.dwTotalSize = 0;
484 p = bitmaps[i] + (y * m_dwWidth * m_iBPP);
486 if (y + iIncr > m_dwLastRaster)
488 iHeight = m_dwLastRaster - y;
491 HPLJJBGCompress (m_dwWidth * 8 * m_iBPP, iHeight, &p, &myBuffer, &se);
495 StartPage (se.xd, se.yd);
497 err = this->SendPlaneData (i + 1, &se, &myBuffer, (y + iIncr) >= m_dwLastRaster);
501 delete [] myBuffer.pszCompressedData;
502 m_dwCurrentRaster = 0;
503 m_pszCurPtr = m_pszInputRasterData;
504 memset (m_pszCurPtr, 0, (m_dwWidth * m_dwLastRaster * iPlanes * m_iBPP));
512 /*JBig Compress for LJZjsColor-2 Printers
513 Separate function written for LJZjsColor-2 Printers, since for them, compression is done for whole plane data at a time
514 whereas for other deiveces, compression is done for 100 lines of each plane*/
515 DRIVER_ERROR LJZjs::JbigCompress_LJZjsColor2 ()
517 DRIVER_ERROR err = NO_ERROR;
518 HPLJZjcBuff myBuffer;
520 int iPlanes = (m_cmColorMode == COLOR) ? 4 : 1;
521 int arrPlanesOrder[] = {3,2,1,4};
526 BYTE *pbUnCompressedData = NULL;
530 m_pszInputRasterData,
531 m_pszInputRasterData + (m_dwWidth * m_iBPP * m_dwLastRaster),
532 m_pszInputRasterData + (m_dwWidth * m_iBPP * m_dwLastRaster * 2),
533 m_pszInputRasterData + (m_dwWidth * m_iBPP * m_dwLastRaster * 3)
536 myBuffer.pszCompressedData = new BYTE[m_dwWidth * m_dwLastRaster * m_iBPP];
537 if(NULL == myBuffer.pszCompressedData)
539 return ALLOCMEM_ERROR;
541 myBuffer.dwTotalSize = 0;
543 for (int nPlaneCount = 0; nPlaneCount < iPlanes; nPlaneCount++)
546 memset (myBuffer.pszCompressedData, 0, m_dwWidth * m_dwLastRaster * m_iBPP);
547 myBuffer.dwTotalSize = 0;
549 if(4 == iPlanes)/*If there are 4 planes follow LJZjsColor-2 order of 3 2 1 4*/
551 pbUnCompressedData = bitmaps[arrPlanesOrder[nPlaneCount]-1] ;
553 else /* Should not happen */
559 iHeight = m_dwLastRaster; /*Send all scan lines at one go*/
561 HPLJJBGCompress (m_dwWidth * 8 * m_iBPP, iHeight, &pbUnCompressedData, &myBuffer, &se);
565 StartPage (se.xd, se.yd);
568 err = this->SendPlaneData (arrPlanesOrder[nPlaneCount], &se, &myBuffer, FALSE);
572 delete [] myBuffer.pszCompressedData;
573 m_dwCurrentRaster = 0;
574 m_pszCurPtr = m_pszInputRasterData;
575 memset (m_pszCurPtr, 0, (m_dwWidth * m_dwLastRaster * iPlanes * m_iBPP));
582 DRIVER_ERROR HeaderLJZjs::EndJob ()
584 DRIVER_ERROR err = NO_ERROR;
587 if (((LJZjs *) thePrinter)->m_iPrinterType == eLJM1005)
589 memset (szStr, 0, 8);
591 strcpy ((char *) szStr+8, "\x1B\x25-12345X@PJL EOJ\x0D\x0A\x1B\x25-12345X");
592 err = thePrinter->Send ((const BYTE *) szStr, 8 + strlen ((char *) (szStr+8)));
597 memset (szStr, 0, 64);
600 szStr[7] = ZJT_END_DOC;
603 err = thePrinter->Send ((const BYTE *) szStr, 16);
607 Header *LJZjs::SelectHeader (PrintContext* pc)
609 DRIVER_ERROR err = NO_ERROR;
615 err = pc->GetPrintModeSettings (cqm, cmt, m_cmColorMode, cdt);
617 if (m_cmColorMode == COLOR && m_bIamColor)
622 m_dwWidth = pc->OutputPixelsPerRow () / 8;
625 m_dwWidth = (m_dwWidth / 8 + 1) * 8;
627 m_dwLastRaster = (int) (pc->PrintableHeight () * pc->EffectiveResolutionY () + 0.5);
628 dwSize = m_dwWidth * m_dwLastRaster * iPlanes * m_iBPP;
629 m_pszInputRasterData = new BYTE[dwSize];
630 if (m_pszInputRasterData == NULL)
634 m_pszCurPtr = m_pszInputRasterData;
635 memset (m_pszCurPtr, 0, dwSize);
636 thePrintContext = pc;
637 return new HeaderLJZjs (this,pc);
640 DRIVER_ERROR LJZjs::VerifyPenInfo()
647 DRIVER_ERROR LJZjs::ParsePenInfo (PEN_TYPE& ePen, BOOL QueryPrinter)
657 #endif // defined APDK_LJZJS_MONO || defined APDK_LJZJS_COLOR || defined APDK_LJM1005