Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Other Things Gentoo
  • Search

[Solved] Printing pdfs from command line with lp

Still need help with Gentoo, and your question doesn't fit in the above forums? Here is your last bastion of hope.
Post Reply
Advanced search
7 posts • Page 1 of 1
Author
Message
Luc484
Veteran
Veteran
User avatar
Posts: 1035
Joined: Sat Mar 26, 2005 6:26 pm
Location: Italy

[Solved] Printing pdfs from command line with lp

  • Quote

Post by Luc484 » Sun Jan 22, 2006 12:25 am

Hi. It's been some time since I started to use a simple script to print pdfs. In this script, I use lp to print them. I've never had any problem with that. Now, I'm trying to print a set of slides but I see the slides printed are not complete. Some lines and pictures are missing for instance. Did anyone experience this problem before? I tried to print them through kpdf, and everything works fine there. Which is difference between the two? Is it possible to print through kpdf from a bash script?
Thanks a lot for any information.
Last edited by Luc484 on Sun Jan 22, 2006 9:45 am, edited 1 time in total.
Top
polle
Veteran
Veteran
User avatar
Posts: 1498
Joined: Fri Feb 28, 2003 5:07 pm
Location: Belgium

  • Quote

Post by polle » Sun Jan 22, 2006 6:37 am

and when you try it like this:


pdftops <document.pdf> - | lp -d <printername>.
Top
Luc484
Veteran
Veteran
User avatar
Posts: 1035
Joined: Sat Mar 26, 2005 6:26 pm
Location: Italy

  • Quote

Post by Luc484 » Sun Jan 22, 2006 8:36 am

Same exact behaviour I have with lp. Some slide are missing, and those which are printed lacks some elements, or are empty at all.
Top
polle
Veteran
Veteran
User avatar
Posts: 1498
Joined: Fri Feb 28, 2003 5:07 pm
Location: Belgium

  • Quote

Post by polle » Sun Jan 22, 2006 9:19 am

and if you convert them first to ps:
pdf2ps - Ghostscript PDF to PostScript translator
SYNOPSIS
pdf2ps [ options ] input.pdf [output.ps]
DESCRIPTION
pdf2ps uses gs(1) to convert the Adobe Portable Document Format (PDF) file "input.pdf" to PostScript(tm) in "output.ps". Normally the output is allowed to use PostScript Level 2 (but not PostScript LanguageLevel 3) constructs; the -dLanguageLevel=1 option restricts the output to Level 1, while -dLanguageLevel=3 allows using LanguageLevel 3 in the output.
Top
Luc484
Veteran
Veteran
User avatar
Posts: 1035
Joined: Sat Mar 26, 2005 6:26 pm
Location: Italy

  • Quote

Post by Luc484 » Sun Jan 22, 2006 9:44 am

This way it is working! Do you have any idea of why this could be happening? lp is not interpreting pdf file format correctly? Do you know if kpdf uses this conversion to print pdf files? I remember some time ago I had to print a set of strange slide, which seemed to be very big (in dimension on the disk). Printing with kpdf was not possible because the pc hung, and the RAM was almost completely used. I had to print only a few pages at each time. lp had no problems. Maybe it was something related to this conversion?
Thanks for your help.
Top
polle
Veteran
Veteran
User avatar
Posts: 1498
Joined: Fri Feb 28, 2003 5:07 pm
Location: Belgium

  • Quote

Post by polle » Sun Jan 22, 2006 10:08 am

I'm not competely sure but I think lp use cups for the pdf printing

cups:
The core of PDF printing are two binaries -- pdftops and pstops. These wrappers act as CUPS filters, converting PDF to PostScript and cleaning up PostScript respectively. Some alternatives to these packages such as the pdftops that comes with xpdf are available, but I'm hoping that the CUPS development will eventually automate many of the PDF to printer conversions we have to deal with haphazardly.

maybe the conversion isn't done right on all pdf files in cups?
Top
Luc484
Veteran
Veteran
User avatar
Posts: 1035
Joined: Sat Mar 26, 2005 6:26 pm
Location: Italy

  • Quote

Post by Luc484 » Sun Jan 22, 2006 1:11 pm

So this could be a bug?
Thanks.
Top
Post Reply

7 posts • Page 1 of 1

Return to “Other Things Gentoo”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy