How to find out end of file in raster format

solomon slmnraj.raj25 at gmail.com
Mon Dec 7 11:54:36 PST 2009


> On Dec 7, 2009, at 8:51 AM, solomon wrote:
> > ...
> >  I tried with the above code but it's not breaking when the end of =
> file is reached, it's printing white space as much as cups.Height which =
> i mentioned in ppd file.
>
> OK, CUPS has no notion of a automatic-variable-length page - you need to =
> specify the actual page length when you submit the print job and CUPS =
> (and the corresponding RIP filter - cgpdftoraster or pstoraster) will =
> generate raster data of that height.
>
> > ...
> > what should i do?
>
> The best you could do is always take full-length page and then look for =
> blank lines in the raster data - when you see blank lines, just start =
> counting them and if all that remains on the current page are blanks =
> then you don't need to send anything else to the printer, otherwise you =
> send however many blank lines to the printer followed by the next =
> non-blank content.
>
> ___________________________________________________
> Michael Sweet, Senior Printing System Engineer
>
>
>
 Thanks for reply once again

  as you said earlier we tried this didn't succeed

  if (cupsRasterReadPixels(ras, buffer, header.cupsBytesPerLine))
   OutputLine(&header);
  else
   break;

how do i find out blank lines in the raster data ?
is it like
ex:  if(buffer == NULL) // declare as blank line

Please give me some ideas

thanks











More information about the cups-devel mailing list