Package: psutils Version: 1.17-27 Severity: important Tags: upstream I have 44-page ps file orginally scanned in a5. There is orginally no %%DocumentMedia definition inside of the file: Only BoundingBox and HiResBoundingBox are used at the beginning and PageBoundingBox used for every page.
!PS-Adobe-3.0 %%Pages: (atend) %%BoundingBox: 0 0 419 595 %%HiResBoundingBox: 0.000000 0.000000 419.000000 595.000000 %......................................... %%Creator: GPL Ghostscript 871 (pswrite) %%CreationDate: 2011/09/04 10:34:52 %%DocumentData: Clean7Bit %%LanguageLevel: 2 %%EndComments %%BeginProlog ... %%PageBoundingBox: 0 0 419 595 Now I tried to enlarge the pages from a5 to a4 papersize with: psresize -Pa5 -pa4 <infile> <outfile> But if I look now the file with different pdf readers the information shows me the image has to been rescaled, but the papersize didn't resized, too. Pages are still a5 and the images are cropped on upper and on right side. I checked the outputfile and found that header information are lost and some more: %%BoundingBox: 0 0 419 595 %%HiResBoundingBox: 0.000000 0.000000 419.000000 595.000000 But this could not are a problem I checked the files and found that %%PageBoundingBox are 44 times, still as before: ... %%PageBoundingBox: 0 0 419 595 ... For an workaround they are two solutions, I've found: After outfile creation I've resized all the PageBoundingBox and setpage lines: sed -e '/^%%PageBoundingBox: 0 0 419 595$/s/419 595/595 842/' -e '/419 595 null setpagesize/s/419 595/595 842/' outfilefrompsresize >fixedfile This has been helped here for me. But there looks like another solution: I add the an DocumentMedia line with A4 definition to the infile: %!PS-Adobe-3.0 %%Pages: (atend) %%BoundingBox: 0 0 419 595 %%HiResBoundingBox: 0.000000 0.000000 419.000000 595.000000 %......................................... %%Creator: GPL Ghostscript 871 (pswrite) %%CreationDate: 2011/09/05 13:50:22 %%DocumentData: Clean7Bit %%LanguageLevel: 2 %%DocumentMedia: A4 595 842 0 () () %%EndComments If I open the file now I have shown the A5 to the bottem left corner with white borders upper and right side. Now I use psresize as before and all looks fine. This brings me to test again psresize, but now with a5 definition in DocumentMedia: %%DocumentMedia: A5 419 595 0 () () But this won't help here. The outfile still have unchange DocumentMedia with A5 in the header. So I changed den DocumentMedia size from A5 to A4: voila it looks good. But allready I got an solution from Mr. Bergmann (thank you) using gs, which helped me to get the correct file I want, but it's a little bit more complex instead of using psresize: gs -dSAFER -dBATCH -dNOPAUSE -sDEVICE=pswrite -sOutputFile=outfile -c "<</BeginPage{1.412 1.412 scale}>> setpagedevice" -g5950x8420 infile In my opinion, psresize should be able to change the papersize, too. -- System Information: Debian Release: 6.0.2 APT prefers proposed-updates APT policy: (500, 'proposed-updates'), (500, 'stable'), (300, 'testing'), (200, 'unstable') Architecture: amd64 (x86_64) Kernel: Linux 3.0.0-1-amd64 (SMP w/6 CPU cores) Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Versions of packages psutils depends on: ii libc6 2.11.2-10 Embedded GNU C Library: Shared lib ii libpaper1 1.1.24 library for handling paper charact Versions of packages psutils recommends: ii ghostscript 8.71~dfsg2-9 The GPL Ghostscript PostScript/PDF psutils suggests no packages. -- no debconf information -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org