Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
pdf printing with images (Evince)
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
Kiwon Um
n00b
n00b


Joined: 15 Jul 2009
Posts: 49

PostPosted: Thu May 31, 2012 11:22 am    Post subject: pdf printing with images (Evince) Reply with quote

Dear Gentoo users,

it is not likely a problem of Gentoo, but I wonder how to solve this problem: when I print a PDF file in Evince, the pages containing images are printed out with slight blue color background. As googling, http://askubuntu.com/questions/59086/printing-pdf-with-lpr-results-in-different-output-than-printing-gui, this seems to be related with it.

Does anybody have a solution to Evince not Acrobat Reader?
Back to top
View user's profile Send private message
Rexilion
Veteran
Veteran


Joined: 17 Mar 2009
Posts: 1044

PostPosted: Sat Jun 02, 2012 1:42 pm    Post subject: Reply with quote

Long shot:

But maybe you could make Evince 'print' the file to .ps ('Print to file option'). Open this file in evince, and then send it to the printer. If I understand it correctly, the .ps is closer to the printer format. So less mangling might happen??
Back to top
View user's profile Send private message
Kiwon Um
n00b
n00b


Joined: 15 Jul 2009
Posts: 49

PostPosted: Sat Jun 02, 2012 2:11 pm    Post subject: Reply with quote

Rexilion wrote:
Long shot:

But maybe you could make Evince 'print' the file to .ps ('Print to file option'). Open this file in evince, and then send it to the printer. If I understand it correctly, the .ps is closer to the printer format. So less mangling might happen??

Indeed! The process prints well without the blue background. What's the problem with the direct printing of PDF? How can I automate this?
Back to top
View user's profile Send private message
Rexilion
Veteran
Veteran


Joined: 17 Mar 2009
Posts: 1044

PostPosted: Sat Jun 02, 2012 2:34 pm    Post subject: Reply with quote

As far as I know, you can't. However, I do noticed that the latest stable evince ebuild now has the 'ps' switch. Maybe you could play with this?

Sidenote, I quote something in the link you provided:

Quote:
edit: CUPS uses pdftops and friends to print PDF documents, this is based on Xpdf which is the same ancestry as Evince.


That is not completely true. Xpdf is forked by poppler which is well maintained and recently modern. This package now provides pdftops. I also see a 'lcms' useflag for poppler, maybe you can play with that too?

In short: I have no idea how to automate it.
Back to top
View user's profile Send private message
VoidMage
Watchman
Watchman


Joined: 14 Oct 2006
Posts: 6194

PostPosted: Sat Jun 02, 2012 3:28 pm    Post subject: Reply with quote

Mind giving a file exhibiting this problem ?
Back to top
View user's profile Send private message
Kiwon Um
n00b
n00b


Joined: 15 Jul 2009
Posts: 49

PostPosted: Sat Jun 02, 2012 3:41 pm    Post subject: Reply with quote

VoidMage wrote:
Mind giving a file exhibiting this problem ?

No problem. Here is an academic paper: http://www.cse.ohio-state.edu/%7Etamaldey/paper/foam/bubble.pdf
You can check the first page (with images) and second page (only text).
Back to top
View user's profile Send private message
VoidMage
Watchman
Watchman


Joined: 14 Oct 2006
Posts: 6194

PostPosted: Sat Jun 02, 2012 5:41 pm    Post subject: Reply with quote

Well, the paper might even be interesting, that is if I had time and will to go through it.
But as for the problem, please specify:
- did you mean that this blue color happens when the file is sent to your printer (cause printing to a different pdf seems to work) ?
- what are your versions of evince, cairo and poppler ?
Back to top
View user's profile Send private message
Kiwon Um
n00b
n00b


Joined: 15 Jul 2009
Posts: 49

PostPosted: Sun Jun 03, 2012 1:54 pm    Post subject: Reply with quote

VoidMage wrote:
- did you mean that this blue color happens when the file is sent to your printer (cause printing to a different pdf seems to work) ?
- what are your versions of evince, cairo and poppler ?

Some PDF files had the problem, but some did not so I didn't catch what causes the problem. For the problematic PDF file, if I first print to file (postscript) and print it to printer as mentioned Rexilion, it prints well. The packages are as follows:
    app-text/evince-3.4.0 (dbus djvu dvi gnome-keyring introspection nautilus ps t1lib tiff -debug -doc -xps)
    x11-libs/cairo-1.10.2-r2 (X glib opengl svg xcb -aqua -debug -directfb -doc -drm -gallium -openvg -qt4 -static-libs)
    app-text/poppler-0.18.4-r1 (cairo cjk curl cxx introspection jpeg jpeg2k lcms png tiff utils xpdf-headers -debug -doc -qt4)


Thanks.
Back to top
View user's profile Send private message
VoidMage
Watchman
Watchman


Joined: 14 Oct 2006
Posts: 6194

PostPosted: Sun Jun 03, 2012 10:25 pm    Post subject: Reply with quote

Let me put it in a different way: are you sure it's not a problem with the configuration of your printer ?
Back to top
View user's profile Send private message
Kiwon Um
n00b
n00b


Joined: 15 Jul 2009
Posts: 49

PostPosted: Mon Jun 04, 2012 2:26 am    Post subject: Reply with quote

VoidMage wrote:
Let me put it in a different way: are you sure it's not a problem with the configuration of your printer ?

Hm... My printer is Canon MF8450C. Because there was no ebuild file for the driver of it, I wrote myself:

cndrvcups-common-2.20.ebuild
Code:
inherit flag-o-matic

DESCRIPTION="Canon UFRII Printer Driver for Linux - Common Modules"
HOMEPAGE="http://support-sg.canon-asia.com/contents/SG/EN/0100270807.html"
My_ZIP="UFR_II_Printer_Driver_for_Linux_V220_uk_EN.tar.gz"
SRC_URI="http://gdlp01.c-wss.com/gds/8/0100002708/03/${My_ZIP}"
RESTRICT="mirror"
LICENSE="GPL-2"
SLOT="0"

KEYWORDS="x86 amd64"

RESTRICT="strip"
RDEPEND=">=dev-libs/glib-2.0"
DEPEND="${RDEPEND} app-arch/tar net-print/cups"

src_unpack() {
   einfo Unpacking ${My_ZIP}
   tar xzf ${DISTDIR}/${My_ZIP} -C ${T}

   einfo Unpacking ${P}\*.tar.gz
   tar xzf ${T}/UFR_II_Printer_Driver_for_Linux_V220_uk_EN/Sources/${P}*.tar.gz -C ${WORKDIR} || die "unpack failed"
}

src_compile() {
   filter-ldflags -Wl,--as-needed
   (cd cngplp && ./autogen.sh --prefix=/usr --libdir=/usr/lib && emake && cd -) || die "./autogen.sh failed in cngplp"
   (cd buftool && ./autogen.sh --prefix=/usr --enable-progpath=/usr/bin --libdir=/usr/lib && emake && cd -) || die "./autogen.sh failed in buftool"
   (cd c3plmod_ipc && emake && cd -) || die "emake c3plmod_ipc failed"
}

src_install() {
   emake -C cngplp install DESTDIR=${D} LIBDIR=/usr/lib || die "emake install in cngplp failed"
   emake -C buftool install DESTDIR=${D} LIBDIR=/usr/lib || die "emake install in buftool failed"
   emake -C c3plmod_ipc install DESTDIR=${D} LIBDIR=/usr/lib || die "emake install in c3plmod_ipc failed"

   dodir /usr/bin

   dobin libs/c3pldrv

   dolib.so libs/libc3pl.so.0.0.1
   dosym libc3pl.so.0.0.1 /usr/lib/libc3pl.so.0
   dosym libc3pl.so.0.0.1 /usr/lib/libc3pl.so

   dolib.so libs/libcaepcm.so.1.0
   dosym libcaepcm.so.1.0 /usr/lib/libcaepcm.so.1
   dosym libcaepcm.so.1.0 /usr/lib/libcaepcm.so

   dolib.so libs/libcaiousb.so.1.0.0
   dosym libcaiousb.so.1.0.0 /usr/lib/libcaiousb.so.1
   dosym libcaiousb.so.1.0.0 /usr/lib/libcaiousb.so

   dolib.so libs/libcaiowrap.so.1.0.0
   dosym libcaiowrap.so.1.0.0 /usr/lib/libcaiowrap.so.1
   dosym libcaiowrap.so.1.0.0 /usr/lib/libcaiowrap.so

   dolib.so libs/libcanon_slim.so.1.0.0
   dosym libcanon_slim.so.1.0.0 /usr/lib/libcanon_slim.so.1
   dosym libcanon_slim.so.1.0.0 /usr/lib/libcanon_slim.so

   dosym libcanonc3pl.so.1.0.0 /usr/lib/libcanonc3pl.so.1
   dosym libcanonc3pl.so.1.0.0 /usr/lib/libcanonc3pl.so

   dodir /usr/share/caepcm
   insinto /usr/share/caepcm
   doins data/CA*
   doins data/CN*
}


cndrvcups-lb-2.20.ebuild
Code:
inherit flag-o-matic

DESCRIPTION="Canon UFRII Printer Driver for Linux - Common Modules"
HOMEPAGE="http://support-sg.canon-asia.com/contents/SG/EN/0100270807.html"
My_ZIP="UFR_II_Printer_Driver_for_Linux_V220_uk_EN.tar.gz"
SRC_URI="http://gdlp01.c-wss.com/gds/8/0100002708/03/${My_ZIP}"
RESTRICT="mirror"
LICENSE="GPL-2"
SLOT="0"

KEYWORDS="x86 amd64"

RESTRICT="strip"
RDEPEND="net-print/cndrvcups-common"
DEPEND="${RDEPEND} app-arch/tar net-print/cups"

src_unpack() {
   einfo Unpacking ${My_ZIP}
   tar xzf ${DISTDIR}/${My_ZIP} -C ${T}

   einfo Unpacking ${P}\*.tar.gz
   tar xzf ${T}/UFR_II_Printer_Driver_for_Linux_V220_uk_EN/Sources/${P}*.tar.gz -C ${WORKDIR} || die "unpack failed"
}

src_compile() {
   filter-ldflags -Wl,--as-needed

   (cd pstoufr2cpca && ./autogen.sh --prefix=/usr --enable-progpath=/usr/bin --libdir=/usr/libexec && emake && cd -) || die "emake pstoufr2cpca failed"
   (cd ppd && ./autogen.sh --prefix=/usr --libdir=/usr/libexec && emake && cd -) || die "emake ppd failed"
   (cd cpca && ./autogen.sh --prefix=/usr --enable-progpath=/usr/bin --libdir=/usr/lib --enable-shared --disable-static && emake && cd -) || die "emake cpca failed"
   (cd cngplp/files && ./autogen.sh --prefix=/usr --libdir=/usr/lib && cd -) || die "emake cngplp files autogen.sh failed"
   (cd cngplp && ./autogen.sh --prefix=/usr --libdir=/usr/lib && emake && cd -) || die "emake cngplp failed"

   #cd backend || die " no such dir: backend"
   #./autogen.sh --prefix=/usr --libdir=/usr/lib || die "./autogen.sh in backend failed"
   #emake || die "emake backend failed"
   #cd -
}

src_install() {
   emake -C pstoufr2cpca install DESTDIR=${D} || die "emake install pstourf2cpca failed"
   emake -C ppd install DESTDIR=${D} || die "emake install ppd failed"
   emake -C cpca install DESTDIR=${D} || die "emake install cpca failed"
   emake -C cngplp/files install DESTDIR=${D} || die "emake install cngplp files failed"
   emake -C cngplp install DESTDIR=${D} || die "emake install cngplp failed"
   #emake -C backend install DESTDIR=${D} || die "emake install backend failed"

   dodir /usr/lib
   dodir /usr/bin
   dodir /usr/share/caepcm
   dodir /usr/share/cnpkbidi
   dodir /usr/share/ufr2filter

   dobin libs/cnpkbidi
   dobin libs/cnpkmoduleufr2

   dolib.so libs/libcaiocnpkbidi.so.1.0.0
   dosym libcaiocnpkbidi.so.1.0.0 /usr/lib/libcaiocnpkbidi.so
   dosym libcaiocnpkbidi.so.1.0.0 /usr/lib/libcaiocnpkbidi.so.1

   #dolib.so libs/libcanonufr2.la
   dolib.so libs/libcanonufr2.so.1.0.0
   dosym libcanonufr2.so.1.0.0 /usr/lib/libcanonufr2.so
   dosym libcanonufr2.so.1.0.0 /usr/lib/libcanonufr2.so.1

   dolib.so libs/libcnlbcm.so.1.0
   dosym libcnlbcm.so.1.0 /usr/lib/libcnlbcm.so
   dosym libcnlbcm.so.1.0 /usr/lib/libcnlbcm.so.1

   dolib.so libs/libEnoJBIG.so.1.0.0
   dosym libEnoJBIG.so.1.0.0 /usr/lib/libEnoJBIG.so
   dosym libEnoJBIG.so.1.0.0 /usr/lib/libEnoJBIG.so.1

   dolib.so libs/libufr2filter.so.1.0.0
   dosym libufr2filter.so.1.0.0 /usr/lib/libufr2filter.so
   dosym libufr2filter.so.1.0.0 /usr/lib/libufr2filter.so.1

   insinto /usr/share/cnpkbidi
   doins libs/cnpkbidi_info*

   insinto /usr/share/ufr2filter
   doins libs/ThLB*

   insinto /usr/share/caepcm
   doins data/CN*
   doins data/Cn*

   dodoc LICENSE*ufr2*0E.txt README README*ufr2*US*.txt
}


Is there any simple way to install the driver for my printer?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum