Boca filter and driver working on Suze Linux, some problems andquestionsonMac OS X

Johan Henselmans johan at netsense.nl
Thu Dec 15 03:32:13 PST 2005


Michael Sweet wrote:
> Johan Henselmans wrote:
>> Michael Sweet wrote:
>>> Johan Henselmans wrote:
>>>> I have built a boca driver and filter for the boca labelprinters.
>>>>
>>>> After some hairpulling I finally found out how the cups raster was 
>>>> built, so I could do some magic bit swapping to get the bits on all 
>>>> the right places.
>>>>
>>>> In the testing, most of it worked from a Linux Suze distribution.
>>>>
>>>> One problem there: The printer is a USB printer and some artefacts 
>>>> seem to remain on the top of the page. Might that be an unclean 
>>>> buffer? How should I proceed to get these artefacts removed?
>>>
>>> How are you reading the raster data?
>>
>>  From pstoraster.
> 
> No, I meant "are you using cupsRasterOpen(), cupsRasterReadHeader(),
> and cupsRasterReadPixels() to read the raster data?"
> 

Ahh, sorry, did not understand the question. I actually use the same 
routines as in rastertodymo.c, the changes are only in the OutputLine 
function.


So in the main() everything is the same and yes, I use


cupsRasterOpen(), cupsRasterReadHeader()and cupsRasterReadPixels()



>  > I get, because of the driver definitions a raw bw
>> bitmap. I read the 8 lines at a time. I had some discussions with the 
>> boca guys. They thought that perhaps the artefacts were caused by 
>> wraparounds to the next 'page', and were remnants of a buffer that 
>> came out dirty after filling the output line. The height of the page 
>> is not a multitude of 8, see.
> 
> You do know that pstoraster does not just output a bitmap - there is
> a header at the top of the page, and starting with CUPS 1.2 the header
> is different and the data is compressed.  The functions are provided
> so you can read the raster data no matter what version of CUPS is
> installed...
> 


Yes, I do know that, I meant that in my testing situation I used 
pstoraster to get the stuff into the cups raster, and not something like 
imagetoraster or what have you.

-Johan




More information about the cups mailing list