How to find out end of file in raster format

solomon slmnraj.raj25 at gmail.com
Sat Dec 5 23:32:48 PST 2009


Hi,

I am developing a filter for my custom printer, i am developing based on rastertoepson filter. i want to know one thing how to find out when do we reach end of file of the printable file.

suppose in main before entering in to print data we are checking for end of file using while statement as shown below:
 while (cupsRasterReadHeader2(ras, &header))

this loop will execute up to end of file. but if my page is longer than end of file(printable file) i want to quit the printing may be as shown below

for (y = 0;((y < header.cupsHeight) && (cupsRasterReadHeader2(ras, &header))); y ++)

Now cups is giving error is like "Unable to allocate memory" is it runtime error?

finally my question is how do i reach command for end of file
Ex: if(!cupsRasterReadHeader2(ras, &header))
    break;
can i use this statement in for loop?

Thanks in advance.





More information about the cups mailing list