Tiny Core Linux

Tiny Core Extensions => TCE Q&A Forum => Topic started by: floppy on August 28, 2011, 11:24:28 AM

Title: cups-pdf not printing; already error during chosing virtual printer in leafpad
Post by: floppy on August 28, 2011, 11:24:28 AM
hello,
I installed cups-pdf and made the virtual printer setup.
I tried to make a print: by choosing the printer, an error appear, and no pdf is printed.
has somebody an idea what is going on here?

screenshot with the error message 
in leafpad http://imagebin.org/170008 (http://imagebin.org/170008)
and in cups browser http://imagebin.org/170009 (http://imagebin.org/170009)

Complement 11.09.2011: by trying to print out of leafpad, the print job stop with the error "empty print file!"
Title: Re: cups-pdf not printing; already error during chosing virtual printer in leafpad
Post by: Juanito on August 28, 2011, 11:45:39 AM
Just to double-check, you are using cups-pdf with cups and not cups-pdf with cups1311?

Could you try to print from a terminal window using "lpr /path-to-file/filename" and copy/paste the errors you get.
Title: Re: cups-pdf not printing; already error during chosing virtual printer in leafpad
Post by: floppy on September 10, 2011, 04:01:17 PM
Just to double-check, you are using cups-pdf with cups and not cups-pdf with cups1311?
I am loading cups-pdf. Then with the dep, I suppose cups is automatically loaded.
(for your other advice, I will try when I have a bit more time).
Title: Re: cups-pdf not printing; already error during chosing virtual printer in leafpad
Post by: floppy on September 11, 2011, 05:45:49 PM
"lpr file.txt" bring the message
lpr: Error - no default destination available.
Title: Re: cups-pdf not printing; already error during chosing virtual printer in leafpad
Post by: Juanito on September 11, 2011, 11:32:18 PM
You need to either set the printer as the default (one way to do this is to use the cups browser interface), or:
Code: [Select]
$ lpr -P printer_name file_name
Title: Re: cups-pdf not printing; already error during chosing virtual printer in leafpad
Post by: floppy on September 12, 2011, 02:17:11 AM
I made a "lpr -P Virtual_PDF_Printer file.txt", then
no errors happens.
the job in the cups-browser show has a state "completed" which is new (before, by printing out of leafpad it had the status "stopped, empty print file!").
I was searching the pdf file in home/temp: nothing is there.
(I modified cups-pdf.conf  from "Out /var/spool/cups-pdf/${USER}" in "Out ${HOME}/temp"   so, I was expecting to see the file in /home/tmp).
Title: Re: cups-pdf not printing; already error during chosing virtual printer in leafpad
Post by: Juanito on September 12, 2011, 03:51:24 AM
(I modified cups-pdf.conf  from "Out /var/spool/cups-pdf/${USER}" in "Out ${HOME}/temp"   so, I was expecting to see the file in /home/tmp).

It would appear in /home/tc/tmp, no? Is the file file.txt or file.pdf or file.txt.pdf anywhere under /var or /home?
Title: Re: cups-pdf not printing; already error during chosing virtual printer in leafpad
Post by: floppy on September 12, 2011, 04:00:13 AM
I dont find the pdf anywhere (with the lpr command; despite no error appear). curious.
printing out of leafpad show the identical error (empty file).
Title: Re: cups-pdf not printing; already error during chosing virtual printer in leafpad
Post by: Juanito on September 12, 2011, 05:39:04 AM
Does printing work on the same machine to an actual printer?
Title: Re: cups-pdf not printing; already error during chosing virtual printer in leafpad
Post by: floppy on September 12, 2011, 08:02:00 AM
I never tried with TCL. I will (need few days) with an HP 4110 allinone (USB connection).
It worked before with Win98.
Title: Re: cups-pdf not printing; already error during chosing virtual printer in leafpad
Post by: beerstein on September 12, 2011, 08:09:21 AM
Hi:
I am getting the same error in Leafpad on all of my PCs:
"no default destination....."
after setting the printer as default this message disappered. I never was able to show a
print preview on screen from Leafpad. Although a preview worked with Abiword.

Some printer installations print via Leafpad others do not.
Title: Re: cups-pdf not printing; already error during chosing virtual printer in leafpad
Post by: Juanito on September 12, 2011, 08:36:30 AM
Note that you'll most probably need hplip + cups for that..
Title: Re: cups-pdf not printing; already error during chosing virtual printer in leafpad
Post by: beerstein on September 12, 2011, 03:13:32 PM
I thought hplip is only required for HP printers?
Title: Re: cups-pdf not printing; already error during chosing virtual printer in leafpad
Post by: Juanito on September 12, 2011, 11:27:29 PM
Correct - there was an HP 4110 allinone mentioned..
Title: Re: cups-pdf not printing; already error during chosing virtual printer in leafpad
Post by: floppy on September 13, 2011, 04:43:47 PM
hello Juanito,
no printing is possible (either pdf.. nor hp4110) from opera or from leafpad.
the lpr - P ..PDF command seems to work (status "completed") but no pdf file was created.
See different errors in the screenshot.
http://imagebin.org/172327 (http://imagebin.org/172327)
so.. I'm in the dark..
Title: Re: cups-pdf not printing; already error during chosing virtual printer in leafpad
Post by: Juanito on September 13, 2011, 11:31:39 PM
cups, cups-pdf and hplip all work for me "straight out of the box", so I'm guessing something is missing somewhere.

What does this give:
Code: [Select]
$ ldd /usr/local/lib/cups/filter/pstoraster
Title: Re: cups-pdf not printing; already error during chosing virtual printer in leafpad
Post by: netnomad on September 14, 2011, 12:01:13 PM
as i mentioned i have a similar problem:
http://forum.tinycorelinux.net/index.php/topic,11016.0.html (http://forum.tinycorelinux.net/index.php/topic,11016.0.html)

but it depends what program wants to use cups,
some print fine, others "print empty pages".

Quote
$ ldd /usr/local/lib/cups/filter/pstoraster
i get::
tc@box:~$ ldd /usr/local/lib/cups/filter/pstoraster
/usr/local/lib/cups/filter/pstoraster: error while loading shared libraries: /usr/local/lib/cups/filter/pstoraster: invalid ELF header
Title: Re: cups-pdf not printing; already error during chosing virtual printer in leafpad
Post by: Juanito on September 14, 2011, 01:24:05 PM
tc@box:~$ ldd /usr/local/lib/cups/filter/pstoraster
/usr/local/lib/cups/filter/pstoraster: error while loading shared libraries: /usr/local/lib/cups/filter/pstoraster: invalid ELF header

Sorry, pstoraster is a script, not an app - I'm out of ideas as to why it doesn't work for you.
Title: Re: cups-pdf not printing; already error during chosing virtual printer in leafpad
Post by: floppy on September 14, 2011, 03:47:33 PM
as i mentioned i have a similar problem:
http://forum.tinycorelinux.net/index.php/topic,11016.0.html (http://forum.tinycorelinux.net/index.php/topic,11016.0.html)

but it depends what program wants to use cups,
some print fine, others "print empty pages".

Quote
$ ldd /usr/local/lib/cups/filter/pstoraster
i get::
tc@box:~$ ldd /usr/local/lib/cups/filter/pstoraster
/usr/local/lib/cups/filter/pstoraster: error while loading shared libraries: /usr/local/lib/cups/filter/pstoraster: invalid ELF header

me too..  ldd /usr/local/lib/cups/filter/pstoraster
/usr/local/lib/cups/filter/pstoraster: error while loading shared libraries: /usr/local/lib/cups/filter/pstoraster: invalid ELF header

Complement: I am starting cups with a script after boot, anytime during a session (not on demand; not at boot).

Name: quickprint.sh
Content:
tce-load -i /mnt/hda2/tce/optional/cups-pdf.tcz
tce-load -i /mnt/hda2/tce/optional/hplip-2.7.tcz
sudo /usr/local/etc/init.d/cups start

In my .filetool.lst I have
...
/usr/local/etc/cups/ppd   (with virtual_pdf and hp4100..PPD .. in it)
/usr/local/etc/cups/printers.conf
/usr/local/etc/cups/cups-pdf.conf
/etc/shadow
...

and:
printers.conf is empty. Perhaps I should delete it from .filetool.lst?
cups-pdf.conf is the original file ( I did not modify anything today.. perhaps again the OUT parameter later when pdf printing is running).
Title: Re: cups-pdf not printing; already error during chosing virtual printer in leafpad
Post by: Juanito on September 14, 2011, 11:52:04 PM
me too..  ldd /usr/local/lib/cups/filter/pstoraster
/usr/local/lib/cups/filter/pstoraster: error while loading shared libraries: /usr/local/lib/cups/filter/pstoraster: invalid ELF header

Again, that was my mistake - ldd is for apps/libs and not scripts - pstoraster is a script.

Since the hp4110 is supported by hplip, I'm guessing you're missing an extension or you didn't select the cups driver (as opposed to user supplied ppd) during the "add printer" dialogue with the cups browser interface.

After setting the log level to debug in cupsd.conf and restarting cups, does the error log show anything useful?
Title: Re: cups-pdf not printing; already error during chosing virtual printer in leafpad
Post by: floppy on September 15, 2011, 02:36:44 PM
What dio you mean this is a script?
should I do "sh /usr/local/lib/cups/filter/pstoraster.sh" in a terminal  ?
I will check your new suggestions when I am at my desktop.
Title: Re: cups-pdf not printing; already error during chosing virtual printer in leafpad
Post by: Rich on September 15, 2011, 03:02:01 PM
Hi floppy
A script is like a batch file.
Title: Re: cups-pdf not printing; already error during chosing virtual printer in leafpad
Post by: Juanito on September 16, 2011, 02:36:05 AM
Here's what I get:
Code: [Select]
$ lpr -P Virtual_PDF_Printer cairo.tcz.info
$ ls -l /var/spool/cups-pdf/tc
total 12
-rw-------    1 tc       staff         9005 Sep 16 10:28 cairo_tcz_info.pdf

and:
Code: [Select]
$ /usr/local/lib/cups/filter/pstoraster
INFO: Starting GPL Ghostscript 9.00...
DEBUG: Running /usr/local/bin/gs -dQUIET -dPARANOIDSAFER -dNOPAUSE -dBATCH -dNOMEDIAATTRS -sDEVICE=cups -sstdout=%stderr -sOUTPUTFILE=%stdout -c  -f -_
INFO: Start rendering...
INFO: Processing page 1...
.. I guess it stops at this point since it has no data to work on

Edit: These extensions are loaded: ghostscript, ghostscript_common, hplip-2.7, cups, cups-pdf, libcups, libusb
Title: Re: cups-pdf not printing; already error during chosing virtual printer in leafpad
Post by: Onyarian on November 14, 2011, 03:03:19 AM
I have load cups-pdf in tc 4.0.2 and don't work without the ghostscript_common.tcz extension loaded, so I think is necessary to put this extension in the dep file of cups-pdf.tcz.
Without this extension gives the "empty file" error.
Title: Re: cups-pdf not printing; already error during chosing virtual printer in leafpad
Post by: Juanito on November 14, 2011, 05:43:06 AM
One of the many "issues" I've found with cups is knowing which deps go with which of the many different ways of printing using cups - locally, as a network client, hplip, gutenprint, custom OEM ppd, etc, etc

I probably needed ghostscript_common for some other reason and so didn't see this dep - added
Title: Re: cups-pdf not printing; already error during chosing virtual printer in leafpad
Post by: netnomad on November 14, 2011, 06:56:57 AM
i can confirm that cups-pdf is working,
but i succeeded only to a fullworking cups-environment with my own dep-file.

i packaged a cups_meta with following deps:

foomatic-rip.tcz
ghostscript_common.tcz
ghostscript.tcz
gutenprint.tcz
cups.tcz
cups-pdf.tcz


Title: Re: cups-pdf not printing; already error during chosing virtual printer in leafpad
Post by: Juanito on November 14, 2011, 08:33:21 AM
..which illustrates the point:

I don't need foomatic-rip nor gutenprint
but I do need hplip-2.7

..and from a client pc printing over the network, I need only cups

 :)
Title: Re: cups-pdf not printing; already error during chosing virtual printer in leafpad
Post by: curaga on November 14, 2011, 09:10:04 AM
And for what I intend, the client won't even need cups, only busybox :P (OT sorry)