Page 1 of 1

Might PDQ use more diskspace than CUPS?

Posted: Mon 02 Jul 2007, 22:14
by menno
PDQ use 3 state's . First is Language second Filter third IO .
Each of this creates a file . First it copy's the input to xxx.raw .
Second it makes a xxx.converted after that a xxx.filtered . The last one is send to the actual printer device . There is nothing wrong with it , the only thing is that is use lot of diskspace . Ex. a pdf of 1.2Mb converted and filtered to a PSC1200 becomes 200Mb . But PDQ does not delete this files after finising . I have tryed to change this , but I donn't know how . I tryed to read the source but I donn't understand it . It becomes much wurce if you send this to a sharedprinter by samba , then the max diskspace is dubbled .

I understund that we try to keep Puppy small . In that way I would ask how does CUPS behave to diskspace uses and how large is it .

timely

Posted: Tue 03 Jul 2007, 00:53
by raffy
Thanks for asking, Menno. Printing is indeed one difficult area in the older Puppy versions. Am right now struggling in printing in 2.02Regression in diskless machines (!). I hope this question of yours will lead to something. :)

For the readers' info, menno has been helping Puppy users since 2005 (or was it 2004?).

Posted: Tue 03 Jul 2007, 19:30
by jcoder24
Newer puppies are going to be CUPS, but for now you can 'fix' PDQ as follows:

In /etc/pdq/printrc change:

Code: Select all

              job_history_duration 3600 
              to 
              job_history_duration 0

Quoted from: http://pdq.sourceforge.net/man/printrc.5.html

Code: Select all

job_history_duration i
              Any information in the job directory  (  job_dir  )
              will  not be deleted until it is at least i seconds
              old.  The default is 259200 (3 days).

Posted: Thu 05 Jul 2007, 11:35
by menno
Thanks for your reaction .
Ofcourse , jcoder24 , that will do something to keep the system clean .
But it does not solve the problem of diskspace because you have to have temporarly a lot of diskspace . More if there are more jobs to print .

I have try some things , but none of it really works . I ame sorry raffy .
To safe space the only thing you can do is to remove writing to xxx.filtered by directly goto the printer device . That works but you cann't kill the job through XPDQ , you have todo that bij hand . By putting a locking mechanisme you can have more than one print job waiting .

The otherway I tryed was in write a new script to print . It seem to work but not if you pipe to it . This is what most program seem to do . I mean something as "cat file | lpr" . I donn't know how to detect if there is something in the stdin or not . A "cat <&0" waits , if there is nothing in the pipe . It wait for the keyboard .

experiment

Posted: Thu 05 Jul 2007, 22:12
by menno
This only a techical way to try to get a lower diskspace .
I find a durty way to findout if a pipe has data yes or no .
But still I have to copy it(the pipe) to a file , I cann't (for now) find a way to do this otherwise .
I used it by linking it to lpr and test it with abi , firefox , numeric and the all work . Also you can print directly by "lpr <file>" , it know ps,pdf,txt files .
Most people have only one or two printer so you to add your own printer into the script .
I build in the pcl 5 and psc1200 as example .
A disadvanties is , donn't send no more then two jobs at the same time to the same io port . I did not test what would happed .
Also a disadvanties is that I have no GUI for selecting a printer .
If you like to try it put both file for the .zip into /usr/bin and link lpm to lpr .