Comments (19)
What version of psutils is this? Your example works fine for me with the most recent version, 2.04 (and it should work in any 2.xx version). There's a (passing) test for setting a non-default output paper size in the current version. I also checked outputting Letter size paper, since A4 is the default on my system.
from psutils.
I am using psutils 2.03 running on Arch linux 5.9.9. My default paper size is also A4
from psutils.
There is an error reported from pstops:
$ psbook printfile.ps psbook.ps
[1] [2] [3] [4] Wrote 4 pages
$ psnup -p A4 -2 psbook.ps fpbooklet.ps
Use of uninitialized value $upto in subtraction (-) at /usr/bin/pstops line 277, line 12554.
[1] [2] Wrote 2 pages
from psutils.
Could not attach the postscript file so:
$ pdf2ps printfile.pdf
from psutils.
Nice choice of file! That particular error is fixed by 2.04, and I confirm that using your attached printfile.pdf
with pdf2ps
and then running your test, I get A4 output.
I also tried running the test with 2.03. I get the same error as you do (I believe it's harmless by the way), and I again get A4 output.
from psutils.
I tried changing my default paper size to Letter, and ran the test, and again I get A4 output. I'm sorry, I'm running out of ideas here.
from psutils.
You can attach your original PostScript file by adding the suffix .txt
. Could you please attach that and your fpbooklet.ps
file?
from psutils.
Something is strange here. I attached the file "printfile.pdf". It is a text file from the psnup man page, printed in pdf format.
Here are all the files used, having converted printfile.pdf to printfile.ps, in .zip format:
psnup.zip
from psutils.
Thanks. fpbooklet.ps in your Zip file is A4 format.
from psutils.
I really do appreciate your time on this!
If I look at the file using ghostscript I get:
If I convert the file to pdf using ps2pdf I get:
fpbooklet.pdf
I have no idea what is going wrong?
from psutils.
If I open fpbooklet.ps in gs (I was using evince before), it displays normally. (I'm using GhostScript 9.50 as supplied with Ubuntu 20.04.) Anyway, the DocumentMedia and BoundingBox lines say:
%%DocumentMedia: plain 595 842 0 () ()
%%BoundingBox: 0 0 595 842
which are A4 (divide by 72 and multiply by 2.54!).
The obvious thing that comes to mind is the default paper size configured for your installation of GhostScript; in any case, the output of psutils is clearly correct, so I'm closing the bug. I suggest you add "-sPAPERSIZE=a4" to your invocation of ps2pdf.
from psutils.
Thank you for your help and I apologize for my ignorance. :)
from psutils.
No problem! It turns out that Debian's ghostscript (and hence Ubuntu's) uses libpaper, so it respects the default system paper size. I guess Arch doesn't do that. You can however set ghostscript's default paper size in gs_init.ps
.
from psutils.
Alternatively, you've not configured libpaper's default paper size?
from psutils.
Thanks - may be not quite so stupid :)
from psutils.
Absolutely right. "paper" is set correctly. May be paper should also let libpaper?
from psutils.
Thereby hangs a tale! Paper is designed as a replacement for libpaper, and I'm trying to work out how to get there…
from psutils.
I suppose you would not consider a rewrite of ghostscript while you are at it? :) :) :)
from psutils.
The idea is to have ghostscript use the new libpaper, indeed.
from psutils.
Related Issues (20)
- psnup -p a4 → Use of uninitialized value in subroutine entry at /usr/share/psutils/PSUtils.pm line 80/81 HOT 2
- psbook: Explanation of “signature” and printing unclear HOT 1
- Reconsider command-line interface (and if we change it, rename "pageutils") HOT 2
- Translate README to Markdown
- Add and check stderr output for all tests HOT 2
- Translate test scripts to POSIX sh
- pstops: does combined flip and scale work? HOT 1
- Make PyPI release HOT 2
- missing test dependencies? HOT 9
- tag mismatch HOT 3
- Does not support Python 3.8 HOT 7
- 3.0.8 release was not completed? HOT 2
- Infinite recursion with some PDF inputs HOT 27
- psnup not honouring page size? HOT 11
- psnup with output page size set to tabloid produces bad results HOT 12
- Optionally read `BoundingBox` as paper size HOT 3
- Use image comparison for PDF tests
- Error with pstops using manpage examples HOT 10
- Name confusion: is it PSUtils or PSPDFUtils? HOT 2
- Unneeded warning message about paper size when used with a2ps (fixps) and troff files HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from psutils.