Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 108121 - cups-pdf: lpr -P pdf foo.pdf produces broken pdf file
Summary: cups-pdf: lpr -P pdf foo.pdf produces broken pdf file
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Printing (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Printing Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-10-04 14:06 UTC by Wernfried Haas (RETIRED)
Modified: 2006-01-26 12:34 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
That's the kind of file you get when printing with lpr -P pdf some.pdf (broken.pdf,321 bytes, application/octet-stream)
2005-10-04 14:08 UTC, Wernfried Haas (RETIRED)
Details
the 714 byte file (job_139-untitled_document.pdf,714 bytes, application/pdf)
2006-01-15 03:03 UTC, Wernfried Haas (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Wernfried Haas (RETIRED) gentoo-dev 2005-10-04 14:06:23 UTC
I'm pretty sure this worked once. Printing a pdf from command line using lpr
produces a 321 byte large file, that's it. Printing to the pdf printer from an
Application (e.g. kpdf (yes, even printing a pdf from there) or openoffice)
works fine.
This may also affect printing to real printers with cups, but i don't have one
around here to test it.

Reproducible: Always
Steps to Reproduce:
1. emerge cups-pdf
2. or -P pdf some.pdf




Portage 2.0.51.22-r2 (default-linux/x86/2005.0, gcc-3.3.6, glibc-2.3.5-r1,
2.6.13-gentoo-r1 i686)
=================================================================
System uname: 2.6.13-gentoo-r1 i686 Intel(R) Pentium(R) M processor 2.00GHz
Gentoo Base System version 1.6.13
dev-lang/python:     2.3.5-r2
sys-apps/sandbox:    1.2.11
sys-devel/autoconf:  2.13, 2.59-r6
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1
sys-devel/binutils:  2.15.92.0.2-r10
sys-devel/libtool:   1.5.18-r1
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=pentium3 -O3 -pipe -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.4/env
/usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3/share/config
/usr/lib/X11/xkb /usr/lib/mozilla/defaults/pref /usr/share/config
/var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-march=pentium3 -O3 -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks sandbox sfperms strict userpriv usersandbox"
GENTOO_MIRRORS="http://distfiles.gentoo.org
http://distro.ibiblio.org/pub/Linux/distributions/gentoo"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://192.168.0.75/gentoo-portage"
USE="x86 X aalib alsa apm atm avi berkdb bitmap-fonts cdparanoia cdr crypt cups
curl divx4linux dvd eds emacs emboss encode esd ethereal fam fbcon flac
foomaticdb fortran gdbm gif gpm gstreamer gtk gtk2 icq imagemagick imap imlib
ipv6 java jpeg kde libg++ libwww mad mikmod mmx motif mozilla mp3 mpeg ncurses
nls nptl offensive ogg oggvorbis opengl oss pam pdflib perl png ppds python qt
quicktime readline real ruby samba sdl slang smtp spell sse sse2 ssl tcpd tiff
truetype truetype-fonts type1-fonts vorbis win32codecs xinetd xml2 xmms xv xvid
zlib userland_GNU kernel_linux elibc_glibc"
Unset:  ASFLAGS, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS
Comment 1 Wernfried Haas (RETIRED) gentoo-dev 2005-10-04 14:08:49 UTC
Created attachment 69877 [details]
That's the kind of file you get when printing with lpr -P pdf some.pdf
Comment 2 Ryan 2005-11-03 08:00:42 UTC
(In reply to comment #0)
> I'm pretty sure this worked once. Printing a pdf from command line using lpr
> produces a 321 byte large file, that's it. Printing to the pdf printer from an
> Application (e.g. kpdf (yes, even printing a pdf from there) or openoffice)
> works fine.
> This may also affect printing to real printers with cups, but i don't have one
> around here to test it.
> 
> ...

What version of cups and cups-pdf do you have?  
Is the PDF you are printing a valid PDF file?

I just tried it from my machine, and had no problem.  I printed a PDF from
command line (the PDF was one I printed the other day from a website).  And
tried it again with one produced from a Proffessor (probably on a mac).  Both
printed no problems.
Comment 3 Wernfried Haas (RETIRED) gentoo-dev 2005-11-03 08:17:40 UTC
(In reply to comment #2)
> What version of cups and cups-pdf do you have?  
cups-1.1.23-r1 and cups-pdf 1.7.0a (running a stable arch=x86 here)

> Is the PDF you are printing a valid PDF file?
Yes. I can print from openoffice or kpdf, resulting in working pdf files. If i
print a valid pdf (that works in kpdf and was created with openoffice's pdf
export or printed via cups-pdf) via lpr -P pdf foo.pdf, it fails. The same file
can be printed fine via kpdf.

> I just tried it from my machine, and had no problem.  I printed a PDF from
> command line (the PDF was one I printed the other day from a website).  And
> tried it again with one produced from a Proffessor (probably on a mac).  Both
> printed no problems.
I think it may have to do with some package being broken here that is used for
command line printing. Too bad i have no clue which one.
Comment 4 Stefan Schweizer (RETIRED) gentoo-dev 2006-01-14 15:15:11 UTC
Can you please try again with ver 2.0.3 when it hits the mirrors?
Comment 5 Wernfried Haas (RETIRED) gentoo-dev 2006-01-15 03:02:39 UTC
Installed net-print/cups-pdf-2.0.3, no config files to update, restarted cups to be sure, lpr -P pdf some.pdf -> produced exactly the same file. Sorry, didn't help.

Btw, after uninstalling app-text/ghostscript-esp and installing app-text/ghostscript-gnu instead it produced a 714 byte file.
Comment 6 Wernfried Haas (RETIRED) gentoo-dev 2006-01-15 03:03:34 UTC
Created attachment 77148 [details]
the 714 byte file
Comment 7 Stefan Schweizer (RETIRED) gentoo-dev 2006-01-19 12:48:37 UTC
bummer :( Does it work with ghostscript-esp-8 instead? (currently masked)
Comment 8 Stefan Schweizer (RETIRED) gentoo-dev 2006-01-26 12:34:54 UTC
well, I guess I cannot find a gentoo-solution to this. It also happens to me :(

It is not an ebuild bug and I am not familiar with cups-pdf code.

Please report this bug UPSTREAM if you are interested in getting it fixed.