Code:
Hello, Is there someone who can get me started on converting the monochrome PCL to support 256bpp and color? I used the windows DDK bitmap print driver, enhanced it to support PCL. This was written a few years back. Now I am working on converting it to support color. This is how the code looks Ofcourse there is always HP guide but please I need some code to compare what needs to be done extra for color? // Universal Exit char bufUnivExit[10]; StringCchPrintfA(bufUnivExit, 10, "%c%s", 27, "%-12345X"); // 9 chars MoveMemory(pOemPDEV->pBufStart, bufUnivExit, 10); dwOffset += 9; // PJL char bufPJL[38]; StringCchPrintfA(bufPJL, 38, "%s%c%c", "@PJL COMMENT ROMFOBMAYCE TEST-PRINT", 13, 10); // 37 chars MoveMemory(pOemPDEV->pBufStart + dwOffset, bufPJL, 38); dwOffset += 37; // PCL Esc char bufEsc[3]; StringCchPrintfA(bufEsc, 3, "%c%s", 27, "E"); // 2 chars MoveMemory(pOemPDEV->pBufStart + dwOffset, bufEsc, 3); dwOffset += 2; // Raster Res char bufRes[8]; StringCchPrintfA(bufRes, 8, "%c%s%d%s", 27, "*t", pPubDM->dmYResolution, "R"); // 7 chars MoveMemory(pOemPDEV->pBufStart + dwOffset, bufRes, 8); dwOffset += 7; // Units of Measure char bufUOM[8]; StringCchPrintfA(bufUOM, 8, "%c%s%d%s", 27, "&u", pPubDM->dmYResolution, "D"); // 7 chars MoveMemory(pOemPDEV->pBufStart + dwOffset, bufUOM, 8); dwOffset += 7; // Raster Presentation char bufPres[6]; StringCchPrintfA(bufPres, 6, "%c%s", 27, "*r3F"); // 5 chars MoveMemory(pOemPDEV->pBufStart + dwOffset, bufPres, 6); dwOffset += 5; // Orientation char bufOrient[6]; if (pPubDM->dmOrientation == 1) orient = 0; else orient = 1; StringCchPrintfA(bufOrient, 6, "%c%s%d%s", 27, "&l", orient, "O"); // 5 chars MoveMemory(pOemPDEV->pBufStart + dwOffset, bufOrient, 6); dwOffset += 5; // Paper Size char bufPaperSize[6]; if (pPubDM->dmPaperSize == 1) pageSize = 2; else pageSize = 3; StringCchPrintfA(bufPaperSize, 6, "%c%s%d%s", 27, "&l", pageSize, "A"); // 5 chars MoveMemory(pOemPDEV->pBufStart + dwOffset, bufPaperSize, 6); dwOffset += 5; // Set horizontal and vertical registration (page margins) char bufRegistration[14]; StringCchPrintfA(bufRegistration, 14, "%c%s", 27, "&l-180u-360Z"); // 13 chars MoveMemory(pOemPDEV->pBufStart + dwOffset, bufRegistration, 14); dwOffset += 13; // Write it to the spooler dwWritten = pDevObj->pDrvProcs->DrvWriteSpoolBuf(pDevObj, pOemPDEV->pBufStart, 90);+
file: /Techref/member/SC-gmail-9A7/index.htm, 3KB, , updated: 2020/5/2 17:45, local time: 2024/4/17 21:54,
owner: SC-gmail-9A7,
18.221.146.223:LOG IN
|
©2024 These pages are served without commercial sponsorship. (No popup ads, etc...).Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE. Questions? <A HREF="http://www.piclist.com/Techref/member/SC-gmail-9A7/index.htm"> Member Homepage for SC-gmail-9A7</A> |
Did you find what you needed? |