-
-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
psnup not honouring page size? #58
Comments
I can't reproduce this problem. I have been testing with https://github.com/rrthomas/psutils/files/12389190/test.pdf and the latest git version of For me, I'm also using GhostScript 9.55, and I observe the following:
So far, no problem. The obvious thing to try is changing my default paper size:
Now I try the conversions again.
So, what if my default paper size is US Letter (and I don't want to change it), but I want to work with an A4 document? The
So, if we only give the input page size, the output will be taken as the same, and vice versa. Therefore, specifying either
So, I can't reproduce your problem, and PSUtils seems to be working as designed: it uses the user's default paper size when no explicit paper size is given and it can't find one in the file; otherwise, it respects the explicitly-provided paper size. |
Thanks for the details, and pointers to see in more detail what's going on. |
Then your default size is A4. This matches my first case above.
Yes, that's US Letter. As I showed above, I get this result only when a) my paper size is set to US Letter and b) I don't give
I can't reproduce this. Sorry, but without a way to reproduce it, I can't find a bug, if there is one. As I showed above, for me the program behaves exactly as documented.
It works fine, as I showed above. |
I also write and maintain open source software in my free time, so I know what this unsatisfactory situation is like.
I tried again with the long form of the commands:
|
Thanks for noticing the warning about As to which version you're running, there's no need to install your development version (you can run it using the The only thing I can think of is that for some reason PSUtils is not getting the same result from
before
which shows what PSUtils gets as the default paper size. |
By the way, there are signs of activity on the pypdf bug, so hopefully there will soon be a fix, and you can go back to working directly with PDFs the page size of which can be reliably read and set! |
@jgclark if you're able to follow my debugging suggestion above, please let me know. If not, if you could attach input and output files, and the exact command you run, I can at least verify that we don't get the same result, and perhaps get a more precise idea of where the problem might lie (almost certainly, it seems to me, in the interface between PSUtils and libpaper). In particular, as it goes wrong for you when you specify both input and output paper size, perhaps psnup is not getting the correct information from libpaper (or indeed any information) but is ignoring an error. |
Just to say I'm not ignoring this, but I can't get to it until the weekend. |
Version 3.3.0 fixes a bug which seems as though it could have caused your problem. I doubt it, as I couldn't reproduce your problem with the previous version of PSUtils, but you never know! In any case, please do any further testing with the latest release, or git main HEAD. |
In any case, 3.3.0 also fixes the bug that meant you had to use PostScript in the first place, so you may not want to pursue this issue any longer, in which case please close it! |
Not wishing to pursue further :-) |
From #57 I'm testing private release of 3.09 at your request. Waiting for a fix to the underlying PDF library, I'm going via PS before converting back to PDF. You can test with the same test file I supplied in #57.
I found:
psbook test.ps testbook.ps
is finepsnup -2 testbook.ps testnup.ps
stage is clipping the text from the previous stage. In more detail the 'top edge' is clipped, and as far as I can see its writing more to 'US letter' size than A4.psnup -2 -p a4 testbook.ps testnup.ps
orpsnup -2 -P a4 testbook.ps testnup.ps
orpsnup -2 -p A4 -P a4 testbook.ps testnup.ps
.I confirm the original testbook.ps appears to be A4 dimensions.
Incidentally, psbook seems to be detecting and keeping A4 size, but psnup seems not to be ... and I've not got as far as pstops to try that out.
The text was updated successfully, but these errors were encountered: