WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: cups-pdf not printing; already error during chosing virtual printer in leafpad  (Read 7523 times)

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14756
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

Offline netnomad

  • Hero Member
  • *****
  • Posts: 1026
as i mentioned i have a similar problem:
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
« Last Edit: September 14, 2011, 12:04:15 PM by netnomad »

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14756
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.
« Last Edit: September 14, 2011, 01:47:37 PM by Juanito »

Offline floppy

  • Hero Member
  • *****
  • Posts: 577
as i mentioned i have a similar problem:
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).
AMD K6-IIIATZ 550MHz MB DFI K6xv3/+66
P4 HP DC7100 3GB 3GHz
Samsung NC10 boot from SD card port (via USB reader)
.. all TinyCore proofed

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14756
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?
« Last Edit: September 14, 2011, 11:53:54 PM by Juanito »

Offline floppy

  • Hero Member
  • *****
  • Posts: 577
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.
AMD K6-IIIATZ 550MHz MB DFI K6xv3/+66
P4 HP DC7100 3GB 3GHz
Samsung NC10 boot from SD card port (via USB reader)
.. all TinyCore proofed

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11522
Hi floppy
A script is like a batch file.

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14756
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
« Last Edit: September 17, 2011, 01:49:40 PM by Juanito »

Offline Onyarian

  • Sr. Member
  • ****
  • Posts: 337
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.

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14756
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

Offline netnomad

  • Hero Member
  • *****
  • Posts: 1026
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


« Last Edit: November 14, 2011, 07:26:37 AM by netnomad »

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14756
..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

 :)
« Last Edit: November 14, 2011, 08:35:11 AM by Juanito »

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11029
And for what I intend, the client won't even need cups, only busybox :P (OT sorry)
The only barriers that can stop you are the ones you create yourself.