View previous topic :: View next topic |
Author |
Message |
BrummieJim l33t
Joined: 22 Jul 2005 Posts: 683
|
Posted: Tue Nov 28, 2006 4:43 pm Post subject: PDF's try to print as letter, but cups is set to A4 |
|
|
Hi,
This problem is really annoying me. I can print test pages (cups) ps documents (ggv) but whenever I try and print a pdf made by an American both xpdf and evince lock the printer up as it says it can't print pages of size 280x216 (US letter). I think this problem could be linked to poppler, on which they both depend, but there doesn't seem to be any USE flags to deal with this. Neither of these programs have options to change the paper size.
Any ideas? |
|
Back to top |
|
|
timeBandit Bodhisattva
Joined: 31 Dec 2004 Posts: 2719 Location: here, there or in transit
|
Posted: Tue Nov 28, 2006 4:55 pm Post subject: |
|
|
The print dialog of Adobe's Acrobat Reader has a checkbox option to shrink/expand PDF page images to the paper size. Does Evince or xpdf offer a similar option? That should do the trick, as it would expand US Letter to A4.
Paper sizes are provided by CUPS, through the PPD file I think. If you define US Letter in CUPS, you should be able to choose it in any CUPS-aware app. If there's no specific option for paper size, look for a Properties button in the print dialog. _________________ Plants are pithy, brooks tend to babble--I'm content to lie between them.
Super-short f.g.o checklist: Search first, strip comments, mark solved, help others. |
|
Back to top |
|
|
BrummieJim l33t
Joined: 22 Jul 2005 Posts: 683
|
Posted: Wed Nov 29, 2006 11:05 am Post subject: |
|
|
Quote: | Neither of these programs have options to change the paper size. |
The problem lies somewhere else as CUPS is set to A4, the CUPS test page prints, PS files also work print from GGV. The only problem is printing from xpdf and evince. |
|
Back to top |
|
|
wynn Advocate
Joined: 01 Apr 2005 Posts: 2421 Location: UK
|
Posted: Wed Nov 29, 2006 11:38 am Post subject: |
|
|
Have you tried running xpdf with the "-paper A4" argument? Does that change anything?
The manpage says Quote: | -paper size
Set the paper size to one of "letter", "legal", "A4", or "A3". This can also be set to "match", which will set the paper size to match the size specified in the PDF file. [config file: psPaperSize] | "match" seems to indicate that setting "-paper" will override the setting in the PDF file. You can also set "psPaperSize" in the config file.
Otherwise, when printing you are asked for the print command, you can set this to Code: | lpr -o PageSize=A4 -P <printer name> | It's probably worthwhile checking that the printer accepts a "PageSize" option with Code: | lpoptions -p <printer name> -l |
_________________ The avatar is jorma, a "duck" from "Elephants Dream": the film and all the production materials have been made available under a Creative Commons Attribution 2.5 License, see orange.blender.org for details. |
|
Back to top |
|
|
BrummieJim l33t
Joined: 22 Jul 2005 Posts: 683
|
Posted: Wed Nov 29, 2006 12:05 pm Post subject: |
|
|
Cheers but none of that worked. Apparently it's a poppler problem http://www.gnomefiles.org/comment.php?soft_id=898
Quote: | > Why do you need to enable --with-paper-a4
> in poppler's configure option ?
You need to enable --with-a4-papersize in Poppler's configure options because Xpdf does it like this and Poppler is a fork of Xpdf.
> Poppler should depend on the libgnomeprint/ui
> or KdePrinterUI related paper settings for a4,
> letter or whatever....
This is unfortunately not possible because nobody has implemented it so far for Poppler, a 0.3.3 software. Are you interested? |
Seems it was incorporated into stable too early. I remember poppler causing lots of conflicts when it was added to the tree. Having to alter an e-build (I think that's how you'd put the configure in) to make a pdf reader act sensibly is stupid. I've just looked in the ebuild and it doesn't seem like theres a ./configure option. Why doesn't it do what CUPS is set to, or shouldn't there be some global option.
I'm not impressed. |
|
Back to top |
|
|
wynn Advocate
Joined: 01 Apr 2005 Posts: 2421 Location: UK
|
Posted: Wed Nov 29, 2006 3:34 pm Post subject: |
|
|
BrummieJim wrote: | You need to enable --with-a4-papersize in Poppler's configure options because Xpdf does it like this and Poppler is a fork of Xpdf. | There are two ways you can do this: the easy way and the less easy way .
The easy way is to use EXTRA_ECONF (not supported by gentoo) like so Code: | EXTRA_ECONF="--with-a4-papersize" emerge -av app-text/poppler |
The less easy way (the proper way) is to set up your own portage overlay, copy the ebuild there, modify it and emerge your own copy- Add the line PORTDIR_OVERLAY="/usr/local/portage" to /etc/make.conf
- mkdir -p /usr/local/portage/app-text/poppler/files
- cp /usr/portage/app-text/poppler/files/* /usr/local/portage/app-text/poppler/files
- cp /usr/portage/app-text/poppler/poppler-0.5.4.ebuild /usr/local/portage/app-text/poppler/poppler-0.5.4-r99.ebuild
- cd /usr/local/portage/app-text/poppler
- Add
Code: | --with-a4-papersize \ | line as Code: | --enable-xpdf-headers \
--with-a4-papersize \ | in src_compile() in the ebuildebuild poppler-0.5.4-r99.ebuild digestemerge -av =app-text/poppler/poppler-0.5.4-r99This is all taken from https://forums.gentoo.org/viewtopic-p-3643861.html#3643861 and https://forums.gentoo.org/viewtopic-p-3643871.html#3643871 by _ph and Corona688 respectively.
0.5.4 is the unstable ebuild, if you want the stable one, change 0.5.4 to 0.5.3 throughout. _________________ The avatar is jorma, a "duck" from "Elephants Dream": the film and all the production materials have been made available under a Creative Commons Attribution 2.5 License, see orange.blender.org for details. |
|
Back to top |
|
|
|
|
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
|
|